[Pkg-voip-commits] [bctoolbox] 53/60: Do not try to remove NAT64 prefix when trying to convert an IPv6 address to an IPv4 one, this has no sense.
Bernhard Schmidt
berni at moszumanska.debian.org
Sun Oct 15 22:42:29 UTC 2017
This is an automated email from the git hooks/post-receive script.
berni pushed a commit to branch debian/sid
in repository bctoolbox.
commit 7048ab9454e979652d813117d0122b07b7549205
Author: Ghislain MARY <ghislain.mary at belledonne-communications.com>
Date: Thu Jul 6 13:40:14 2017 +0200
Do not try to remove NAT64 prefix when trying to convert an IPv6 address to an IPv4 one, this has no sense.
---
include/bctoolbox/port.h | 3 +--
src/utils/port.c | 3 ---
2 files changed, 1 insertion(+), 5 deletions(-)
diff --git a/include/bctoolbox/port.h b/include/bctoolbox/port.h
index 1268431..8805e7b 100644
--- a/include/bctoolbox/port.h
+++ b/include/bctoolbox/port.h
@@ -485,8 +485,7 @@ BCTBX_PUBLIC void bctbx_sockaddr_remove_v4_mapping(const struct sockaddr *v6, st
BCTBX_PUBLIC void bctbx_sockaddr_remove_nat64_mapping(const struct sockaddr *v6, struct sockaddr *result, socklen_t *result_len);
/**
- * This function will transform any V6 address that can be converted to a V4 address (V4 mapped or NAT64) to a pure V4
- * and write it into result, or will just copy it otherwise.
+ * This function will transform a V4 to V6 mapped address to a pure V4 and write it into result, or will just copy it otherwise.
* The memory for v6 and result may be the same, in which case processing is done in place or no copy is done.
* The pointer to result must have sufficient storage, typically a struct sockaddr_storage.
**/
diff --git a/src/utils/port.c b/src/utils/port.c
index 59a927b..b52dfa5 100644
--- a/src/utils/port.c
+++ b/src/utils/port.c
@@ -1351,9 +1351,6 @@ void bctbx_sockaddr_remove_nat64_mapping(const struct sockaddr *v6, struct socka
void bctbx_sockaddr_ipv6_to_ipv4(const struct sockaddr *v6, struct sockaddr *result, socklen_t *result_len) {
bctbx_sockaddr_remove_v4_mapping(v6, result, result_len);
- if (result->sa_family == AF_INET6) {
- bctbx_sockaddr_remove_nat64_mapping(v6, result, result_len);
- }
}
void bctbx_sockaddr_ipv4_to_ipv6(const struct sockaddr *v4, struct sockaddr *result, socklen_t *result_len) {
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-voip/bctoolbox.git
More information about the Pkg-voip-commits
mailing list