diff options
| author | Stephen Worley <sworley@cumulusnetworks.com> | 2019-02-25 18:18:07 -0500 | 
|---|---|---|
| committer | Stephen Worley <sworley@cumulusnetworks.com> | 2019-10-25 11:13:36 -0400 | 
| commit | d9f5b2f50f53d625986dbd47cd12778c9f841f0c (patch) | |
| tree | 8ecb06f5a9bc83505ed4b4eaa61754eb76238573 /zebra/zebra_router.c | |
| parent | 8b5bdc8bdfdb95d5e22ccb8733dbd35c84f3f79d (diff) | |
zebra: Add functionality to parse RTM_NEWNEXTHOP and RTM_DELNEXTHOP messages
Add the functionality to parse new nexthop group messages
from the kernel and insert them into the appropriate hash
tables. Parsing is done at startup between interface and
interface address lookup. Add functionality to parse
changes to nexthops we already have. Add functionality
to parse delete nexthop messages from the kernel and
remove them from our table.
Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
Diffstat (limited to 'zebra/zebra_router.c')
| -rw-r--r-- | zebra/zebra_router.c | 10 | 
1 files changed, 6 insertions, 4 deletions
diff --git a/zebra/zebra_router.c b/zebra/zebra_router.c index 100d17ecde..408fc16dd1 100644 --- a/zebra/zebra_router.c +++ b/zebra/zebra_router.c @@ -218,6 +218,11 @@ void zebra_router_terminate(void)  	zebra_vxlan_disable();  	zebra_mlag_terminate(); +	hash_clean(zrouter.nhgs, zebra_nhg_free); +	hash_free(zrouter.nhgs); +	hash_clean(zrouter.nhgs_id, NULL); +	hash_free(zrouter.nhgs_id); +  	hash_clean(zrouter.rules_hash, zebra_pbr_rules_free);  	hash_free(zrouter.rules_hash); @@ -254,13 +259,10 @@ void zebra_router_init(void)  						zebra_pbr_iptable_hash_equal,  						"IPtable Hash Entry"); -	/* Index via hash and IDs so we can -	 * easily communicate to/from the kernel -	 */  	zrouter.nhgs =  		hash_create_size(8, zebra_nhg_hash_key, zebra_nhg_hash_equal,  				 "Zebra Router Nexthop Groups");  	zrouter.nhgs_id = -		hash_create_size(8, zebra_nhg_id_key, zebra_nhg_id_equal, +		hash_create_size(8, zebra_nhg_id_key, zebra_nhg_hash_id_equal,  				 "Zebra Router Nexthop Groups ID index");  }  | 
