Without specifying a default afi/safi we get a segfault:
```
(gdb) frame 4
bgp_table_stats (..., afi=32724, safi=SAFI_UNICAST, ...
11349 if (!bgp->rib[afi][safi]) {
(gdb)
```
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
{
bool uj = use_json(argc, argv);
struct bgp *bgp = NULL;
- safi_t safi;
- afi_t afi;
+ safi_t safi = SAFI_UNICAST;
+ afi_t afi = AFI_IP6;
int idx = 0;
struct json_object *json_all = NULL;
struct json_object *json_afi_safi = NULL;
"BGP RIB advertisement statistics\n"
JSON_STR)
{
- afi_t afi;
- safi_t safi;
+ afi_t afi = AFI_IP6;
+ safi_t safi = SAFI_UNICAST;
struct bgp *bgp = NULL;
int idx = 0, ret;
bool uj = use_json(argc, argv);
BGP_SAFI_WITH_LABEL_HELP_STR
"BGP RIB advertisement statistics\n" JSON_STR)
{
- afi_t afi;
- safi_t safi;
+ afi_t afi = AFI_IP6;
+ safi_t safi = SAFI_UNICAST;
struct bgp *bgp = NULL;
int idx = 0, ret;
bool uj = use_json(argc, argv);