diff options
author | Christian Poessinger <christian@poessinger.com> | 2020-10-28 20:24:15 +0100 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2020-10-28 20:24:15 +0100 |
commit | 1040a4bdf7e0d1ccd70bf653d11a58de9bb0e09d (patch) | |
tree | c98c303fad08aa11bd6316236e61afc6044a55a4 | |
parent | c6f83de5bfa0262bd76882dc92dcd55f90fa0074 (diff) | |
download | vyos-build-1040a4bdf7e0d1ccd70bf653d11a58de9bb0e09d.tar.gz vyos-build-1040a4bdf7e0d1ccd70bf653d11a58de9bb0e09d.zip |
frr: drop custom patches as they are now part of upstream repox
5 files changed, 13 insertions, 226 deletions
diff --git a/packages/frr/Jenkinsfile b/packages/frr/Jenkinsfile index 245519bd..65803092 100644 --- a/packages/frr/Jenkinsfile +++ b/packages/frr/Jenkinsfile @@ -22,7 +22,7 @@ def pkgList = [ ['name': 'frr', - 'scmCommit': 'frr-7.3.1', + 'scmCommit': 'stable/7.3', 'scmUrl': 'https://github.com/FRRouting/frr.git', 'buildCmd': '''cd ..; ./build-frr.sh'''], ] diff --git a/packages/frr/build-frr.sh b/packages/frr/build-frr.sh index 477c41e3..d6ea62b4 100755 --- a/packages/frr/build-frr.sh +++ b/packages/frr/build-frr.sh @@ -16,17 +16,18 @@ fi cd ${FRR_SRC} PATCH_DIR=${CWD}/patches - -echo "I: Apply FRRouting patches not in main repository:" -for patch in $(ls ${PATCH_DIR}) -do - if [ -z "$(git config --list | grep -e user.name -e user.email)" ]; then - # if git user.name and user.email is not set, -c sets temorary user.name and - # user.email variables as these is not set in the build container by default. - OPTS="-c user.name=VyOS-CI -c user.email=maintainers@vyos.io" - fi - git $OPTS am ${PATCH_DIR}/${patch} -done +if [ -d $PATCH_DIR ]; then + echo "I: Apply FRRouting patches not in main repository:" + for patch in $(ls ${PATCH_DIR}) + do + if [ -z "$(git config --list | grep -e user.name -e user.email)" ]; then + # if git user.name and user.email is not set, -c sets temorary user.name and + # user.email variables as these is not set in the build container by default. + OPTS="-c user.name=VyOS-CI -c user.email=maintainers@vyos.io" + fi + git $OPTS am ${PATCH_DIR}/${patch} + done +fi # Prepare FRR source for building echo "I: Prepare FRR source for building" diff --git a/packages/frr/patches/0001-Fix-6062-frr-reload-always-seems-to-reapply-configs.patch b/packages/frr/patches/0001-Fix-6062-frr-reload-always-seems-to-reapply-configs.patch deleted file mode 100644 index ce74b25a..00000000 --- a/packages/frr/patches/0001-Fix-6062-frr-reload-always-seems-to-reapply-configs.patch +++ /dev/null @@ -1,31 +0,0 @@ -From d3851bdceff09301e110f839af7878e1fb4607c8 Mon Sep 17 00:00:00 2001 -From: Runar Borge <runar@borge.nu> -Date: Thu, 25 Jun 2020 20:14:47 +0200 -Subject: [PATCH] Fix #6062 frr-reload always seems to reapply configs - -https://github.com/FRRouting/frr/issues/6062 -dteach-rv commented on 30 Apr -It looks like there was a concerted effort to handle the vtysh -> stderr output -change in frr-reload.py. But the subprocess call in def load-from_show_running -was missed, which is why frr-reload.py is trying to re-add every command. -It's comparing the file config to an empty running config. ---- - tools/frr-reload.py | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/tools/frr-reload.py b/tools/frr-reload.py -index 3e97635df..f4eb8400e 100755 ---- a/tools/frr-reload.py -+++ b/tools/frr-reload.py -@@ -155,7 +155,7 @@ class Config(object): - try: - config_text = subprocess.check_output( - bindir + "/vtysh --config_dir " + confdir + " -c 'show run " + daemon + "' | /usr/bin/tail -n +4 | " + bindir + "/vtysh --config_dir " + confdir + " -m -f -", -- shell=True) -+ shell=True, stderr=subprocess.STDOUT) - except subprocess.CalledProcessError as e: - ve = VtyshMarkException(e) - ve.output = e.output --- -2.25.1 - diff --git a/packages/frr/patches/0002-ospf6d-decimal-area-format-in-interface-command.patch b/packages/frr/patches/0002-ospf6d-decimal-area-format-in-interface-command.patch deleted file mode 100644 index 570ebd57..00000000 --- a/packages/frr/patches/0002-ospf6d-decimal-area-format-in-interface-command.patch +++ /dev/null @@ -1,146 +0,0 @@ -From de842255f9a1930d7f927e94e7ea800bcfd1434c Mon Sep 17 00:00:00 2001 -From: Patrick Ruddy <pruddy@vyatta.att-mail.com> -Date: Wed, 3 Oct 2018 18:22:34 +0100 -Subject: [PATCH] ospf6d: decimal area format in interface command - -The ospf6 "interface <blah> area <x>" command only allows the area to -be specified in the ipv4 address format, whereas the show run command -always shows it in the format in which the area was created. This causes -the frr-reload script to be unable to remove ospfv3 interfaces when the -area was created in decimal format. The solution is to allow both formats -to be configured as they can be for other area commands. - -Signed-off-by: Duncan Eastoe <duncan.eastoe@att.com> ---- - ospf6d/ospf6_area.c | 16 ---------------- - ospf6d/ospf6_area.h | 15 +++++++++++++++ - ospf6d/ospf6_top.c | 23 +++++++---------------- - 3 files changed, 22 insertions(+), 32 deletions(-) - -diff --git a/ospf6d/ospf6_area.c b/ospf6d/ospf6_area.c -index 9fe077b54..713ce26ec 100644 ---- a/ospf6d/ospf6_area.c -+++ b/ospf6d/ospf6_area.c -@@ -379,22 +379,6 @@ void ospf6_area_show(struct vty *vty, struct ospf6_area *oa) - vty_out(vty, "SPF has not been run\n"); - } - -- --#define OSPF6_CMD_AREA_GET(str, oa) \ -- { \ -- char *ep; \ -- uint32_t area_id = htonl(strtoul(str, &ep, 10)); \ -- if (*ep && inet_pton(AF_INET, str, &area_id) != 1) { \ -- vty_out(vty, "Malformed Area-ID: %s\n", str); \ -- return CMD_SUCCESS; \ -- } \ -- int format = !*ep ? OSPF6_AREA_FMT_DECIMAL \ -- : OSPF6_AREA_FMT_DOTTEDQUAD; \ -- oa = ospf6_area_lookup(area_id, ospf6); \ -- if (oa == NULL) \ -- oa = ospf6_area_create(area_id, ospf6, format); \ -- } -- - DEFUN (area_range, - area_range_cmd, - "area <A.B.C.D|(0-4294967295)> range X:X::X:X/M [<advertise|not-advertise|cost (0-16777215)>]", -diff --git a/ospf6d/ospf6_area.h b/ospf6d/ospf6_area.h -index 5648b1dfe..7ce6717fc 100644 ---- a/ospf6d/ospf6_area.h -+++ b/ospf6d/ospf6_area.h -@@ -117,6 +117,21 @@ struct ospf6_area { - #define IS_AREA_TRANSIT(oa) (CHECK_FLAG ((oa)->flag, OSPF6_AREA_TRANSIT)) - #define IS_AREA_STUB(oa) (CHECK_FLAG ((oa)->flag, OSPF6_AREA_STUB)) - -+#define OSPF6_CMD_AREA_GET(str, oa) \ -+ { \ -+ char *ep; \ -+ uint32_t area_id = htonl(strtoul(str, &ep, 10)); \ -+ if (*ep && inet_pton(AF_INET, str, &area_id) != 1) { \ -+ vty_out(vty, "Malformed Area-ID: %s\n", str); \ -+ return CMD_SUCCESS; \ -+ } \ -+ int format = !*ep ? OSPF6_AREA_FMT_DECIMAL \ -+ : OSPF6_AREA_FMT_DOTTEDQUAD; \ -+ oa = ospf6_area_lookup(area_id, ospf6); \ -+ if (oa == NULL) \ -+ oa = ospf6_area_create(area_id, ospf6, format); \ -+ } -+ - /* prototypes */ - extern int ospf6_area_cmp(void *va, void *vb); - -diff --git a/ospf6d/ospf6_top.c b/ospf6d/ospf6_top.c -index dd672dd1c..f49ea9add 100644 ---- a/ospf6d/ospf6_top.c -+++ b/ospf6d/ospf6_top.c -@@ -644,11 +644,12 @@ DEFUN (no_ospf6_distance_source, - - DEFUN (ospf6_interface_area, - ospf6_interface_area_cmd, -- "interface IFNAME area A.B.C.D", -+ "interface IFNAME area <A.B.C.D|(0-4294967295)>", - "Enable routing on an IPv6 interface\n" - IFNAME_STR - "Specify the OSPF6 area ID\n" - "OSPF6 area ID in IPv4 address notation\n" -+ "OSPF6 area ID in decimal notation\n" - ) - { - VTY_DECLVAR_CONTEXT(ospf6, o); -@@ -657,7 +658,6 @@ DEFUN (ospf6_interface_area, - struct ospf6_area *oa; - struct ospf6_interface *oi; - struct interface *ifp; -- uint32_t area_id; - - /* find/create ospf6 interface */ - ifp = if_get_by_name(argv[idx_ifname]->arg, VRF_DEFAULT); -@@ -671,15 +671,7 @@ DEFUN (ospf6_interface_area, - } - - /* parse Area-ID */ -- if (inet_pton(AF_INET, argv[idx_ipv4]->arg, &area_id) != 1) { -- vty_out(vty, "Invalid Area-ID: %s\n", argv[idx_ipv4]->arg); -- return CMD_SUCCESS; -- } -- -- /* find/create ospf6 area */ -- oa = ospf6_area_lookup(area_id, o); -- if (oa == NULL) -- oa = ospf6_area_create(area_id, o, OSPF6_AREA_FMT_DOTTEDQUAD); -+ OSPF6_CMD_AREA_GET(argv[idx_ipv4]->arg, oa); - - /* attach interface to area */ - listnode_add(oa->if_list, oi); /* sort ?? */ -@@ -703,12 +695,13 @@ DEFUN (ospf6_interface_area, - - DEFUN (no_ospf6_interface_area, - no_ospf6_interface_area_cmd, -- "no interface IFNAME area A.B.C.D", -+ "no interface IFNAME area <A.B.C.D|(0-4294967295)>", - NO_STR - "Disable routing on an IPv6 interface\n" - IFNAME_STR - "Specify the OSPF6 area ID\n" - "OSPF6 area ID in IPv4 address notation\n" -+ "OSPF6 area ID in decimal notation\n" - ) - { - int idx_ifname = 2; -@@ -731,10 +724,8 @@ DEFUN (no_ospf6_interface_area, - } - - /* parse Area-ID */ -- if (inet_pton(AF_INET, argv[idx_ipv4]->arg, &area_id) != 1) { -- vty_out(vty, "Invalid Area-ID: %s\n", argv[idx_ipv4]->arg); -- return CMD_SUCCESS; -- } -+ if (inet_pton(AF_INET, argv[idx_ipv4]->arg, &area_id) != 1) -+ area_id = htonl(strtoul(argv[idx_ipv4]->arg, NULL, 10)); - - /* Verify Area */ - if (oi->area == NULL) { --- -2.20.1 - diff --git a/packages/frr/patches/0003-bfdd-fix-parameter-length.patch b/packages/frr/patches/0003-bfdd-fix-parameter-length.patch deleted file mode 100644 index 457b8a34..00000000 --- a/packages/frr/patches/0003-bfdd-fix-parameter-length.patch +++ /dev/null @@ -1,37 +0,0 @@ -From e6426ace1edadd3c27ac612815ebc994ea54ba39 Mon Sep 17 00:00:00 2001 -From: Igor Ryzhov <iryzhov@nfware.com> -Date: Mon, 24 Aug 2020 18:45:53 +0300 -Subject: [PATCH] bfdd: fix parameter length - -There is no space reserved for "[source-addr='']". - -Signed-off-by: Igor Ryzhov <iryzhov@nfware.com> ---- - bfdd/bfdd_cli.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/bfdd/bfdd_cli.c b/bfdd/bfdd_cli.c -index 058ce7d1f..d115684b1 100644 ---- a/bfdd/bfdd_cli.c -+++ b/bfdd/bfdd_cli.c -@@ -109,7 +109,7 @@ DEFPY_YANG_NOSH( - VRF_NAME_STR) - { - int ret, slen; -- char source_str[INET6_ADDRSTRLEN]; -+ char source_str[INET6_ADDRSTRLEN + 32]; - char xpath[XPATH_MAXLEN], xpath_srcaddr[XPATH_MAXLEN + 32]; - - if (multihop) -@@ -168,7 +168,7 @@ DEFPY_YANG( - { - int slen; - char xpath[XPATH_MAXLEN]; -- char source_str[INET6_ADDRSTRLEN]; -+ char source_str[INET6_ADDRSTRLEN + 32]; - - if (multihop) - snprintf(source_str, sizeof(source_str), "[source-addr='%s']", --- -2.20.1 - |