summaryrefslogtreecommitdiffstats
path: root/vtysh
diff options
context:
space:
mode:
authorEmanuele Di Pascale <emanuele@voltanet.io>2019-10-11 12:37:53 +0200
committerEmanuele Di Pascale <emanuele@voltanet.io>2019-10-29 10:32:38 +0100
commitccef6e47a3eda4adb4fd521bc2c4c036b6119d0e (patch)
treeef22dba59c8acc1e5cea32fa324d8d8f5c4b3dd9 /vtysh
parenttools: frr-reload.py for single daemon (diff)
downloadfrr-ccef6e47a3eda4adb4fd521bc2c4c036b6119d0e.tar.xz
frr-ccef6e47a3eda4adb4fd521bc2c4c036b6119d0e.zip
tools, vtysh: fix ldpd + frr-reload.py
frr-reload.py has many special case rules that did not consider ldpd at all. Specifically: 1. The bulk of ldp configuration comes in a big 'mpls ldp' context, which was previously considered a single-line context as it started with 'mpls'. This rule should only apply to labels and lsps. 2. ldp has a 'router-id' config line that fell into the same rule as the above one. It should not be considered a single-line context as more ldp configuration can follow. 3. enabled interfaces should not end their context. A better fix would actually require popping a new context for each interface in case there is any interface-specific config, but at least this fix will address the most common use case. 4. when declaring pseudowires, any line with 'member pseudowire XXX' should be considered a sub-context of the 'l2vpn YYY type ZZZ' context. Without this fix, changes in the first psuedowire declared would not correctly be processed (e.g. removing a 'control-word exclude' line would not be picked up). Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
Diffstat (limited to 'vtysh')
-rw-r--r--vtysh/vtysh.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/vtysh/vtysh.c b/vtysh/vtysh.c
index 643dcb7ed..f8292c530 100644
--- a/vtysh/vtysh.c
+++ b/vtysh/vtysh.c
@@ -725,19 +725,17 @@ int vtysh_mark_file(const char *filename)
switch (vty->node) {
case LDP_IPV4_IFACE_NODE:
if (strncmp(vty_buf_copy, " ", 3)) {
- vty_out(vty, " end\n");
vty->node = LDP_IPV4_NODE;
}
break;
case LDP_IPV6_IFACE_NODE:
if (strncmp(vty_buf_copy, " ", 3)) {
- vty_out(vty, " end\n");
vty->node = LDP_IPV6_NODE;
}
break;
case LDP_PSEUDOWIRE_NODE:
if (strncmp(vty_buf_copy, " ", 2)) {
- vty_out(vty, " end\n");
+ vty_out(vty, " exit\n");
vty->node = LDP_L2VPN_NODE;
}
break;