]> git.ipfire.org Git - thirdparty/lldpd.git/commitdiff
lldpcli: remove redundant "ports" parameters from cap and mgmt cmds
authorYaroslav Fedoriachenko <yar.fed99@gmail.com>
Tue, 21 Sep 2021 16:14:00 +0000 (19:14 +0300)
committerVincent Bernat <vincent@bernat.ch>
Tue, 21 Sep 2021 17:43:20 +0000 (19:43 +0200)
The commands below were introduced as global commands, but all of them
except the first one were missing code to ignore "ports" parameter
```
configure lldp capabilities-advertisements
unconfigure lldp capabilities-advertisements
unconfigure lldp management-addresses-advertisements
configure lldp management-addresses-advertisements
```

Signed-off-by: Yaroslav Fedoriachenko <yar.fed99@gmail.com>
src/client/conf-lldp.c

index b2e948266fbb0d1c289dff61f6a90cc16998c93c..4e4973786b5eb8194e7badf30551700a42282385 100644 (file)
@@ -745,7 +745,7 @@ register_commands_configure_lldp(struct cmd_node *configure,
                commands_new(unconfigure_lldp,
                    "capabilities-advertisements",
                    "Don't enable chassis capabilities advertisement",
-                   NULL, NULL, NULL),
+                   cmd_check_no_env, NULL, "ports"),
                NEWLINE, "Don't enable chassis capabilities advertisement",
                NULL, cmd_chassis_cap_advertise, NULL);
 
@@ -753,14 +753,14 @@ register_commands_configure_lldp(struct cmd_node *configure,
                commands_new(configure_lldp,
                    "management-addresses-advertisements",
                    "Enable management addresses advertisement",
-                   NULL, NULL, NULL),
+                   cmd_check_no_env, NULL, "ports"),
                NEWLINE, "Enable management addresses advertisement",
                NULL, cmd_chassis_mgmt_advertise, "enable");
        commands_new(
                commands_new(unconfigure_lldp,
                    "management-addresses-advertisements",
                    "Don't enable management addresses advertisement",
-                   NULL, NULL, NULL),
+                   cmd_check_no_env, NULL, "ports"),
                NEWLINE, "Don't enable management addresses advertisement",
                NULL, cmd_chassis_mgmt_advertise, NULL);