--- embedaddon/quagga/bgpd/bgp_advertise.c 2012/02/21 17:26:11 1.1 +++ embedaddon/quagga/bgpd/bgp_advertise.c 2016/11/02 10:09:10 1.1.1.2 @@ -25,6 +25,7 @@ Software Foundation, Inc., 59 Temple Place - Suite 330 #include "prefix.h" #include "hash.h" #include "thread.h" +#include "filter.h" #include "bgpd/bgpd.h" #include "bgpd/bgp_table.h" @@ -35,7 +36,7 @@ Software Foundation, Inc., 59 Temple Place - Suite 330 #include "bgpd/bgp_packet.h" #include "bgpd/bgp_fsm.h" #include "bgpd/bgp_mplsvpn.h" - + /* BGP advertise attribute is used for pack same attribute update into one packet. To do that we maintain attribute hash in struct peer. */ @@ -79,7 +80,7 @@ baa_hash_cmp (const void *p1, const void *p2) return attrhash_cmp (baa1->attr, baa2->attr); } - + /* BGP update and withdraw information is stored in BGP advertise structure. This structure is referred from BGP adjacency information. */ @@ -151,7 +152,7 @@ bgp_advertise_unintern (struct hash *hash, struct bgp_ baa_free (baa); } } - + /* BGP adjacency keeps minimal advertisement information. */ static void bgp_adj_out_free (struct bgp_adj_out *adj) @@ -327,7 +328,7 @@ bgp_adj_out_remove (struct bgp_node *rn, struct bgp_ad BGP_ADJ_OUT_DEL (rn, adj); bgp_adj_out_free (adj); } - + void bgp_adj_in_set (struct bgp_node *rn, struct peer *peer, struct attr *attr) { @@ -361,7 +362,7 @@ bgp_adj_in_remove (struct bgp_node *rn, struct bgp_adj XFREE (MTYPE_BGP_ADJ_IN, bai); } -void +int bgp_adj_in_unset (struct bgp_node *rn, struct peer *peer) { struct bgp_adj_in *adj; @@ -371,12 +372,13 @@ bgp_adj_in_unset (struct bgp_node *rn, struct peer *pe break; if (! adj) - return; + return 0; bgp_adj_in_remove (rn, adj); bgp_unlock_node (rn); + return 1; } - + void bgp_sync_init (struct peer *peer) {