summaryrefslogtreecommitdiffstats
path: root/lib/sockopt.c
diff options
context:
space:
mode:
authorChris Hall <chris.hall@highwayman.com>2011-03-29 01:49:16 +0100
committerChris Hall <chris.hall@highwayman.com>2011-03-29 01:49:16 +0100
commitf9956b9524ddafdb9d0cec042213eaa8229aad8c (patch)
treebf362c892837ef3f5a6a4d4265eb18e1b47ccf33 /lib/sockopt.c
parent9470cb2c32eab220f796b1438b787528272cbe84 (diff)
downloadquagga-ex15p.tar.bz2
quagga-ex15p.tar.xz
Bring "ex" version up to date with 0.99.18ex15p
Release: 0.99.18ex15p -- Pipework Branch Also fixes issue with unknown attributes -- does not release them prematurely. Contains the "bgpd: New show commands for improved view and address family support", which is post 0.99.18. (But not RFC 5082 GTSM.)
Diffstat (limited to 'lib/sockopt.c')
-rw-r--r--lib/sockopt.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/sockopt.c b/lib/sockopt.c
index a8fae4f1..aa747429 100644
--- a/lib/sockopt.c
+++ b/lib/sockopt.c
@@ -641,8 +641,13 @@ sockopt_tcp_signature (int sock_fd, union sockunion *su, const char *password)
su2->sin6.sin6_family = AF_INET6;
/* V4Map the address */
memset (&su2->sin6.sin6_addr, 0, sizeof (struct in6_addr));
- su2->sin6.sin6_addr.s6_addr32[2] = htonl(0xffff);
- memcpy (&su2->sin6.sin6_addr.s6_addr32[3], &su->sin.sin_addr, 4);
+ su2->sin6.sin6_addr.s6_addr[10] = 0xff ;
+ su2->sin6.sin6_addr.s6_addr[11] = 0xff ;
+# ifdef s6_addr32
+ su2->sin6.sin6_addr.s6_addr32[3] = su->sin.sin_addr.s_addr ;
+# else
+ memcpy (&su2->sin6.sin6_addr.s6_addr[12], &su->sin.sin_addr, 4);
+# endif
}
# endif
}