diff options
| author | Donald Sharp <sharpd@cumulusnetworks.com> | 2018-07-30 11:40:02 -0400 | 
|---|---|---|
| committer | Donald Sharp <sharpd@cumulusnetworks.com> | 2018-11-16 09:43:35 -0500 | 
| commit | 6f94b685d0480f7ea427ddfd1c603399dd047aa3 (patch) | |
| tree | 0bd62ffb42a51cf9c27efbf5e686a703748e1b2a /bgpd/bgp_snmp.c | |
| parent | aaafc3216727276a6daf5f2fc5a050b5601e1eb3 (diff) | |
bgpd: Abstract bgp_info retrieving/setting from info pointer
The bgp_info data is stored as a void pointer in `struct bgp_node`.
Abstract retrieval of this data and setting of this data
into functions so that in the future we can move around
what is stored in bgp_node.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'bgpd/bgp_snmp.c')
| -rw-r--r-- | bgpd/bgp_snmp.c | 6 | 
1 files changed, 4 insertions, 2 deletions
diff --git a/bgpd/bgp_snmp.c b/bgpd/bgp_snmp.c index d539fad510..e9ba93bbd4 100644 --- a/bgpd/bgp_snmp.c +++ b/bgpd/bgp_snmp.c @@ -715,7 +715,8 @@ static struct bgp_path_info *bgp4PathAttrLookup(struct variable *v, oid name[],  		if (rn) {  			bgp_unlock_node(rn); -			for (path = rn->info; path; path = path->next) +			for (path = bgp_info_from_node(rn); path; +			     path = path->next)  				if (sockunion_same(&path->peer->su, &su))  					return path;  		} @@ -762,7 +763,8 @@ static struct bgp_path_info *bgp4PathAttrLookup(struct variable *v, oid name[],  		do {  			min = NULL; -			for (path = rn->info; path; path = path->next) { +			for (path = bgp_info_from_node(rn); path; +			     path = path->next) {  				if (path->peer->su.sin.sin_family == AF_INET  				    && ntohl(paddr.s_addr)  					       < ntohl(path->peer->su.sin  | 
