diff options
| author | David Lamparter <equinox@opensourcerouting.org> | 2016-09-30 15:38:03 +0200 |
|---|---|---|
| committer | Donald Sharp <sharpd@cumulusnetworks.com> | 2016-10-07 09:09:52 -0400 |
| commit | 3ddccf1805208b3fba7098ea7ab1725e23329e41 (patch) | |
| tree | 61f0b640b641c1649efd1f0899a48153213d3e2f /zebra/test_main.c | |
| parent | 0b47280e45ce89e7dbdc7c0124d21ae722e6da59 (diff) | |
zebra: use qobj and enable concurrent config edits
This puts all the proper VTY_DECLVAR_CONTEXT calls in place, removing
all vty->index uses in the process. With that, vty_config_lockless can
be enabled in zebra.
[v2: fix ordering screw-up in "interface XXX" command]
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Diffstat (limited to 'zebra/test_main.c')
| -rw-r--r-- | zebra/test_main.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/zebra/test_main.c b/zebra/test_main.c index bbaf450282..828b61af91 100644 --- a/zebra/test_main.c +++ b/zebra/test_main.c @@ -124,11 +124,10 @@ DEFUN (test_interface_state, "up\n" "down\n") { - struct interface *ifp; + VTY_DECLVAR_CONTEXT (interface, ifp); if (argc < 1) return CMD_WARNING; - - ifp = vty->index; + if (ifp->ifindex == IFINDEX_INTERNAL) { ifp->ifindex = ++test_ifindex; @@ -294,6 +293,7 @@ main (int argc, char **argv) /* Vty related initialize. */ signal_init (zebrad.master, array_size(zebra_signals), zebra_signals); cmd_init (1); + vty_config_lockless (); vty_init (zebrad.master); memory_init (); zebra_debug_init (); |
