]> git.ipfire.org Git - thirdparty/lldpd.git/commitdiff
lldpcli: fix per-port occurrences of "conf lldp"
authorVincent Bernat <vincent@bernat.im>
Sun, 23 Aug 2015 13:28:58 +0000 (15:28 +0200)
committerVincent Bernat <vincent@bernat.im>
Sun, 23 Aug 2015 13:28:58 +0000 (15:28 +0200)
Some commands were documented as not accepting a per-port setting while
they accepted it (without any effect). On the other hand, some other
commands were accepting and used per-port setting while not
documented. Fix all that.

src/client/conf-lldp.c
src/client/lldpcli.8.in

index 3c7bb3227995499b0398e29ecdbdb6d95467171b..0d21ef737e2cdf11726425a8915564a11cfd3d53 100644 (file)
@@ -381,8 +381,8 @@ register_commands_configure_lldp(struct cmd_node *configure,
                if (!strcmp(b_map->string, "ifname")) {
                        commands_new(
                                commands_new(configure_lldp_portid_type,
-                                            b_map->string, "Interface Name",
-                                            NULL, NULL, NULL),
+                                   b_map->string, "Interface Name",
+                                   cmd_check_no_env, NULL, "ports"),
                                NEWLINE, NULL,
                                NULL, cmd_portid_type,
                                b_map->string);
@@ -410,8 +410,8 @@ register_commands_configure_lldp(struct cmd_node *configure,
                } else if (!strcmp(b_map->string, "macaddress")) {
                        commands_new(
                                commands_new(configure_lldp_portid_type,
-                                            b_map->string, "MAC Address",
-                                            NULL, NULL, NULL),
+                                   b_map->string, "MAC Address",
+                                   cmd_check_no_env, NULL, "ports"),
                                NEWLINE, NULL,
                                NULL, cmd_portid_type,
                                b_map->string);
@@ -422,7 +422,7 @@ register_commands_configure_lldp(struct cmd_node *configure,
                commands_new(configure_lldp,
                    "capabilities-advertisements",
                    "Enable chassis capabilities advertisement",
-                   NULL, NULL, NULL),
+                   cmd_check_no_env, NULL, "ports"),
                NEWLINE, "Enable chassis capabilities advertisement",
                NULL, cmd_chassis_cap_advertise, "enable");
        commands_new(
index 1ccdab55649020198b872597cfe98887b8ce549c..20a0dc5a59e28e964e7435c5a7bdaff48c9e250e 100644 (file)
@@ -362,7 +362,12 @@ quite unlikely).
 
 .Cd configure
 .Cd lldp portidsubtype
-.Cd ifname | macaddress | local Ar value Op Cd description Ar description
+.Cd ifname | macaddress
+.Pp
+.Cd configure
+.Op ports Ar ethX Op ,...
+.Cd lldp portidsubtype
+.Cd local Ar value Op Cd description Ar description
 .Bd -ragged -offset XXXXXX
 Force port ID subtype. By default,
 .Nm