From: Vincent Bernat Date: Sun, 23 Aug 2015 13:28:58 +0000 (+0200) Subject: lldpcli: fix per-port occurrences of "conf lldp" X-Git-Tag: 0.8.0~78 X-Git-Url: http://git.ipfire.org/?p=thirdparty%2Flldpd.git;a=commitdiff_plain;h=b3dd61afd50e056b497a86d771cdc87fc83f60ca lldpcli: fix per-port occurrences of "conf lldp" 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. --- diff --git a/src/client/conf-lldp.c b/src/client/conf-lldp.c index 3c7bb322..0d21ef73 100644 --- a/src/client/conf-lldp.c +++ b/src/client/conf-lldp.c @@ -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( diff --git a/src/client/lldpcli.8.in b/src/client/lldpcli.8.in index 1ccdab55..20a0dc5a 100644 --- a/src/client/lldpcli.8.in +++ b/src/client/lldpcli.8.in @@ -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