]> git.puffer.fish Git - matthieu/frr.git/commitdiff
[lib] sockopt_tcp_signature: sin6 requires HAVE_IPV6
authorStephen Hemminger <stephen.hemminger@vyatta.com>
Fri, 20 Feb 2009 07:01:41 +0000 (23:01 -0800)
committerPaul Jakma <paul@quagga.net>
Thu, 18 Jun 2009 19:18:27 +0000 (20:18 +0100)
An external user was building on system without IPv6 and
it wouldn't work.

lib/sockopt.c

index d25d371b50a8d228aa16fc70d4501a0646f5b250..96324ffebd91e6fa308fbb950095dbba8fab3e37 100644 (file)
@@ -553,6 +553,7 @@ sockopt_tcp_signature (int sock, union sockunion *su, const char *password)
           return -1;
         };
       
+#ifdef HAVE_IPV6
       /* If this does not work, then all users of this sockopt will need to
        * differentiate between IPv4 and IPv6, and keep seperate sockets for
        * each. 
@@ -569,6 +570,7 @@ sockopt_tcp_signature (int sock, union sockunion *su, const char *password)
            su2->sin6.sin6_addr.s6_addr32[2] = htonl(0xffff);
            memcpy (&su2->sin6.sin6_addr.s6_addr32[3], &su->sin.sin_addr, 4);
         }
+#endif
     }
   
   memset (&md5sig, 0, sizeof (md5sig));