From f8679d1941437a98f92e6ce4970039e26b77cc2a Mon Sep 17 00:00:00 2001 From: ziggi Date: Sat, 24 Oct 2020 09:52:49 +0000 Subject: [PATCH] update net/frr7 --- net/frr7/files/patch-Makefile.am | 10 ++++++++++ net/frr7/files/patch-lib_zlog.c | 16 ++++++++++++++++ net/frr7/files/patch-tools_frr-reload.py | 20 ++++++++++++++++++++ net/frr7/files/patch-vtysh_vtysh.c | 22 ++++++++++++++++++++++ net/frr7/files/patch-x-Makefile.am | 11 ----------- 5 files changed, 68 insertions(+), 11 deletions(-) create mode 100644 net/frr7/files/patch-Makefile.am create mode 100644 net/frr7/files/patch-lib_zlog.c create mode 100644 net/frr7/files/patch-tools_frr-reload.py create mode 100644 net/frr7/files/patch-vtysh_vtysh.c delete mode 100644 net/frr7/files/patch-x-Makefile.am diff --git a/net/frr7/files/patch-Makefile.am b/net/frr7/files/patch-Makefile.am new file mode 100644 index 00000000..25b0a94b --- /dev/null +++ b/net/frr7/files/patch-Makefile.am @@ -0,0 +1,10 @@ +--- Makefile.am.orig 2020-06-30 11:08:57 UTC ++++ Makefile.am +@@ -134,7 +134,6 @@ include watchfrr/subdir.am + include qpb/subdir.am + include fpm/subdir.am + include grpc/subdir.am +-include tools/subdir.am + include solaris/subdir.am + + include bgpd/subdir.am diff --git a/net/frr7/files/patch-lib_zlog.c b/net/frr7/files/patch-lib_zlog.c new file mode 100644 index 00000000..50f34b7e --- /dev/null +++ b/net/frr7/files/patch-lib_zlog.c @@ -0,0 +1,16 @@ +--- lib/zlog.c.orig 2020-06-30 11:08:57 UTC ++++ lib/zlog.c +@@ -246,10 +246,10 @@ void zlog_tls_buffer_init(void) + fchown(mmfd, zlog_uid, zlog_gid); + + #ifdef HAVE_POSIX_FALLOCATE +- if (posix_fallocate(mmfd, 0, TLS_LOG_BUF_SIZE) < 0) { +-#else +- if (ftruncate(mmfd, TLS_LOG_BUF_SIZE) < 0) { ++ if (posix_fallocate(mmfd, 0, TLS_LOG_BUF_SIZE) != 0) ++ /* note next statement is under above if() */ + #endif ++ if (ftruncate(mmfd, TLS_LOG_BUF_SIZE) < 0) { + zlog_err("failed to allocate thread log buffer \"%s\": %s", + mmpath, strerror(errno)); + goto out_anon_unlink; diff --git a/net/frr7/files/patch-tools_frr-reload.py b/net/frr7/files/patch-tools_frr-reload.py new file mode 100644 index 00000000..1a8591bb --- /dev/null +++ b/net/frr7/files/patch-tools_frr-reload.py @@ -0,0 +1,20 @@ +From 1c23a0aaa1c5d20af50af75b070e93e1eff21222 Mon Sep 17 00:00:00 2001 +From: Paul Manley +Date: Thu, 9 Jul 2020 11:21:16 -0500 +Subject: [PATCH] tools: create sub-context for bfd peers + +add lines starting with 'peer' to the list of sub-contexts that are handled by frr-reload.py. + +https://github.com/FRRouting/frr/issues/6511#issuecomment-655163833 + +Signed-off-by: Paul Manley +--- tools/frr-reload.py.orig 2020-06-30 11:08:57 UTC ++++ tools/frr-reload.py +@@ -496,6 +496,7 @@ end + line.startswith("vnc defaults") or + line.startswith("vnc l2-group") or + line.startswith("vnc nve-group") or ++ line.startswith("peer") or + line.startswith("member pseudowire")): + main_ctx_key = [] + diff --git a/net/frr7/files/patch-vtysh_vtysh.c b/net/frr7/files/patch-vtysh_vtysh.c new file mode 100644 index 00000000..39b9e768 --- /dev/null +++ b/net/frr7/files/patch-vtysh_vtysh.c @@ -0,0 +1,22 @@ +From b727c12aabf1afc2b6e33f8590c9786e349e4fcb Mon Sep 17 00:00:00 2001 +From: Paul Manley +Date: Thu, 9 Jul 2020 11:25:34 -0500 +Subject: [PATCH] vtysh: properly exit BFD_PEER_NODE when marking file + +vtysh needs to be aware of how to properly exit a bfd peer when subsequent commands only succeed in a higher context. + +https://github.com/FRRouting/frr/issues/6511#issuecomment-656166206 + +Signed-off-by: Paul Manley +--- vtysh/vtysh.c.orig 2020-06-30 11:08:57 UTC ++++ vtysh/vtysh.c +@@ -809,6 +809,9 @@ int vtysh_mark_file(const char *filename) + } else if ((prev_node == KEYCHAIN_KEY_NODE) + && (tried == 1)) { + vty_out(vty, "exit\n"); ++ } else if ((prev_node == BFD_PEER_NODE) ++ && (tried == 1)) { ++ vty_out(vty, "exit\n"); + } else if (tried) { + vty_out(vty, "end\n"); + } diff --git a/net/frr7/files/patch-x-Makefile.am b/net/frr7/files/patch-x-Makefile.am deleted file mode 100644 index 176ccb55..00000000 --- a/net/frr7/files/patch-x-Makefile.am +++ /dev/null @@ -1,11 +0,0 @@ ---- ./Makefile.am.orig 2019-06-18 08:10:14.000000000 +0200 -+++ ./Makefile.am 2019-09-28 17:04:41.424055000 +0200 -@@ -122,7 +122,7 @@ - include qpb/subdir.am - include fpm/subdir.am - include grpc/subdir.am --include tools/subdir.am -+##include tools/subdir.am - include solaris/subdir.am - - include bgpd/subdir.am