diff options
Diffstat (limited to 'zebra')
-rw-r--r-- | zebra/zebra_rib.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/zebra/zebra_rib.c b/zebra/zebra_rib.c index a75d7215..4dd8551a 100644 --- a/zebra/zebra_rib.c +++ b/zebra/zebra_rib.c @@ -155,6 +155,9 @@ vrf_table (afi_t afi, safi_t safi, u_int32_t id) if (! vrf) return NULL; + if( afi >= AFI_MAX || safi >= SAFI_MAX ) + return NULL; + return vrf->table[afi][safi]; } @@ -168,6 +171,9 @@ vrf_static_table (afi_t afi, safi_t safi, u_int32_t id) if (! vrf) return NULL; + if( afi >= AFI_MAX || safi >= SAFI_MAX ) + return NULL; + return vrf->stable[afi][safi]; } |