diff options
author | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2008-10-13 12:12:33 -0700 |
---|---|---|
committer | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2008-10-13 12:12:33 -0700 |
commit | d3e384e4f00aa90db4310f82f3cbe6528e256334 (patch) | |
tree | 716c9dfa64dd9fdc4b05b377a2a19b7b216c4856 /bgpd/bgp_attr.c | |
parent | d0cee3d3d7267f8f5c1d1ffd5c5fd8802a9db987 (diff) | |
parent | 41dc3488cf127a1e23333459a0c316ded67f7ff3 (diff) | |
download | quagga-d3e384e4f00aa90db4310f82f3cbe6528e256334.tar.bz2 quagga-d3e384e4f00aa90db4310f82f3cbe6528e256334.tar.xz |
Merge branch 'master' of /home/shemminger/src/quagga into upstream
Resolve all conflicts by using upstream version.
Diffstat (limited to 'bgpd/bgp_attr.c')
-rw-r--r-- | bgpd/bgp_attr.c | 46 |
1 files changed, 43 insertions, 3 deletions
diff --git a/bgpd/bgp_attr.c b/bgpd/bgp_attr.c index 752099d1..217e0cba 100644 --- a/bgpd/bgp_attr.c +++ b/bgpd/bgp_attr.c @@ -131,15 +131,29 @@ cluster_hash_key_make (void *p) } static int +<<<<<<< HEAD:bgpd/bgp_attr.c cluster_hash_cmp (void *p1, void *p2) +======= +cluster_hash_cmp (const void *p1, const void *p2) +>>>>>>> 41dc3488cf127a1e23333459a0c316ded67f7ff3:bgpd/bgp_attr.c { +<<<<<<< HEAD:bgpd/bgp_attr.c struct cluster_list * cluster1 = (struct cluster_list *) p1; struct cluster_list * cluster2 = (struct cluster_list *) p2; +======= + const struct cluster_list * cluster1 = p1; + const struct cluster_list * cluster2 = p2; +>>>>>>> 41dc3488cf127a1e23333459a0c316ded67f7ff3:bgpd/bgp_attr.c +<<<<<<< HEAD:bgpd/bgp_attr.c if (cluster1->length == cluster2->length && memcmp (cluster1->list, cluster2->list, cluster1->length) == 0) return 1; return 0; +======= + return (cluster1->length == cluster2->length && + memcmp (cluster1->list, cluster2->list, cluster1->length) == 0); +>>>>>>> 41dc3488cf127a1e23333459a0c316ded67f7ff3:bgpd/bgp_attr.c } static void @@ -267,15 +281,29 @@ transit_hash_key_make (void *p) } static int +<<<<<<< HEAD:bgpd/bgp_attr.c transit_hash_cmp (void *p1, void *p2) +======= +transit_hash_cmp (const void *p1, const void *p2) +>>>>>>> 41dc3488cf127a1e23333459a0c316ded67f7ff3:bgpd/bgp_attr.c { +<<<<<<< HEAD:bgpd/bgp_attr.c struct transit * transit1 = (struct transit *) p1; struct transit * transit2 = (struct transit *) p2; +======= + const struct transit * transit1 = p1; + const struct transit * transit2 = p2; +>>>>>>> 41dc3488cf127a1e23333459a0c316ded67f7ff3:bgpd/bgp_attr.c +<<<<<<< HEAD:bgpd/bgp_attr.c if (transit1->length == transit2->length && memcmp (transit1->val, transit2->val, transit1->length) == 0) return 1; return 0; +======= + return (transit1->length == transit2->length && + memcmp (transit1->val, transit2->val, transit1->length) == 0); +>>>>>>> 41dc3488cf127a1e23333459a0c316ded67f7ff3:bgpd/bgp_attr.c } static void @@ -393,10 +421,19 @@ attrhash_key_make (void *p) } int +<<<<<<< HEAD:bgpd/bgp_attr.c attrhash_cmp (void *p1, void *p2) +======= +attrhash_cmp (const void *p1, const void *p2) +>>>>>>> 41dc3488cf127a1e23333459a0c316ded67f7ff3:bgpd/bgp_attr.c { +<<<<<<< HEAD:bgpd/bgp_attr.c struct attr * attr1 = (struct attr *) p1; struct attr * attr2 = (struct attr *) p2; +======= + const struct attr * attr1 = p1; + const struct attr * attr2 = p2; +>>>>>>> 41dc3488cf127a1e23333459a0c316ded67f7ff3:bgpd/bgp_attr.c if (attr1->flag == attr2->flag && attr1->origin == attr2->origin @@ -408,8 +445,13 @@ attrhash_cmp (void *p1, void *p2) && attr1->pathlimit.ttl == attr2->pathlimit.ttl && attr1->pathlimit.as == attr2->pathlimit.as) { +<<<<<<< HEAD:bgpd/bgp_attr.c struct attr_extra *ae1 = attr1->extra; struct attr_extra *ae2 = attr2->extra; +======= + const struct attr_extra *ae1 = attr1->extra; + const struct attr_extra *ae2 = attr2->extra; +>>>>>>> 41dc3488cf127a1e23333459a0c316ded67f7ff3:bgpd/bgp_attr.c if (ae1 && ae2 && ae1->aggregator_as == ae2->aggregator_as @@ -435,7 +477,7 @@ attrhash_cmp (void *p1, void *p2) } static void -attrhash_init () +attrhash_init (void) { attrhash = hash_create (attrhash_key_make, attrhash_cmp); } @@ -2302,8 +2344,6 @@ bgp_packet_withdraw (struct peer *peer, struct stream *s, struct prefix *p, void bgp_attr_init (void) { - void attrhash_init (); - aspath_init (); attrhash_init (); community_init (); |