]> git.puffer.fish Git - mirror/frr.git/commitdiff
bgpd: attribute jhash call should use a standard interface to in6_addr data
authorStephen Hemminger <shemminger@vyatta.com>
Tue, 22 Mar 2011 16:14:57 +0000 (16:14 +0000)
committerPaul Jakma <paul@quagga.net>
Tue, 22 Mar 2011 16:18:44 +0000 (16:18 +0000)
* bgp_attr.c; (attrhash_key_make) s6_addr is only member of in6_addr
  guaranteed to be available - s6_addr32 isn't. Fix to be more portable, and
  thus allow compilation on BSD again.

bgpd/bgp_attr.c

index e2b6054b06b8cdfdb966c9238d5f99091be52cd6..7e302652ce07718366fbd2013c626f74fc51b23f 100644 (file)
@@ -373,8 +373,8 @@ attrhash_key_make (void *p)
 
 #ifdef HAVE_IPV6
       MIX(attr->extra->mp_nexthop_len);
-      key = jhash2(attr->extra->mp_nexthop_global.s6_addr32, 4, key);
-      key = jhash2(attr->extra->mp_nexthop_local.s6_addr32, 4, key);
+      key = jhash2(attr->extra->mp_nexthop_global.s6_addr, 16, key);
+      key = jhash2(attr->extra->mp_nexthop_local.s6_addr, 16, key);
 #endif /* HAVE_IPV6 */
     }