summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenis Ovsienko <infrastation@yandex.ru>2011-07-17 19:33:21 +0400
committerDenis Ovsienko <infrastation@yandex.ru>2011-07-17 19:33:21 +0400
commitfdc38db248a220dcb80ec0ba1f1981087213651d (patch)
tree8b75aacb6638bdef8c18a75de85904056194d8fd
parent4a1342a56c6fdb90d9af3109afa9442ff0b850d6 (diff)
bgpd: rename SAFI 3 according to RFC4760
- SAFI value 3 is reserved. It was assigned by RFC 2858 for a use that was never fully implemented, so it is deprecated by this document. * zebra.h: rename macro * bgp_fsm.c: (bgp_graceful_restart_timer_expire, bgp_graceful_stale_timer_expire, bgp_stop, bgp_establish): update * bgpd.c: (peer_nsf_stop): update * bgp_open.c: (bgp_capability_vty_out): SAFI 3 isn't a recognized case any more
-rw-r--r--bgpd/bgp_fsm.c8
-rw-r--r--bgpd/bgp_open.c3
-rw-r--r--bgpd/bgpd.c2
-rw-r--r--lib/zebra.h2
4 files changed, 6 insertions, 9 deletions
diff --git a/bgpd/bgp_fsm.c b/bgpd/bgp_fsm.c
index 487ebddb..813e59ef 100644
--- a/bgpd/bgp_fsm.c
+++ b/bgpd/bgp_fsm.c
@@ -355,7 +355,7 @@ bgp_graceful_restart_timer_expire (struct thread *thread)
/* NSF delete stale route */
for (afi = AFI_IP ; afi < AFI_MAX ; afi++)
- for (safi = SAFI_UNICAST ; safi < SAFI_UNICAST_MULTICAST ; safi++)
+ for (safi = SAFI_UNICAST ; safi < SAFI_RESERVED_3 ; safi++)
if (peer->nsf[afi][safi])
bgp_clear_stale_route (peer, afi, safi);
@@ -388,7 +388,7 @@ bgp_graceful_stale_timer_expire (struct thread *thread)
/* NSF delete stale route */
for (afi = AFI_IP ; afi < AFI_MAX ; afi++)
- for (safi = SAFI_UNICAST ; safi < SAFI_UNICAST_MULTICAST ; safi++)
+ for (safi = SAFI_UNICAST ; safi < SAFI_RESERVED_3 ; safi++)
if (peer->nsf[afi][safi])
bgp_clear_stale_route (peer, afi, safi);
@@ -481,7 +481,7 @@ bgp_stop (struct peer *peer)
UNSET_FLAG (peer->sflags, PEER_STATUS_NSF_MODE);
for (afi = AFI_IP ; afi < AFI_MAX ; afi++)
- for (safi = SAFI_UNICAST ; safi < SAFI_UNICAST_MULTICAST ; safi++)
+ for (safi = SAFI_UNICAST ; safi < SAFI_RESERVED_3 ; safi++)
peer->nsf[afi][safi] = 0;
}
@@ -799,7 +799,7 @@ bgp_establish (struct peer *peer)
/* graceful restart */
UNSET_FLAG (peer->sflags, PEER_STATUS_NSF_WAIT);
for (afi = AFI_IP ; afi < AFI_MAX ; afi++)
- for (safi = SAFI_UNICAST ; safi < SAFI_UNICAST_MULTICAST ; safi++)
+ for (safi = SAFI_UNICAST ; safi < SAFI_RESERVED_3 ; safi++)
{
if (peer->afc_nego[afi][safi]
&& CHECK_FLAG (peer->cap, PEER_CAP_RESTART_ADV)
diff --git a/bgpd/bgp_open.c b/bgpd/bgp_open.c
index 21c7e367..31b7369d 100644
--- a/bgpd/bgp_open.c
+++ b/bgpd/bgp_open.c
@@ -93,9 +93,6 @@ bgp_capability_vty_out (struct vty *vty, struct peer *peer)
case SAFI_MULTICAST:
vty_out (vty, "SAFI Multicast");
break;
- case SAFI_UNICAST_MULTICAST:
- vty_out (vty, "SAFI Unicast Multicast");
- break;
case SAFI_MPLS_LABELED_VPN:
vty_out (vty, "SAFI MPLS-labeled VPN");
break;
diff --git a/bgpd/bgpd.c b/bgpd/bgpd.c
index 882fe37c..dafbbf72 100644
--- a/bgpd/bgpd.c
+++ b/bgpd/bgpd.c
@@ -1147,7 +1147,7 @@ peer_nsf_stop (struct peer *peer)
UNSET_FLAG (peer->sflags, PEER_STATUS_NSF_MODE);
for (afi = AFI_IP ; afi < AFI_MAX ; afi++)
- for (safi = SAFI_UNICAST ; safi < SAFI_UNICAST_MULTICAST ; safi++)
+ for (safi = SAFI_UNICAST ; safi < SAFI_RESERVED_3 ; safi++)
peer->nsf[afi][safi] = 0;
if (peer->t_gr_restart)
diff --git a/lib/zebra.h b/lib/zebra.h
index 2dc84514..6d19910c 100644
--- a/lib/zebra.h
+++ b/lib/zebra.h
@@ -504,7 +504,7 @@ extern const char *zserv_command_string (unsigned int command);
/* Subsequent Address Family Identifier. */
#define SAFI_UNICAST 1
#define SAFI_MULTICAST 2
-#define SAFI_UNICAST_MULTICAST 3
+#define SAFI_RESERVED_3 3
#define SAFI_MPLS_VPN 4
#define SAFI_MAX 5