diff options
-rw-r--r-- | meta-networking/recipes-protocols/openl2tp/openl2tp/0002-user-ipv6-structures.patch | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/meta-networking/recipes-protocols/openl2tp/openl2tp/0002-user-ipv6-structures.patch b/meta-networking/recipes-protocols/openl2tp/openl2tp/0002-user-ipv6-structures.patch index 3f8bcaa483..bd9bcb8f27 100644 --- a/meta-networking/recipes-protocols/openl2tp/openl2tp/0002-user-ipv6-structures.patch +++ b/meta-networking/recipes-protocols/openl2tp/openl2tp/0002-user-ipv6-structures.patch | |||
@@ -4,6 +4,9 @@ Date: Tue, 28 Mar 2017 18:09:58 -0700 | |||
4 | Subject: [PATCH 2/2] user ipv6 structures | 4 | Subject: [PATCH 2/2] user ipv6 structures |
5 | 5 | ||
6 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | 6 | Signed-off-by: Khem Raj <raj.khem@gmail.com> |
7 | |||
8 | Update for ipv6 address compare | ||
9 | Signed-off-by: Changqing Li <changqing.li@windriver.com> | ||
7 | --- | 10 | --- |
8 | l2tp_api.c | 8 +++++--- | 11 | l2tp_api.c | 8 +++++--- |
9 | 1 file changed, 5 insertions(+), 3 deletions(-) | 12 | 1 file changed, 5 insertions(+), 3 deletions(-) |
@@ -18,8 +21,8 @@ index 9d6f60a..f0946fd 100644 | |||
18 | if ((!l2tp_opt_remote_rpc) && | 21 | if ((!l2tp_opt_remote_rpc) && |
19 | - ((xprt->xp_raddr.sin_addr.s_addr != htonl(INADDR_LOOPBACK)) && | 22 | - ((xprt->xp_raddr.sin_addr.s_addr != htonl(INADDR_LOOPBACK)) && |
20 | - (xprt->xp_raddr.sin_addr.s_addr != htonl(INADDR_ANY)))) { | 23 | - (xprt->xp_raddr.sin_addr.s_addr != htonl(INADDR_ANY)))) { |
21 | + ((xprt->xp_raddr.sin6_addr.s6_addr != htonl(INADDR_LOOPBACK)) && | 24 | + ((memcmp(&xprt->xp_raddr.sin6_addr, &in6addr_loopback, sizeof(struct in6_addr)) != 0) && |
22 | + (xprt->xp_raddr.sin6_addr.s6_addr != htonl(INADDR_ANY)))) { | 25 | + (memcmp(&xprt->xp_raddr.sin6_addr, &in6addr_any, sizeof(struct in6_addr)) != 0))) { |
23 | + char straddr[INET6_ADDRSTRLEN]; | 26 | + char straddr[INET6_ADDRSTRLEN]; |
24 | + inet_ntop(AF_INET6, &xprt->xp_raddr.sin6_addr, straddr, sizeof(straddr)); | 27 | + inet_ntop(AF_INET6, &xprt->xp_raddr.sin6_addr, straddr, sizeof(straddr)); |
25 | if (l2tp_opt_trace_flags & L2TP_DEBUG_API) { | 28 | if (l2tp_opt_trace_flags & L2TP_DEBUG_API) { |