[quagga-dev 8569] [PATCH] bgpd: use portable jhash

Stephen Hemminger shemminger at vyatta.com
Mon Mar 21 22:36:09 GMT 2011


The use of s6_addr32 is non-portable, so use s6_addr.
This is just slightly slower.

--- a/bgpd/bgp_attr.c	2011-03-21 15:29:44.130904076 -0700
+++ b/bgpd/bgp_attr.c	2011-03-21 15:32:54.053309471 -0700
@@ -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 = jhash(attr->extra->mp_nexthop_global.s6_addr, 16, key);
+      key = jhash(attr->extra->mp_nexthop_local.s6_addr, 16, key);
 #endif /* HAVE_IPV6 */
     }
 



-- 



More information about the Quagga-dev mailing list