0
0
mirror of https://gitlab.nic.cz/labs/bird.git synced 2025-03-21 22:07:03 +00:00

Merge commit '44a16bff6cbf3f5ae8db21ffcec602bc51295d0a' into thread-next

This commit is contained in:
Ondrej Zajicek 2024-03-28 20:03:46 +01:00
commit 0bcc7a9316
4 changed files with 19 additions and 7 deletions

View File

@ -5967,6 +5967,12 @@ options (<cf/bfd/ and <cf/weight 1/), the second nexthop has just <cf/weight 2/.
that BFD protocol also has to be configured, see <ref id="bfd" name="BFD"> that BFD protocol also has to be configured, see <ref id="bfd" name="BFD">
section for details. Default value is no. section for details. Default value is no.
<tag><label id="static-route-dev">dev <m/text/</tag>
The outgoing interface associated with the nexthop. Useful for
link-local nexthop addresses or when multiple interfaces use the same
network prefix. By default, the outgoing interface is resolved from the
nexthop address.
<tag><label id="static-route-mpls">mpls <m/num/[/<m/num/[/<m/num/[...]]]</tag> <tag><label id="static-route-mpls">mpls <m/num/[/<m/num/[/<m/num/[...]]]</tag>
MPLS labels that should be pushed to packets forwarded by the route. MPLS labels that should be pushed to packets forwarded by the route.
The option could be used for both IP routes (on MPLS ingress routers) The option could be used for both IP routes (on MPLS ingress routers)
@ -6147,7 +6153,8 @@ protocol static {
via 198.51.100.20 bfd # BFD-controlled next hop via 198.51.100.20 bfd # BFD-controlled next hop
via 192.0.2.1; via 192.0.2.1;
route 203.0.113.0/24 blackhole; # Sink route route 203.0.113.0/24 blackhole; # Sink route
route 10.2.0.0/24 via "arc0"; # Secondary network route 10.2.0.0/24 via "arc0"; # Direct route
route 10.2.2.0/24 via 192.0.2.1 dev "eth0" onlink; # Route with both nexthop and iface
route 192.168.10.0/24 via 198.51.100.100 { route 192.168.10.0/24 via 198.51.100.100 {
ospf_metric1 = 20; # Set extended attribute ospf_metric1 = 20; # Set extended attribute
}; };
@ -6166,7 +6173,8 @@ protocol static {
route 2001:db8:10::/48 via 2001:db8:1::1; # Route with global nexthop route 2001:db8:10::/48 via 2001:db8:1::1; # Route with global nexthop
route 2001:db8:20::/48 via fe80::10%eth0; # Route with link-local nexthop route 2001:db8:20::/48 via fe80::10%eth0; # Route with link-local nexthop
route 2001:db8:30::/48 via fe80::20%'eth1.60'; # Iface with non-alphanumeric characters route 2001:db8:30::/48 via fe80::20%'eth1.60'; # Iface with non-alphanumeric characters
route 2001:db8:40::/48 via "eth2"; # Direct route to eth2 route 2001:db8:40::/48 via fe80::30 dev "eth1"; # Another link-local nexthop
route 2001:db8:50::/48 via "eth2"; # Direct route to eth2
route 2001:db8::/32 unreachable; # Unreachable route route 2001:db8::/32 unreachable; # Unreachable route
route ::/0 via 2001:db8:1::1 bfd; # BFD-controlled default route route ::/0 via 2001:db8:1::1 bfd; # BFD-controlled default route
} }

View File

@ -1207,12 +1207,13 @@ bgp_send_hold_timeout(timer *t)
struct bgp_conn *conn = t->data; struct bgp_conn *conn = t->data;
struct bgp_proto *p = conn->bgp; struct bgp_proto *p = conn->bgp;
DBG("BGP: Send hold timeout\n");
if (conn->state == BS_CLOSE) if (conn->state == BS_CLOSE)
return; return;
/* Error codes not yet assigned by IANA */ uint code = 8;
uint code = 4; uint subcode = 0;
uint subcode = 1;
/* Like bgp_error() but without NOTIFICATION */ /* Like bgp_error() but without NOTIFICATION */
bgp_log_error(p, BE_BGP_TX, "Error", code, subcode, NULL, 0); bgp_log_error(p, BE_BGP_TX, "Error", code, subcode, NULL, 0);

View File

@ -3252,7 +3252,6 @@ static struct {
{ 3, 10, "Invalid network field" }, { 3, 10, "Invalid network field" },
{ 3, 11, "Malformed AS_PATH" }, { 3, 11, "Malformed AS_PATH" },
{ 4, 0, "Hold timer expired" }, { 4, 0, "Hold timer expired" },
{ 4, 1, "Send hold timer expired" }, /* Provisional [draft-ietf-idr-bgp-sendholdtimer] */
{ 5, 0, "Finite state machine error" }, /* Subcodes are according to [RFC6608] */ { 5, 0, "Finite state machine error" }, /* Subcodes are according to [RFC6608] */
{ 5, 1, "Unexpected message in OpenSent state" }, { 5, 1, "Unexpected message in OpenSent state" },
{ 5, 2, "Unexpected message in OpenConfirm state" }, { 5, 2, "Unexpected message in OpenConfirm state" },
@ -3267,7 +3266,8 @@ static struct {
{ 6, 7, "Connection collision resolution" }, { 6, 7, "Connection collision resolution" },
{ 6, 8, "Out of Resources" }, { 6, 8, "Out of Resources" },
{ 7, 0, "Invalid ROUTE-REFRESH message" }, /* [RFC7313] */ { 7, 0, "Invalid ROUTE-REFRESH message" }, /* [RFC7313] */
{ 7, 1, "Invalid ROUTE-REFRESH message length" } /* [RFC7313] */ { 7, 1, "Invalid ROUTE-REFRESH message length" }, /* [RFC7313] */
{ 8, 0, "Send hold timer expired" }, /* [draft-ietf-idr-bgp-sendholdtimer] */
}; };
/** /**

View File

@ -87,6 +87,9 @@ stat_nexthop:
this_snh->via = IPA_NONE; this_snh->via = IPA_NONE;
this_snh->iface = if_get_by_name($2); this_snh->iface = if_get_by_name($2);
} }
| stat_nexthop DEV TEXT {
this_snh->iface = if_get_by_name($3);
}
| stat_nexthop MPLS label_stack { | stat_nexthop MPLS label_stack {
this_snh->mls = $3; this_snh->mls = $3;
} }