diff options
| -rw-r--r-- | debian/control | 2 | ||||
| -rw-r--r-- | redhat/frr.spec.in | 2 | ||||
| -rw-r--r-- | snapcraft/snapcraft.yaml.in | 2 | ||||
| -rwxr-xr-x | tools/frr-reload.py | 21 | ||||
| -rw-r--r-- | vtysh/vtysh.c | 2 |
5 files changed, 26 insertions, 3 deletions
diff --git a/debian/control b/debian/control index b3c14f06f3..4784e6b232 100644 --- a/debian/control +++ b/debian/control @@ -23,7 +23,7 @@ Build-Depends: bison, librtr-dev (>= 0.8.0~) <!pkg.frr.nortrlib>, libsnmp-dev, libssh-dev <!pkg.frr.nortrlib>, - libyang2-dev (>= 2.1.80), + libyang2-dev (>= 2.1.128), lsb-base, pkg-config, protobuf-c-compiler, diff --git a/redhat/frr.spec.in b/redhat/frr.spec.in index bd9edd1cac..06d93b8e47 100644 --- a/redhat/frr.spec.in +++ b/redhat/frr.spec.in @@ -187,7 +187,7 @@ BuildRequires: make BuildRequires: ncurses-devel BuildRequires: readline-devel BuildRequires: texinfo -BuildRequires: libyang-devel >= 2.1.80 +BuildRequires: libyang-devel >= 2.1.128 %if 0%{?rhel} && 0%{?rhel} < 7 #python27-devel is available from ius community repo for RedHat/CentOS 6 BuildRequires: python27-devel diff --git a/snapcraft/snapcraft.yaml.in b/snapcraft/snapcraft.yaml.in index cef02c3972..d90236f7a2 100644 --- a/snapcraft/snapcraft.yaml.in +++ b/snapcraft/snapcraft.yaml.in @@ -302,7 +302,7 @@ parts: - libpcre2-8-0 source: https://github.com/CESNET/libyang.git source-type: git - source-tag: v2.1.80 + source-tag: v2.1.128 plugin: cmake configflags: - -DCMAKE_INSTALL_PREFIX:PATH=/usr diff --git a/tools/frr-reload.py b/tools/frr-reload.py index 73479c634b..9c20d0099f 100755 --- a/tools/frr-reload.py +++ b/tools/frr-reload.py @@ -220,6 +220,23 @@ def get_normalized_mac_ip_line(line): return line +def get_normalized_interface_vrf(line): + """ + If 'interface <int_name> vrf <vrf_name>' is present in file, + we need to remove the explicit "vrf <vrf_name>" + so that the context information is created + correctly and configurations are matched appropriately. + """ + + intf_vrf = re.search("interface (\S+) vrf (\S+)", line) + if intf_vrf: + old_line = "vrf %s" % intf_vrf.group(2) + new_line = line.replace(old_line, "").strip() + return new_line + + return line + + # This dictionary contains a tree of all commands that we know start a # new multi-line context. All other commands are treated either as # commands inside a multi-line context or as single-line contexts. This @@ -295,6 +312,10 @@ class Config(object): # Compress duplicate whitespaces line = " ".join(line.split()) + # Remove 'vrf <vrf_name>' from 'interface <x> vrf <vrf_name>' + if line.startswith("interface ") and "vrf" in line: + line = get_normalized_interface_vrf(line) + if ":" in line: line = get_normalized_mac_ip_line(line) diff --git a/vtysh/vtysh.c b/vtysh/vtysh.c index f90f8983d4..1b3012c24c 100644 --- a/vtysh/vtysh.c +++ b/vtysh/vtysh.c @@ -5064,11 +5064,13 @@ void vtysh_init_vty(void) install_element(VRF_NODE, &vtysh_exit_vrf_cmd); install_element(VRF_NODE, &vtysh_quit_vrf_cmd); +#ifdef HAVE_BGPD install_node(&rpki_vrf_node); install_element(VRF_NODE, &rpki_cmd); install_element(RPKI_VRF_NODE, &rpki_exit_cmd); install_element(RPKI_VRF_NODE, &rpki_quit_cmd); install_element(RPKI_VRF_NODE, &vtysh_end_all_cmd); +#endif install_element(CONFIG_NODE, &vtysh_affinity_map_cmd); install_element(CONFIG_NODE, &vtysh_no_affinity_map_cmd); |
