diff options
| -rw-r--r-- | doc/user/bgp.rst | 32 | ||||
| -rw-r--r-- | pathd/path_cli.c | 2 | ||||
| -rw-r--r-- | zebra/rib.h | 4 | ||||
| -rw-r--r-- | zebra/rt_netlink.c | 4 | ||||
| -rw-r--r-- | zebra/zebra_rib.c | 10 |
5 files changed, 44 insertions, 8 deletions
diff --git a/doc/user/bgp.rst b/doc/user/bgp.rst index 0782461670..e0e16aaeeb 100644 --- a/doc/user/bgp.rst +++ b/doc/user/bgp.rst @@ -798,6 +798,38 @@ The following functionality is provided by graceful restart: <---------------------------------------------------------------------> +.. _bgp-GR-preserve-forwarding-state: + +BGP-GR Preserve-Forwarding State +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +BGP OPEN message carrying optional capabilities for Graceful Restart has +8 bit “Flags for Address Family” for given AFI and SAFI. This field contains +bit flags relating to routes that were advertised with the given AFI and SAFI. + +.. code-block:: frr + + 0 1 2 3 4 5 6 7 + +-+-+-+-+-+-+-+-+ + |F| Reserved | + +-+-+-+-+-+-+-+-+ + +The most significant bit is defined as the Forwarding State (F) bit, which +can be used to indicate whether the forwarding state for routes that were +advertised with the given AFI and SAFI has indeed been preserved during the +previous BGP restart. When set (value 1), the bit indicates that the +forwarding state has been preserved. +The remaining bits are reserved and MUST be set to zero by the sender and +ignored by the receiver. + +.. index:: bgp graceful-restart preserve-fw-state +.. clicmd:: bgp graceful-restart preserve-fw-state + +FRR gives us the option to enable/disable the "F" flag using this specific +vty command. However, it doesn't have the option to enable/disable +this flag only for specific AFI/SAFI i.e. when this command is used, it +applied to all the supported AFI/SAFI combinations for this peer. + .. _bgp-end-of-rib-message: End-of-RIB (EOR) message diff --git a/pathd/path_cli.c b/pathd/path_cli.c index a55e6ba406..8beb428135 100644 --- a/pathd/path_cli.c +++ b/pathd/path_cli.c @@ -550,7 +550,7 @@ DEFPY_NOSH( "Symbolic Name\n" "Dynamic Path\n") { - char xpath[XPATH_CANDIDATE_BASELEN]; + char xpath[XPATH_MAXLEN + XPATH_CANDIDATE_BASELEN]; int ret; snprintf(xpath, sizeof(xpath), "%s/candidate-path[preference='%s']", diff --git a/zebra/rib.h b/zebra/rib.h index c385d7326c..d653425f0d 100644 --- a/zebra/rib.h +++ b/zebra/rib.h @@ -343,8 +343,8 @@ int route_entry_update_nhe(struct route_entry *re, struct nhg_hash_entry *new_nhghe); /* NHG replace has happend, we have to update route_entry pointers to new one */ -void rib_handle_nhg_replace(struct nhg_hash_entry *old, - struct nhg_hash_entry *new); +void rib_handle_nhg_replace(struct nhg_hash_entry *old_entry, + struct nhg_hash_entry *new_entry); #define route_entry_dump(prefix, src, re) _route_entry_dump(__func__, prefix, src, re) extern void _route_entry_dump(const char *func, union prefixconstptr pp, diff --git a/zebra/rt_netlink.c b/zebra/rt_netlink.c index 1ff1afac93..c1a0e6ccd1 100644 --- a/zebra/rt_netlink.c +++ b/zebra/rt_netlink.c @@ -266,6 +266,10 @@ static inline int zebra2proto(int proto) case ZEBRA_ROUTE_NHG: proto = RTPROT_ZEBRA; break; + case ZEBRA_ROUTE_CONNECT: + case ZEBRA_ROUTE_KERNEL: + proto = RTPROT_KERNEL; + break; default: /* * When a user adds a new protocol this will show up diff --git a/zebra/zebra_rib.c b/zebra/zebra_rib.c index f4be9a8504..1f92c43a69 100644 --- a/zebra/zebra_rib.c +++ b/zebra/zebra_rib.c @@ -250,8 +250,8 @@ done: return ret; } -void rib_handle_nhg_replace(struct nhg_hash_entry *old, - struct nhg_hash_entry *new) +void rib_handle_nhg_replace(struct nhg_hash_entry *old_entry, + struct nhg_hash_entry *new_entry) { struct zebra_router_table *zrt; struct route_node *rn; @@ -259,15 +259,15 @@ void rib_handle_nhg_replace(struct nhg_hash_entry *old, if (IS_ZEBRA_DEBUG_RIB_DETAILED || IS_ZEBRA_DEBUG_NHG_DETAIL) zlog_debug("%s: replacing routes nhe (%u) OLD %p NEW %p", - __func__, new->id, new, old); + __func__, new_entry->id, new_entry, old_entry); /* We have to do them ALL */ RB_FOREACH (zrt, zebra_router_table_head, &zrouter.tables) { for (rn = route_top(zrt->table); rn; rn = srcdest_route_next(rn)) { RNODE_FOREACH_RE_SAFE (rn, re, next) { - if (re->nhe && re->nhe == old) - route_entry_update_nhe(re, new); + if (re->nhe && re->nhe == old_entry) + route_entry_update_nhe(re, new_entry); } } } |
