osmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/libgtpnl/+/35986?usp=email )
Change subject: gtp-link: set IPv6 socket only ...................................................................... gtp-link: set IPv6 socket only GTP driver bails out for IPv4-mapped-IPv6 socket with EADDRNOAVAIL, to prevent issues with setsockopt IPV6_ADDRFORM. GTP control plane checks that tunnel family matches the socket family for this GTP device, ie. there is a 1:1 mapping between the socket listener and the device which determines the supported IP tunnel header. Signed-off-by: Pablo Neira Ayuso <[email protected]> Change-Id: I887a107657059adeb14ae425576ae7ea9018f762 --- M tools/gtp-link.c 1 file changed, 21 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libgtpnl refs/changes/86/35986/1 diff --git a/tools/gtp-link.c b/tools/gtp-link.c index feb2efe..6979459 100644 --- a/tools/gtp-link.c +++ b/tools/gtp-link.c @@ -95,6 +95,10 @@ gtp_sock->len = sizeof(struct sockaddr_in6); setup_sockaddr_in6(>p_sock->sockaddr.fd1.in6, 3386); setup_sockaddr_in6(>p_sock->sockaddr.fd2.in6, 2152); + if (setsockopt(fd1, IPPROTO_IPV6, IPV6_V6ONLY, &one, sizeof(one)) < 0) + perror("setsockopt IPV6_V6ONLY: "); + if (setsockopt(fd2, IPPROTO_IPV6, IPV6_V6ONLY, &one, sizeof(one)) < 0) + perror("setsockopt IPV6_V6ONLY: "); break; } -- To view, visit https://gerrit.osmocom.org/c/libgtpnl/+/35986?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libgtpnl Gerrit-Branch: master Gerrit-Change-Id: I887a107657059adeb14ae425576ae7ea9018f762 Gerrit-Change-Number: 35986 Gerrit-PatchSet: 1 Gerrit-Owner: osmith <[email protected]> Gerrit-MessageType: newchange
