diff options
| author | Renato Westphal <renato@opensourcerouting.org> | 2018-10-19 15:55:12 -0300 |
|---|---|---|
| committer | Renato Westphal <renato@opensourcerouting.org> | 2018-10-20 12:39:05 -0300 |
| commit | 2eab13249cfea60f5788ac4393d2096e63d19e22 (patch) | |
| tree | 494a6a58bb35ca7c48255b80633db660934b3e24 | |
| parent | 68badf70b19dd0977966f267acf98cd8970260dc (diff) | |
bgpd: fix bug while iterating over VPN table
The routing table data structure can create intermediate route nodes
during its normal operation, so we always need to check if the 'info'
pointer of a route node is NULL or not before dereferencing it.
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
| -rw-r--r-- | bgpd/rfapi/vnc_zebra.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/bgpd/rfapi/vnc_zebra.c b/bgpd/rfapi/vnc_zebra.c index a57f908f62..158c88da16 100644 --- a/bgpd/rfapi/vnc_zebra.c +++ b/bgpd/rfapi/vnc_zebra.c @@ -313,6 +313,8 @@ static void vnc_redistribute_withdraw(struct bgp *bgp, afi_t afi, uint8_t type) /* This is the per-RD table of prefixes */ table = prn->info; + if (!table) + continue; for (rn = bgp_table_top(table); rn; rn = bgp_route_next(rn)) { |
