From cea8b6556f86d2fad06fd508cafdd3859056f774 Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Wed, 18 May 2022 14:29:16 -0400 Subject: [PATCH 1/2] bgpd: Allow nht to work when connection succeeds Originally commit: 8761cd6ddb5437767625f58c8e9cc3ccda7887ab implemented the ability for LL nexthop tracking to be interface based. During some more testing the code to make the interface event happen was noticed to not properly run in some cases. This was because it was originally assumed that the connect could not succeed. Testing has shown that the connect can succeed and FRR needs to handle the nht tracking in this case too. Signed-off-by: Donald Sharp --- bgpd/bgp_fsm.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/bgpd/bgp_fsm.c b/bgpd/bgp_fsm.c index cc3505333b..9fe65e4e4b 100644 --- a/bgpd/bgp_fsm.c +++ b/bgpd/bgp_fsm.c @@ -1701,6 +1701,12 @@ static int bgp_connect_success(struct peer *peer) return -1; } + /* + * If we are doing nht for a peer that ls v6 LL based + * massage the event system to make things happy + */ + bgp_nht_interface_events(peer); + bgp_reads_on(peer); if (bgp_debug_neighbor_events(peer)) { @@ -1739,6 +1745,12 @@ static int bgp_connect_success_w_delayopen(struct peer *peer) return -1; } + /* + * If we are doing nht for a peer that ls v6 LL based + * massage the event system to make things happy + */ + bgp_nht_interface_events(peer); + bgp_reads_on(peer); if (bgp_debug_neighbor_events(peer)) { From 1b3cf91b0c841ce8b8d7d047f7d9653a2262ae24 Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Wed, 18 May 2022 14:41:40 -0400 Subject: [PATCH 2/2] zebra: Fix newline in log message Signed-off-by: Donald Sharp --- zebra/kernel_netlink.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zebra/kernel_netlink.c b/zebra/kernel_netlink.c index aa31883dea..1671af15bf 100644 --- a/zebra/kernel_netlink.c +++ b/zebra/kernel_netlink.c @@ -591,7 +591,7 @@ bool nl_addraw_l(struct nlmsghdr *n, unsigned int maxlen, const void *data, unsigned int len) { if (NLMSG_ALIGN(n->nlmsg_len) + NLMSG_ALIGN(len) > maxlen) { - zlog_err("ERROR message exceeded bound of %d\n", maxlen); + zlog_err("ERROR message exceeded bound of %d", maxlen); return false; }