diff --git a/.gitignore b/.gitignore index 90074dc..96ae7cb 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ /frr-7.5.tar.gz +/frr-7.5.1.tar.gz diff --git a/0011-designated-router.patch b/0008-designated-router.patch similarity index 100% rename from 0011-designated-router.patch rename to 0008-designated-router.patch diff --git a/0008-ospf-multi-instance.patch b/0008-ospf-multi-instance.patch deleted file mode 100644 index e0da72a..0000000 --- a/0008-ospf-multi-instance.patch +++ /dev/null @@ -1,119 +0,0 @@ -diff --git a/ospfd/ospfd.c b/ospfd/ospfd.c -index d8be19db9..6fe94f3a4 100644 ---- a/ospfd/ospfd.c -+++ b/ospfd/ospfd.c -@@ -384,12 +384,50 @@ struct ospf *ospf_lookup_by_inst_name(unsigned short instance, const char *name) - return NULL; - } - --struct ospf *ospf_get(unsigned short instance, const char *name, bool *created) -+static void ospf_init(struct ospf *ospf) - { -- struct ospf *ospf; - struct vrf *vrf; - struct interface *ifp; - -+ ospf_opaque_type11_lsa_init(ospf); -+ -+ if (ospf->vrf_id != VRF_UNKNOWN) -+ ospf->oi_running = 1; -+ -+ /* Activate 'ip ospf area x' configured interfaces for given -+ * vrf. Activate area on vrf x aware interfaces. -+ * vrf_enable callback calls router_id_update which -+ * internally will call ospf_if_update to trigger -+ * network_run_state -+ */ -+ vrf = vrf_lookup_by_id(ospf->vrf_id); -+ -+ FOR_ALL_INTERFACES (vrf, ifp) { -+ struct ospf_if_params *params; -+ struct route_node *rn; -+ uint32_t count = 0; -+ -+ params = IF_DEF_PARAMS(ifp); -+ if (OSPF_IF_PARAM_CONFIGURED(params, if_area)) -+ count++; -+ -+ for (rn = route_top(IF_OIFS_PARAMS(ifp)); rn; rn = route_next(rn)) -+ if ((params = rn->info) && OSPF_IF_PARAM_CONFIGURED(params, if_area)) -+ count++; -+ -+ if (count > 0) { -+ ospf_interface_area_set(ospf, ifp); -+ ospf->if_ospf_cli_count += count; -+ } -+ } -+ -+ ospf_router_id_update(ospf); -+} -+ -+struct ospf *ospf_get(unsigned short instance, const char *name, bool *created) -+{ -+ struct ospf *ospf; -+ - /* vrf name provided call inst and name based api - * in case of no name pass default ospf instance */ - if (name) -@@ -402,39 +440,7 @@ struct ospf *ospf_get(unsigned short instance, const char *name, bool *created) - ospf = ospf_new(instance, name); - ospf_add(ospf); - -- ospf_opaque_type11_lsa_init(ospf); -- -- if (ospf->vrf_id != VRF_UNKNOWN) -- ospf->oi_running = 1; -- -- /* Activate 'ip ospf area x' configured interfaces for given -- * vrf. Activate area on vrf x aware interfaces. -- * vrf_enable callback calls router_id_update which -- * internally will call ospf_if_update to trigger -- * network_run_state -- */ -- vrf = vrf_lookup_by_id(ospf->vrf_id); -- -- FOR_ALL_INTERFACES (vrf, ifp) { -- struct ospf_if_params *params; -- struct route_node *rn; -- uint32_t count = 0; -- -- params = IF_DEF_PARAMS(ifp); -- if (OSPF_IF_PARAM_CONFIGURED(params, if_area)) -- count++; -- -- for (rn = route_top(IF_OIFS_PARAMS(ifp)); rn; rn = route_next(rn)) -- if ((params = rn->info) && OSPF_IF_PARAM_CONFIGURED(params, if_area)) -- count++; -- -- if (count > 0) { -- ospf_interface_area_set(ospf, ifp); -- ospf->if_ospf_cli_count += count; -- } -- } -- -- ospf_router_id_update(ospf); -+ ospf_init(ospf); - } - - return ospf; -@@ -450,7 +456,7 @@ struct ospf *ospf_get_instance(unsigned short instance, bool *created) - ospf = ospf_new(instance, NULL /* VRF_DEFAULT*/); - ospf_add(ospf); - -- ospf_opaque_type11_lsa_init(ospf); -+ ospf_init(ospf); - } - - return ospf; -diff --git a/ospfd/ospfd.h b/ospfd/ospfd.h -index 192e54281..3087b735a 100644 ---- a/ospfd/ospfd.h -+++ b/ospfd/ospfd.h -@@ -604,7 +604,6 @@ extern int ospf_nbr_nbma_poll_interval_set(struct ospf *, struct in_addr, - unsigned int); - extern int ospf_nbr_nbma_poll_interval_unset(struct ospf *, struct in_addr); - extern void ospf_prefix_list_update(struct prefix_list *); --extern void ospf_init(void); - extern void ospf_if_update(struct ospf *, struct interface *); - extern void ospf_ls_upd_queue_empty(struct ospf_interface *); - extern void ospf_terminate(void); diff --git a/0009-bgp-ttl-security.patch b/0009-bgp-ttl-security.patch deleted file mode 100644 index 193929c..0000000 --- a/0009-bgp-ttl-security.patch +++ /dev/null @@ -1,92 +0,0 @@ -From 8a66632391db5f5181a4afef6aae41f48bee7fdb Mon Sep 17 00:00:00 2001 -From: Donald Sharp -Date: Fri, 15 Jan 2021 08:14:49 -0500 -Subject: [PATCH] bgpd: Allow peer-groups to have `ttl-security hops` - configured - -The command `neighbor PGROUP ttl-security hops X` was being -accepted but ignored. Allow it to be stored. I am still -not sure that this is applied correctly, but that is another -problem. - -Fixes: #7848 -Signed-off-by: Donald Sharp ---- - bgpd/bgpd.c | 8 +++++--- - 1 file changed, 5 insertions(+), 3 deletions(-) - -diff --git a/bgpd/bgpd.c b/bgpd/bgpd.c -index 9297ec4711c..4ebd3da0620 100644 ---- a/bgpd/bgpd.c -+++ b/bgpd/bgpd.c -@@ -7150,6 +7150,7 @@ int is_ebgp_multihop_configured(struct peer *peer) - int peer_ttl_security_hops_set(struct peer *peer, int gtsm_hops) - { - struct peer_group *group; -+ struct peer *gpeer; - struct listnode *node, *nnode; - int ret; - -@@ -7186,9 +7187,10 @@ int peer_ttl_security_hops_set(struct peer *peer, int gtsm_hops) - return ret; - } else { - group = peer->group; -+ group->conf->gtsm_hops = gtsm_hops; - for (ALL_LIST_ELEMENTS(group->peer, node, nnode, -- peer)) { -- peer->gtsm_hops = group->conf->gtsm_hops; -+ gpeer)) { -+ gpeer->gtsm_hops = group->conf->gtsm_hops; - - /* Calling ebgp multihop also resets the - * session. -@@ -7198,7 +7200,7 @@ int peer_ttl_security_hops_set(struct peer *peer, int gtsm_hops) - * value is - * irrelevant. - */ -- peer_ebgp_multihop_set(peer, MAXTTL); -+ peer_ebgp_multihop_set(gpeer, MAXTTL); - } - } - } else { -@@ -7219,9 +7221,10 @@ int peer_ttl_security_hops_set(struct peer *peer, int gtsm_hops) - MAXTTL + 1 - gtsm_hops); - } else { - group = peer->group; -+ group->conf->gtsm_hops = gtsm_hops; - for (ALL_LIST_ELEMENTS(group->peer, node, nnode, -- peer)) { -- peer->gtsm_hops = group->conf->gtsm_hops; -+ gpeer)) { -+ gpeer->gtsm_hops = group->conf->gtsm_hops; - - /* Change setting of existing peer - * established then change value (may break -@@ -7231,17 +7234,18 @@ int peer_ttl_security_hops_set(struct peer *peer, int gtsm_hops) - * no session then do nothing (will get - * handled by next connection) - */ -- if (peer->fd >= 0 -- && peer->gtsm_hops -+ if (gpeer->fd >= 0 -+ && gpeer->gtsm_hops - != BGP_GTSM_HOPS_DISABLED) - sockopt_minttl( -- peer->su.sa.sa_family, peer->fd, -- MAXTTL + 1 - peer->gtsm_hops); -- if ((peer->status < Established) -- && peer->doppelganger -- && (peer->doppelganger->fd >= 0)) -- sockopt_minttl(peer->su.sa.sa_family, -- peer->doppelganger->fd, -+ gpeer->su.sa.sa_family, -+ gpeer->fd, -+ MAXTTL + 1 - gpeer->gtsm_hops); -+ if ((gpeer->status < Established) -+ && gpeer->doppelganger -+ && (gpeer->doppelganger->fd >= 0)) -+ sockopt_minttl(gpeer->su.sa.sa_family, -+ gpeer->doppelganger->fd, - MAXTTL + 1 - gtsm_hops); - } - } diff --git a/0009-routemap.patch b/0009-routemap.patch new file mode 100644 index 0000000..f389e57 --- /dev/null +++ b/0009-routemap.patch @@ -0,0 +1,25 @@ +diff --git a/lib/routemap.c b/lib/routemap.c +index a90443a..0b594b2 100644 +--- a/lib/routemap.c ++++ b/lib/routemap.c +@@ -1649,9 +1649,9 @@ static struct list *route_map_get_index_list(struct route_node **rn, + */ + static struct route_map_index * + route_map_get_index(struct route_map *map, const struct prefix *prefix, +- route_map_object_t type, void *object, uint8_t *match_ret) ++ route_map_object_t type, void *object, enum route_map_cmd_result_t *match_ret) + { +- int ret = 0; ++ enum route_map_cmd_result_t ret = RMAP_NOMATCH; + struct list *candidate_rmap_list = NULL; + struct route_node *rn = NULL; + struct listnode *ln = NULL, *nn = NULL; +@@ -2399,7 +2399,7 @@ route_map_result_t route_map_apply(struct route_map *map, + if ((!map->optimization_disabled) + && (map->ipv4_prefix_table || map->ipv6_prefix_table)) { + index = route_map_get_index(map, prefix, type, object, +- (uint8_t *)&match_ret); ++ &match_ret); + if (index) { + if (rmap_debug) + zlog_debug( diff --git a/0010-bfd-reload.patch b/0010-bfd-reload.patch deleted file mode 100644 index b153592..0000000 --- a/0010-bfd-reload.patch +++ /dev/null @@ -1,60 +0,0 @@ -From 46a2b560fa84c5f8ece8dbb82cbf355af675ad41 Mon Sep 17 00:00:00 2001 -From: Rafael Zalamena -Date: Tue, 19 Jan 2021 08:49:23 -0300 -Subject: [PATCH] tools: fix frr-reload BFD profile support - -Fix the handling of multiple BFD profiles by adding the appropriated -code to push/pop contexts inside BFD configuration node. - -Signed-off-by: Rafael Zalamena ---- - tools/frr-reload.py | 28 ++++++++++++++++++++++++++++ - 1 file changed, 28 insertions(+) - -diff --git a/tools/frr-reload.py b/tools/frr-reload.py -index da005b6f874..ca6fe81f007 100755 ---- a/tools/frr-reload.py -+++ b/tools/frr-reload.py -@@ -533,6 +533,18 @@ def load_contexts(self): - if line.startswith('!') or line.startswith('#'): - continue - -+ if (len(ctx_keys) == 2 -+ and ctx_keys[0].startswith('bfd') -+ and ctx_keys[1].startswith('profile ') -+ and line == 'end'): -+ log.debug('LINE %-50s: popping from sub context, %-50s', line, ctx_keys) -+ -+ if main_ctx_key: -+ self.save_contexts(ctx_keys, current_context_lines) -+ ctx_keys = copy.deepcopy(main_ctx_key) -+ current_context_lines = [] -+ continue -+ - # one line contexts - # there is one exception though: ldpd accepts a 'router-id' clause - # as part of its 'mpls ldp' config context. If we are processing -@@ -649,6 +661,22 @@ def load_contexts(self): - log.debug('LINE %-50s: entering sub-sub-context, append to ctx_keys', line) - ctx_keys.append(line) - -+ elif ( -+ line.startswith('profile ') -+ and len(ctx_keys) == 1 -+ and ctx_keys[0].startswith('bfd') -+ ): -+ -+ # Save old context first -+ self.save_contexts(ctx_keys, current_context_lines) -+ current_context_lines = [] -+ main_ctx_key = copy.deepcopy(ctx_keys) -+ log.debug( -+ "LINE %-50s: entering BFD profile sub-context, append to ctx_keys", -+ line -+ ) -+ ctx_keys.append(line) -+ - else: - # Continuing in an existing context, add non-commented lines to it - current_context_lines.append(line) - diff --git a/0012-bfd-peers-crash.patch b/0012-bfd-peers-crash.patch deleted file mode 100644 index 1e2d78e..0000000 --- a/0012-bfd-peers-crash.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 1d923374f64e099d734899aff219d90cb0213fa6 Mon Sep 17 00:00:00 2001 -From: Emanuele Bovisio -Date: Thu, 5 Nov 2020 14:27:51 +0100 -Subject: [PATCH] bfdd: fix crash on show bfd peers counters json - -wrong pointer passed to bfd_id_iterate function - -Signed-off-by: Emanuele Bovisio ---- - bfdd/bfdd_vty.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/bfdd/bfdd_vty.c b/bfdd/bfdd_vty.c -index a3f1638e5f6..837a7b7d7d6 100644 ---- a/bfdd/bfdd_vty.c -+++ b/bfdd/bfdd_vty.c -@@ -447,7 +447,7 @@ static void _display_peers_counter(struct vty *vty, char *vrfname, bool use_json - - jo = json_object_new_array(); - bvt.jo = jo; -- bfd_id_iterate(_display_peer_counter_json_iter, jo); -+ bfd_id_iterate(_display_peer_counter_json_iter, &bvt); - - vty_out(vty, "%s\n", json_object_to_json_string_ext(jo, 0)); - json_object_free(jo); diff --git a/frr.spec b/frr.spec index 1a3b1a8..b0e841f 100644 --- a/frr.spec +++ b/frr.spec @@ -1,11 +1,11 @@ -%global frrversion 7.5 +%global frrversion 7.5.1 %global frr_libdir /usr/lib/frr %global _hardened_build 1 Name: frr -Version: 7.5 -Release: 11%{?checkout}%{?dist} +Version: 7.5.1 +Release: 1%{?checkout}%{?dist} Summary: Routing daemon License: GPLv2+ URL: http://www.frrouting.org @@ -37,11 +37,8 @@ Patch0003: 0003-disable-eigrp-crypto.patch Patch0004: 0004-fips-mode.patch Patch0006: 0006-CVE-2020-12831.patch Patch0007: 0007-frrinit.patch -Patch0008: 0008-ospf-multi-instance.patch -Patch0009: 0009-bgp-ttl-security.patch -Patch0010: 0010-bfd-reload.patch -Patch0011: 0011-designated-router.patch -Patch0012: 0012-bfd-peers-crash.patch +Patch0008: 0008-designated-router.patch +Patch0009: 0009-routemap.patch %description FRRouting is free software that manages TCP/IP based routing protocols. It takes @@ -202,6 +199,10 @@ make check PYTHON=%{__python3} %{_tmpfilesdir}/%{name}.conf %changelog +* Wed May 11 2022 Michal Ruprich - 7.5.1-1 +- Resolves: #2018451 - Rebase of frr to version 7.5.1 +- Resolves: #1975361 - the dynamic routing setup does not work any more + * Wed Jan 05 2022 Michal Ruprich - 7.5-11 - Resolves: #2034328 - Bfdd crash in metallb CI diff --git a/sources b/sources index b0b7c94..91a86cd 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (frr-7.5.tar.gz) = f605df81cdcf4ba7b91b402397816fdbc8299c406f719cc09d54c942cc0d6bed3e855a2f3d6cbd9594c7f83b6c8c7181b5fa8e8096712dc2d821b6d16d65fafa +SHA512 (frr-7.5.1.tar.gz) = 092e870bc2e31ab56a8a044db6722dae081fa4783ed37452b4ed45d1f75d5ab2669060bb2fb7a4f833c8b52adaf0a1aa9256509e4e0dca30919daff4c5e79903