diff options
author | Donald Sharp <sharpd@cumulusnetworks.com> | 2017-04-15 14:42:18 +0200 |
---|---|---|
committer | Donald Sharp <sharpd@cumulusnetworks.com> | 2017-04-15 19:26:56 +0200 |
commit | 95169c2f785d09aebd6c0e25bf311ecc185fb61a (patch) | |
tree | cef2524f6faf7b92f6a68fde726d272db12d975b /zebra | |
parent | lib, bgpd: Remove UNDEFINED_NODE (diff) | |
download | frr-95169c2f785d09aebd6c0e25bf311ecc185fb61a.tar.xz frr-95169c2f785d09aebd6c0e25bf311ecc185fb61a.zip |
zebra: Fix crash with dereference of NULL pointer
We only create the v4 and v6 mpls fec tables currently.
Follow the code pattern for the rest of the code and
ensure that the table exists before we attempt to access it.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'zebra')
-rw-r--r-- | zebra/zebra_mpls.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/zebra/zebra_mpls.c b/zebra/zebra_mpls.c index 42738f8fb..76263024c 100644 --- a/zebra/zebra_mpls.c +++ b/zebra/zebra_mpls.c @@ -372,6 +372,9 @@ fec_evaluate (struct zebra_vrf *zvrf, int add) for (af = AFI_IP; af < AFI_MAX; af++) { + if (zvrf->fec_table[af] == NULL) + continue; + for (rn = route_top(zvrf->fec_table[af]); rn; rn = route_next(rn)) { if ((fec = rn->info) == NULL) |