summaryrefslogtreecommitdiff
path: root/zebra/zebra_rib.c
diff options
context:
space:
mode:
Diffstat (limited to 'zebra/zebra_rib.c')
-rw-r--r--zebra/zebra_rib.c6
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];
}