]> git.puffer.fish Git - matthieu/frr.git/commitdiff
lib: remove gap between AFI_IP6 and AFI_L2VPN
authorRenato Westphal <renato@opensourcerouting.org>
Fri, 12 May 2017 14:04:31 +0000 (11:04 -0300)
committerRenato Westphal <renato@opensourcerouting.org>
Fri, 12 May 2017 14:48:02 +0000 (11:48 -0300)
We have several pieces of code like this in FRR:

  for (afi = AFI_IP; afi < AFI_MAX; afi++)
    for (safi = SAFI_UNICAST; safi < SAFI_MAX; safi++)
      bgp_distance_table[afi][safi] = bgp_table_init (afi, safi);

We were creating a lot of useless garbage in the code because of this
gap. Fix this.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
lib/zebra.h

index cd72dc67f82feba622212ef9ef8aed4d9068aa79..0cc81bdb7073560fa279cf367e0e13b34783aa21 100644 (file)
@@ -404,8 +404,8 @@ extern const char *zserv_command_string (unsigned int command);
 typedef enum {
   AFI_IP  = 1,
   AFI_IP6 = 2,
-  AFI_L2VPN = 4,
-  AFI_MAX = 5
+  AFI_L2VPN = 3,
+  AFI_MAX = 4
 } afi_t;
 
 /* Subsequent Address Family Identifier. */