summaryrefslogtreecommitdiff
path: root/bgpd
diff options
context:
space:
mode:
Diffstat (limited to 'bgpd')
-rw-r--r--bgpd/ChangeLog7
-rw-r--r--bgpd/bgp_route.c6
-rw-r--r--bgpd/bgp_vty.c41
-rw-r--r--bgpd/bgp_zebra.c4
-rw-r--r--bgpd/bgpd.c12
-rw-r--r--bgpd/bgpd.h2
6 files changed, 48 insertions, 24 deletions
diff --git a/bgpd/ChangeLog b/bgpd/ChangeLog
index c867b9fd..0e2d5282 100644
--- a/bgpd/ChangeLog
+++ b/bgpd/ChangeLog
@@ -1,4 +1,9 @@
-2005-02-02 Akihiro Mizutani <mizutani@net-chef.net
+2005-02-02 Akihiro Mizutani <mizutani@net-chef.net>
+
+ * bgp_route.c, bgp_vty.c, bgp_zebra.c, bgpd.[ch]: "enforce-multihop"
+ -> "disable-connected-check".
+
+2005-02-02 Akihiro Mizutani <mizutani@net-chef.net>
* bgp_fsm.c, bgp_open.c, bgp_packet.c, bgp_route.[ch], bgp_vty.c,
bgpd.[ch]: Add BGP_INFO_STALE flag and end-of-rib support. "bgp
diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c
index 2453cffc..a3be9f0d 100644
--- a/bgpd/bgp_route.c
+++ b/bgpd/bgp_route.c
@@ -1726,7 +1726,7 @@ bgp_update_main (struct peer *peer, struct prefix *p, struct attr *attr,
discard it. */
if (peer_sort (peer) == BGP_PEER_EBGP && peer->ttl == 1
&& ! bgp_nexthop_check_ebgp (afi, &new_attr)
- && ! CHECK_FLAG (peer->flags, PEER_FLAG_ENFORCE_MULTIHOP))
+ && ! CHECK_FLAG (peer->flags, PEER_FLAG_DISABLE_CONNECTED_CHECK))
{
reason = "non-connected next-hop;";
goto filtered;
@@ -1852,7 +1852,7 @@ bgp_update_main (struct peer *peer, struct prefix *p, struct attr *attr,
&& safi == SAFI_UNICAST
&& (peer_sort (peer) == BGP_PEER_IBGP
|| (peer_sort (peer) == BGP_PEER_EBGP && peer->ttl != 1)
- || CHECK_FLAG (peer->flags, PEER_FLAG_ENFORCE_MULTIHOP)))
+ || CHECK_FLAG (peer->flags, PEER_FLAG_DISABLE_CONNECTED_CHECK)))
{
if (bgp_nexthop_lookup (afi, peer, ri, NULL, NULL))
SET_FLAG (ri->flags, BGP_INFO_VALID);
@@ -1899,7 +1899,7 @@ bgp_update_main (struct peer *peer, struct prefix *p, struct attr *attr,
&& safi == SAFI_UNICAST
&& (peer_sort (peer) == BGP_PEER_IBGP
|| (peer_sort (peer) == BGP_PEER_EBGP && peer->ttl != 1)
- || CHECK_FLAG (peer->flags, PEER_FLAG_ENFORCE_MULTIHOP)))
+ || CHECK_FLAG (peer->flags, PEER_FLAG_DISABLE_CONNECTED_CHECK)))
{
if (bgp_nexthop_lookup (afi, peer, new, NULL, NULL))
SET_FLAG (new->flags, BGP_INFO_VALID);
diff --git a/bgpd/bgp_vty.c b/bgpd/bgp_vty.c
index 8ee47c7e..58aec8ed 100644
--- a/bgpd/bgp_vty.c
+++ b/bgpd/bgp_vty.c
@@ -2604,27 +2604,44 @@ ALIAS (no_neighbor_ebgp_multihop,
"Allow EBGP neighbors not on directly connected networks\n"
"maximum hop count\n")
+/* disable-connected-check */
+DEFUN (neighbor_disable_connected_check,
+ neighbor_disable_connected_check_cmd,
+ NEIGHBOR_CMD2 "disable-connected-check",
+ NEIGHBOR_STR
+ NEIGHBOR_ADDR_STR2
+ "one-hop away EBGP peer using loopback address\n")
+{
+ return peer_flag_set_vty (vty, argv[0], PEER_FLAG_DISABLE_CONNECTED_CHECK);
+}
+
+DEFUN (no_neighbor_disable_connected_check,
+ no_neighbor_disable_connected_check_cmd,
+ NO_NEIGHBOR_CMD2 "disable-connected-check",
+ NO_STR
+ NEIGHBOR_STR
+ NEIGHBOR_ADDR_STR2
+ "one-hop away EBGP peer using loopback address\n")
+{
+ return peer_flag_unset_vty (vty, argv[0], PEER_FLAG_DISABLE_CONNECTED_CHECK);
+}
+
/* Enforce multihop. */
-DEFUN (neighbor_enforce_multihop,
+ALIAS (neighbor_disable_connected_check,
neighbor_enforce_multihop_cmd,
NEIGHBOR_CMD2 "enforce-multihop",
NEIGHBOR_STR
NEIGHBOR_ADDR_STR2
- "Enforce EBGP neighbors perform multihop\n")
-{
- return peer_flag_set_vty (vty, argv[0], PEER_FLAG_ENFORCE_MULTIHOP);
-}
+ "Enforce EBGP neighbors perform multihop\n");
-DEFUN (no_neighbor_enforce_multihop,
+/* Enforce multihop. */
+ALIAS (no_neighbor_disable_connected_check,
no_neighbor_enforce_multihop_cmd,
NO_NEIGHBOR_CMD2 "enforce-multihop",
NO_STR
NEIGHBOR_STR
NEIGHBOR_ADDR_STR2
- "Enforce EBGP neighbors perform multihop\n")
-{
- return peer_flag_unset_vty (vty, argv[0], PEER_FLAG_ENFORCE_MULTIHOP);
-}
+ "Enforce EBGP neighbors perform multihop\n");
DEFUN (neighbor_description,
neighbor_description_cmd,
@@ -8918,7 +8935,9 @@ bgp_vty_init ()
install_element (BGP_NODE, &no_neighbor_ebgp_multihop_cmd);
install_element (BGP_NODE, &no_neighbor_ebgp_multihop_ttl_cmd);
- /* "neighbor enforce-multihop" commands. */
+ /* "neighbor disable-connected-check" commands. */
+ install_element (BGP_NODE, &neighbor_disable_connected_check_cmd);
+ install_element (BGP_NODE, &no_neighbor_disable_connected_check_cmd);
install_element (BGP_NODE, &neighbor_enforce_multihop_cmd);
install_element (BGP_NODE, &no_neighbor_enforce_multihop_cmd);
diff --git a/bgpd/bgp_zebra.c b/bgpd/bgp_zebra.c
index 752617d4..f54608a3 100644
--- a/bgpd/bgp_zebra.c
+++ b/bgpd/bgp_zebra.c
@@ -635,7 +635,7 @@ bgp_zebra_announce (struct prefix *p, struct bgp_info *info, struct bgp *bgp)
}
if ((peer_sort (peer) == BGP_PEER_EBGP && peer->ttl != 1)
- || CHECK_FLAG (peer->flags, PEER_FLAG_ENFORCE_MULTIHOP))
+ || CHECK_FLAG (peer->flags, PEER_FLAG_DISABLE_CONNECTED_CHECK))
SET_FLAG (flags, ZEBRA_FLAG_INTERNAL);
if (p->family == AF_INET)
@@ -746,7 +746,7 @@ bgp_zebra_withdraw (struct prefix *p, struct bgp_info *info)
}
if ((peer_sort (peer) == BGP_PEER_EBGP && peer->ttl != 1)
- || CHECK_FLAG (peer->flags, PEER_FLAG_ENFORCE_MULTIHOP))
+ || CHECK_FLAG (peer->flags, PEER_FLAG_DISABLE_CONNECTED_CHECK))
SET_FLAG (flags, ZEBRA_FLAG_INTERNAL);
if (p->family == AF_INET)
diff --git a/bgpd/bgpd.c b/bgpd/bgpd.c
index 279c5467..f3caf46e 100644
--- a/bgpd/bgpd.c
+++ b/bgpd/bgpd.c
@@ -2101,7 +2101,7 @@ struct peer_flag_action peer_flag_action_list[] =
{ PEER_FLAG_OVERRIDE_CAPABILITY, 0, peer_change_none },
{ PEER_FLAG_STRICT_CAP_MATCH, 0, peer_change_none },
{ PEER_FLAG_DYNAMIC_CAPABILITY, 0, peer_change_reset },
- { PEER_FLAG_ENFORCE_MULTIHOP, 0, peer_change_reset },
+ { PEER_FLAG_DISABLE_CONNECTED_CHECK, 0, peer_change_reset },
{ 0, 0, 0 }
};
@@ -2214,7 +2214,7 @@ peer_flag_modify_action (struct peer *peer, u_int32_t flag)
peer->last_reset = PEER_DOWN_CAPABILITY_CHANGE;
else if (flag == PEER_FLAG_PASSIVE)
peer->last_reset = PEER_DOWN_PASSIVE_CHANGE;
- else if (flag == PEER_FLAG_ENFORCE_MULTIHOP)
+ else if (flag == PEER_FLAG_DISABLE_CONNECTED_CHECK)
peer->last_reset = PEER_DOWN_MULTIHOP_CHANGE;
bgp_notify_send (peer, BGP_NOTIFY_CEASE,
@@ -4331,11 +4331,11 @@ bgp_config_write_peer (struct vty *vty, struct bgp *bgp,
vty_out (vty, " neighbor %s ebgp-multihop %d%s", addr, peer->ttl,
VTY_NEWLINE);
- /* Enforce multihop. */
- if (CHECK_FLAG (peer->flags, PEER_FLAG_ENFORCE_MULTIHOP))
+ /* disable-connected-check. */
+ if (CHECK_FLAG (peer->flags, PEER_FLAG_DISABLE_CONNECTED_CHECK))
if (! peer_group_active (peer) ||
- ! CHECK_FLAG (g_peer->flags, PEER_FLAG_ENFORCE_MULTIHOP))
- vty_out (vty, " neighbor %s enforce-multihop%s", addr, VTY_NEWLINE);
+ ! CHECK_FLAG (g_peer->flags, PEER_FLAG_DISABLE_CONNECTED_CHECK))
+ vty_out (vty, " neighbor %s disable-connected-check%s", addr, VTY_NEWLINE);
/* Update-source. */
if (peer->update_if)
diff --git a/bgpd/bgpd.h b/bgpd/bgpd.h
index f8a36274..a6c11ffa 100644
--- a/bgpd/bgpd.h
+++ b/bgpd/bgpd.h
@@ -329,7 +329,7 @@ struct peer
#define PEER_FLAG_OVERRIDE_CAPABILITY (1 << 3) /* override-capability */
#define PEER_FLAG_STRICT_CAP_MATCH (1 << 4) /* strict-match */
#define PEER_FLAG_DYNAMIC_CAPABILITY (1 << 5) /* dynamic capability */
-#define PEER_FLAG_ENFORCE_MULTIHOP (1 << 6) /* enforce-multihop */
+#define PEER_FLAG_DISABLE_CONNECTED_CHECK (1 << 6) /* disable-connected-check */
#define PEER_FLAG_LOCAL_AS_NO_PREPEND (1 << 7) /* local-as no-prepend */
/* NSF mode (graceful restart) */