summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bgpd/bgp_vty.c4
-rw-r--r--doc/user/bgp.rst49
-rw-r--r--doc/user/overview.rst4
-rw-r--r--doc/user/pim.rst7
-rw-r--r--ldpd/lde_lib.c32
-rw-r--r--lib/routemap.c6
-rw-r--r--lib/routemap_cli.c2
-rw-r--r--lib/yang_wrappers.c25
-rw-r--r--pimd/pim_rpf.c1
-rw-r--r--tests/topotests/all-protocol-startup/r1/show_route_map.ref14
-rw-r--r--zebra/rib.h1
-rw-r--r--zebra/zapi_msg.c14
-rw-r--r--zebra/zebra_fpm_netlink.c5
-rw-r--r--zebra/zebra_mpls.c6
-rw-r--r--zebra/zebra_router.c1
15 files changed, 137 insertions, 34 deletions
diff --git a/bgpd/bgp_vty.c b/bgpd/bgp_vty.c
index cfdad6d6c3..c53286cb36 100644
--- a/bgpd/bgp_vty.c
+++ b/bgpd/bgp_vty.c
@@ -4388,7 +4388,7 @@ DEFUN (neighbor_shutdown_msg,
NEIGHBOR_STR
NEIGHBOR_ADDR_STR2
"Administratively shut down this neighbor\n"
- "Add a shutdown message (draft-ietf-idr-shutdown-06)\n"
+ "Add a shutdown message (RFC 8203)\n"
"Shutdown message\n")
{
int idx_peer = 1;
@@ -4420,7 +4420,7 @@ DEFUN (no_neighbor_shutdown_msg,
NEIGHBOR_STR
NEIGHBOR_ADDR_STR2
"Administratively shut down this neighbor\n"
- "Remove a shutdown message (draft-ietf-idr-shutdown-06)\n"
+ "Remove a shutdown message (RFC 8203)\n"
"Shutdown message\n")
{
int idx_peer = 2;
diff --git a/doc/user/bgp.rst b/doc/user/bgp.rst
index 795ca00ecf..cc27bc202d 100644
--- a/doc/user/bgp.rst
+++ b/doc/user/bgp.rst
@@ -1203,14 +1203,16 @@ Defining Peers
Configuring Peers
^^^^^^^^^^^^^^^^^
-.. index:: [no] neighbor PEER shutdown
-.. clicmd:: [no] neighbor PEER shutdown
+.. index:: [no] neighbor PEER shutdown [message MSG...]
+.. clicmd:: [no] neighbor PEER shutdown [message MSG...]
Shutdown the peer. We can delete the neighbor's configuration by
``no neighbor PEER remote-as ASN`` but all configuration of the neighbor
will be deleted. When you want to preserve the configuration, but want to
drop the BGP peer, use this syntax.
+ Optionally you can specify a shutdown message `MSG`.
+
.. index:: [no] neighbor PEER disable-connected-check
.. clicmd:: [no] neighbor PEER disable-connected-check
@@ -1341,6 +1343,49 @@ Configuring Peers
This command is only allowed for eBGP peers.
+.. index:: [no] neighbor <A.B.C.D|X:X::X:X|WORD> as-override
+.. clicmd:: [no] neighbor <A.B.C.D|X:X::X:X|WORD> as-override
+
+ Override AS number of the originating router with the local AS number.
+
+ Usually this configuration is used in PEs (Provider Edge) to replace
+ the incoming customer AS number so the connected CE (Customer Edge)
+ can use the same AS number as the other customer sites. This allows
+ customers of the provider network to use the same AS number across
+ their sites.
+
+ This command is only allowed for eBGP peers.
+
+.. index:: [no] neighbor <A.B.C.D|X:X::X:X|WORD> allowas-in [<(1-10)|origin>]
+.. clicmd:: [no] neighbor <A.B.C.D|X:X::X:X|WORD> allowas-in [<(1-10)|origin>]
+
+ Accept incoming routes with AS path containing AS number with the same value
+ as the current system AS.
+
+ This is used when you want to use the same AS number in your sites, but you
+ can't connect them directly. This is an alternative to
+ `neighbor WORD as-override`.
+
+ The parameter `(1-10)` configures the amount of accepted occurences of the
+ system AS number in AS path.
+
+ The parameter `origin` configures BGP to only accept routes originated with
+ the same AS number as the system.
+
+ This command is only allowed for eBGP peers.
+
+.. index:: [no] neighbor <A.B.C.D|X:X::X:X|WORD> addpath-tx-all-paths
+.. clicmd:: [no] neighbor <A.B.C.D|X:X::X:X|WORD> addpath-tx-all-paths
+
+ Configure BGP to send all known paths to neighbor in order to preserve multi
+ path capabilities inside a network.
+
+.. index:: [no] neighbor <A.B.C.D|X:X::X:X|WORD> addpath-tx-bestpath-per-AS
+.. clicmd:: [no] neighbor <A.B.C.D|X:X::X:X|WORD> addpath-tx-bestpath-per-AS
+
+ Configure BGP to send best known paths to neighbor in order to preserve multi
+ path capabilities inside a network.
+
.. index:: [no] neighbor PEER ttl-security hops NUMBER
.. clicmd:: [no] neighbor PEER ttl-security hops NUMBER
diff --git a/doc/user/overview.rst b/doc/user/overview.rst
index adc20936ed..ac6a1e5a8c 100644
--- a/doc/user/overview.rst
+++ b/doc/user/overview.rst
@@ -290,6 +290,8 @@ BGP
:t:`A Border Gateway Protocol 4 (BGP-4). Updates RFC1771. Y. Rekhter, T. Li & S. Hares. January 2006.`
- :rfc:`4364`
:t:`BGP/MPLS IP Virtual Private Networks (VPNs). Y. Rekhter. Feb 2006.`
+- :rfc:`4486`
+ :t:`Subcodes for BGP Cease Notification Message. E. Chen, V. Gillet. April 2006.`
- :rfc:`4659`
:t:`BGP-MPLS IP Virtual Private Network (VPN) Extension for IPv6 VPN. J. De Clercq, D. Ooms, M. Carugi, F. Le Faucheur. September 2006.`
- :rfc:`4893`
@@ -320,6 +322,8 @@ BGP
:t:`BGP Large Communities Attribute. J. Heitz, Ed., J. Snijders, Ed, K. Patel, I. Bagdonas, N. Hilliard. February 2017`
- :rfc:`8195`
:t:`Use of BGP Large Communities. J. Snijders, J. Heasley, M. Schmidt, June 2017`
+- :rfc:`8203`
+ :t:`BGP Administrative Shutdown Communication. J. Snijders, J. Heitz, J. Scudder. July 2017.`
- :rfc:`8212`
:t:`Default External BGP (EBGP) Route Propagation Behavior without Policies. J. Mauch, J. Snijders, G. Hankins. July 2017`
- :rfc:`8277`
diff --git a/doc/user/pim.rst b/doc/user/pim.rst
index 919dc51f69..d30a5ed647 100644
--- a/doc/user/pim.rst
+++ b/doc/user/pim.rst
@@ -252,6 +252,13 @@ is in a vrf, enter the interface command with the vrf keyword at the end.
reports on the interface. Refer to the next `ip igmp` command for IGMP
management.
+.. index:: [no] ip pim use-source A.B.C.D
+.. clicmd:: [no] ip pim use-source A.B.C.D
+
+ If you have multiple addresses configured on a particular interface
+ and would like pim to use a specific source address associated with
+ that interface.
+
.. index:: ip igmp
.. clicmd:: ip igmp
diff --git a/ldpd/lde_lib.c b/ldpd/lde_lib.c
index 71fb0c7bf2..11d85b7449 100644
--- a/ldpd/lde_lib.c
+++ b/ldpd/lde_lib.c
@@ -856,6 +856,9 @@ lde_check_withdraw(struct map *map, struct lde_nbr *ln)
if (me && (map->label == NO_LABEL || map->label == me->map.label))
/* LWd.4: remove record of previously received lbl mapping */
lde_map_del(ln, me, 0);
+ else
+ /* LWd.13 done */
+ return;
/* Ordered Control: additional withdraw steps */
if (ldeconf->flags & F_LDPD_ORDERED_CONTROL) {
@@ -867,15 +870,17 @@ lde_check_withdraw(struct map *map, struct lde_nbr *ln)
/* LWd.9: check if previously sent a label mapping */
me = (struct lde_map *)fec_find(&lnbr->sent_map,
&fn->fec);
+
/*
* LWd.10: does label sent to peer "map" to withdraw
* label
*/
- if (me)
+ if (me && lde_nbr_is_nexthop(fn, lnbr))
/* LWd.11: send label withdraw */
lde_send_labelwithdraw(lnbr, fn, NULL, NULL);
}
}
+
}
void
@@ -933,24 +938,33 @@ lde_check_withdraw_wcard(struct map *map, struct lde_nbr *ln)
* label mapping
*/
lde_map_del(ln, me, 0);
+ else
+ /* LWd.13 done */
+ continue;
/* Ordered Control: additional withdraw steps */
if (ldeconf->flags & F_LDPD_ORDERED_CONTROL) {
- /* LWd.8: for each neighbor other that src of withdraw msg */
+ /*
+ * LWd.8: for each neighbor other that src of
+ * withdraw msg
+ */
RB_FOREACH(lnbr, nbr_tree, &lde_nbrs) {
if (ln->peerid == lnbr->peerid)
continue;
- /* LWd.9: check if previously sent a label mapping */
- me = (struct lde_map *)fec_find(&lnbr->sent_map,
- &fn->fec);
+ /* LWd.9: check if previously sent a label
+ * mapping
+ */
+ me = (struct lde_map *)fec_find(
+ &lnbr->sent_map, &fn->fec);
/*
- * LWd.10: does label sent to peer "map" to withdraw
- * label
+ * LWd.10: does label sent to peer "map" to
+ * withdraw label
*/
- if (me)
+ if (me && lde_nbr_is_nexthop(fn, lnbr))
/* LWd.11: send label withdraw */
- lde_send_labelwithdraw(lnbr, fn, NULL, NULL);
+ lde_send_labelwithdraw(lnbr, fn, NULL,
+ NULL);
}
}
}
diff --git a/lib/routemap.c b/lib/routemap.c
index 22b4beb79d..df9a6a33ea 100644
--- a/lib/routemap.c
+++ b/lib/routemap.c
@@ -821,9 +821,10 @@ static void vty_show_route_map_entry(struct vty *vty, struct route_map *map)
struct route_map_index *index;
struct route_map_rule *rule;
- vty_out(vty, "route-map: %s Invoked: %" PRIu64 " Optimization: %s\n",
+ vty_out(vty, "route-map: %s Invoked: %" PRIu64 " Optimization: %s Processed Change: %s\n",
map->name, map->applied - map->applied_clear,
- map->optimization_disabled ? "disabled" : "enabled");
+ map->optimization_disabled ? "disabled" : "enabled",
+ map->to_be_processed ? "true" : "false");
for (index = map->head; index; index = index->next) {
vty_out(vty, " %s, sequence %d Invoked %" PRIu64 "\n",
@@ -2412,6 +2413,7 @@ route_map_result_t route_map_apply(struct route_map *map,
for (; index; index = index->next) {
if (!skip_match_clause) {
+ index->applied++;
/* Apply this index. */
match_ret = route_map_apply_match(&index->match_list,
prefix, type, object);
diff --git a/lib/routemap_cli.c b/lib/routemap_cli.c
index 014147c3f8..7fa759252b 100644
--- a/lib/routemap_cli.c
+++ b/lib/routemap_cli.c
@@ -949,7 +949,7 @@ DEFPY_YANG(
DEFPY_YANG(
no_rmap_call, no_rmap_call_cmd,
- "no call",
+ "no call [NAME]",
NO_STR
"Jump to another Route-Map after match+set\n")
{
diff --git a/lib/yang_wrappers.c b/lib/yang_wrappers.c
index 8b0e89d52e..4f743096ee 100644
--- a/lib/yang_wrappers.c
+++ b/lib/yang_wrappers.c
@@ -1203,6 +1203,16 @@ const char *yang_afi_safi_value2identity(afi_t afi, safi_t safi)
return "frr-routing:ipv4-multicast";
if (afi == AFI_IP6 && safi == SAFI_MULTICAST)
return "frr-routing:ipv6-multicast";
+ if (afi == AFI_IP && safi == SAFI_MPLS_VPN)
+ return "frr-routing:l3vpn-ipv4-unicast";
+ if (afi == AFI_IP6 && safi == SAFI_MPLS_VPN)
+ return "frr-routing:l3vpn-ipv6-unicast";
+ if (afi == AFI_L2VPN && safi == SAFI_EVPN)
+ return "frr-routing:l2vpn-evpn";
+ if (afi == AFI_IP && safi == SAFI_LABELED_UNICAST)
+ return "frr-routing:ipv4-labeled-unicast";
+ if (afi == AFI_IP6 && safi == SAFI_LABELED_UNICAST)
+ return "frr-routing:ipv6-labeled-unicast";
return NULL;
}
@@ -1221,6 +1231,21 @@ void yang_afi_safi_identity2value(const char *key, afi_t *afi, safi_t *safi)
} else if (strmatch(key, "frr-routing:ipv6-multicast")) {
*afi = AFI_IP6;
*safi = SAFI_MULTICAST;
+ } else if (strmatch(key, "frr-routing:l3vpn-ipv4-unicast")) {
+ *afi = AFI_IP;
+ *safi = SAFI_MPLS_VPN;
+ } else if (strmatch(key, "frr-routing:l3vpn-ipv6-unicast")) {
+ *afi = AFI_IP6;
+ *safi = SAFI_MPLS_VPN;
+ } else if (strmatch(key, "frr-routing:ipv4-labeled-unicast")) {
+ *afi = AFI_IP;
+ *safi = SAFI_LABELED_UNICAST;
+ } else if (strmatch(key, "frr-routing:ipv6-labeled-unicast")) {
+ *afi = AFI_IP6;
+ *safi = SAFI_LABELED_UNICAST;
+ } else if (strmatch(key, "frr-routing:l2vpn-evpn")) {
+ *afi = AFI_L2VPN;
+ *safi = SAFI_EVPN;
} else {
*afi = AFI_UNSPEC;
*safi = SAFI_UNSPEC;
diff --git a/pimd/pim_rpf.c b/pimd/pim_rpf.c
index f971520c86..043ccdb848 100644
--- a/pimd/pim_rpf.c
+++ b/pimd/pim_rpf.c
@@ -346,6 +346,7 @@ void pim_upstream_rpf_clear(struct pim_instance *pim,
struct pim_upstream *up)
{
if (up->rpf.source_nexthop.interface) {
+ pim_upstream_switch(pim, up, PIM_UPSTREAM_NOTJOINED);
up->rpf.source_nexthop.interface = NULL;
up->rpf.source_nexthop.mrib_nexthop_addr.u.prefix4.s_addr =
PIM_NET_INADDR_ANY;
diff --git a/tests/topotests/all-protocol-startup/r1/show_route_map.ref b/tests/topotests/all-protocol-startup/r1/show_route_map.ref
index f95c48b7d7..612d0a729d 100644
--- a/tests/topotests/all-protocol-startup/r1/show_route_map.ref
+++ b/tests/topotests/all-protocol-startup/r1/show_route_map.ref
@@ -1,5 +1,5 @@
ZEBRA:
-route-map: LIES Invoked: 0 Optimization: enabled
+route-map: LIES Invoked: 0 Optimization: enabled Processed Change: false
deny, sequence 10 Invoked 0
Match clauses:
interface notpresent
@@ -8,7 +8,7 @@ route-map: LIES Invoked: 0 Optimization: enabled
Action:
Exit routemap
RIP:
-route-map: LIES Invoked: 0 Optimization: enabled
+route-map: LIES Invoked: 0 Optimization: enabled Processed Change: false
deny, sequence 10 Invoked 0
Match clauses:
interface notpresent
@@ -17,7 +17,7 @@ route-map: LIES Invoked: 0 Optimization: enabled
Action:
Exit routemap
RIPNG:
-route-map: LIES Invoked: 0 Optimization: enabled
+route-map: LIES Invoked: 0 Optimization: enabled Processed Change: false
deny, sequence 10 Invoked 0
Match clauses:
interface notpresent
@@ -26,7 +26,7 @@ route-map: LIES Invoked: 0 Optimization: enabled
Action:
Exit routemap
OSPF:
-route-map: LIES Invoked: 0 Optimization: enabled
+route-map: LIES Invoked: 0 Optimization: enabled Processed Change: false
deny, sequence 10 Invoked 0
Match clauses:
interface notpresent
@@ -35,7 +35,7 @@ route-map: LIES Invoked: 0 Optimization: enabled
Action:
Exit routemap
OSPF6:
-route-map: LIES Invoked: 0 Optimization: enabled
+route-map: LIES Invoked: 0 Optimization: enabled Processed Change: false
deny, sequence 10 Invoked 0
Match clauses:
interface notpresent
@@ -44,7 +44,7 @@ route-map: LIES Invoked: 0 Optimization: enabled
Action:
Exit routemap
BGP:
-route-map: LIES Invoked: 0 Optimization: enabled
+route-map: LIES Invoked: 0 Optimization: enabled Processed Change: false
deny, sequence 10 Invoked 0
Match clauses:
interface notpresent
@@ -52,7 +52,7 @@ route-map: LIES Invoked: 0 Optimization: enabled
Call clause:
Action:
Exit routemap
-route-map: bgp-map Invoked: 0 Optimization: enabled
+route-map: bgp-map Invoked: 0 Optimization: enabled Processed Change: false
permit, sequence 10 Invoked 0
Match clauses:
Set clauses:
diff --git a/zebra/rib.h b/zebra/rib.h
index 6ec9241b73..b9f4e56905 100644
--- a/zebra/rib.h
+++ b/zebra/rib.h
@@ -300,6 +300,7 @@ struct rib_table_info {
struct zebra_vrf *zvrf;
afi_t afi;
safi_t safi;
+ uint32_t table_id;
};
enum rib_tables_iter_state {
diff --git a/zebra/zapi_msg.c b/zebra/zapi_msg.c
index 33972681f8..2ca3e82fac 100644
--- a/zebra/zapi_msg.c
+++ b/zebra/zapi_msg.c
@@ -729,9 +729,10 @@ static int route_notify_internal(const struct prefix *p, int type,
char buff[PREFIX_STRLEN];
zlog_debug(
- "Not Notifying Owner: %u about prefix %s(%u) %d vrf: %u",
- type, prefix2str(p, buff, sizeof(buff)),
- table_id, note, vrf_id);
+ "Not Notifying Owner: %s about prefix %s(%u) %d vrf: %u",
+ zebra_route_string(type),
+ prefix2str(p, buff, sizeof(buff)), table_id,
+ note, vrf_id);
}
return 0;
}
@@ -739,9 +740,10 @@ static int route_notify_internal(const struct prefix *p, int type,
if (IS_ZEBRA_DEBUG_PACKET) {
char buff[PREFIX_STRLEN];
- zlog_debug("Notifying Owner: %u about prefix %s(%u) %d vrf: %u",
- type, prefix2str(p, buff, sizeof(buff)),
- table_id, note, vrf_id);
+ zlog_debug("Notifying Owner: %s about prefix %s(%u) %d vrf: %u",
+ zebra_route_string(type),
+ prefix2str(p, buff, sizeof(buff)), table_id, note,
+ vrf_id);
}
s = stream_new(ZEBRA_MAX_PACKET_SIZ);
diff --git a/zebra/zebra_fpm_netlink.c b/zebra/zebra_fpm_netlink.c
index 5831093b50..3e11d53b16 100644
--- a/zebra/zebra_fpm_netlink.c
+++ b/zebra/zebra_fpm_netlink.c
@@ -279,7 +279,6 @@ static int netlink_route_info_fill(struct netlink_route_info *ri, int cmd,
rib_dest_t *dest, struct route_entry *re)
{
struct nexthop *nexthop;
- struct zebra_vrf *zvrf;
memset(ri, 0, sizeof(*ri));
@@ -287,9 +286,7 @@ static int netlink_route_info_fill(struct netlink_route_info *ri, int cmd,
ri->af = rib_dest_af(dest);
ri->nlmsg_type = cmd;
- zvrf = rib_dest_vrf(dest);
- if (zvrf)
- ri->rtm_table = zvrf->table_id;
+ ri->rtm_table = rib_table_info(rib_dest_table(dest))->table_id;
ri->rtm_protocol = RTPROT_UNSPEC;
/*
diff --git a/zebra/zebra_mpls.c b/zebra/zebra_mpls.c
index f905036323..1ac7bc7a2a 100644
--- a/zebra/zebra_mpls.c
+++ b/zebra/zebra_mpls.c
@@ -3321,7 +3321,7 @@ lsp_add_nhlfe(zebra_lsp_t *lsp, enum lsp_types_t type,
/*
* Install an LSP and forwarding entry; used primarily
- * from zapi message processing.
+ * from vrf zapi message processing.
*/
int mpls_lsp_install(struct zebra_vrf *zvrf, enum lsp_types_t type,
mpls_label_t in_label, uint8_t num_out_labels,
@@ -3381,6 +3381,10 @@ static int lsp_znh_install(zebra_lsp_t *lsp, enum lsp_types_t type,
memcpy(nhlfe->nexthop->backup_idx, znh->backup_idx,
znh->backup_num);
SET_FLAG(nhlfe->nexthop->flags, NEXTHOP_FLAG_HAS_BACKUP);
+ } else {
+ /* Ensure there's no stale backup info */
+ UNSET_FLAG(nhlfe->nexthop->flags, NEXTHOP_FLAG_HAS_BACKUP);
+ nhlfe->nexthop->backup_num = 0;
}
/* Queue LSP for processing. */
diff --git a/zebra/zebra_router.c b/zebra/zebra_router.c
index 61fef8779f..66f2924555 100644
--- a/zebra/zebra_router.c
+++ b/zebra/zebra_router.c
@@ -133,6 +133,7 @@ struct route_table *zebra_router_get_table(struct zebra_vrf *zvrf,
info->zvrf = zvrf;
info->afi = afi;
info->safi = safi;
+ info->table_id = tableid;
route_table_set_info(zrt->table, info);
zrt->table->cleanup = zebra_rtable_node_cleanup;