+lldpd (1.0.4)
+ * Changes:
+ + Add "set system lldp max-neighbors XX" command to modify maximum
+ of neighbors accepted per port.
+
lldpd (1.0.3)
* Fix:
+ Fix creation of chroot directory.
return 1;
}
+static int
+cmd_maxneighs(struct lldpctl_conn_t *conn, struct writer *w,
+ struct cmd_env *env, void *arg)
+{
+ log_debug("lldpctl", "set maximum neighbors");
+
+ lldpctl_atom_t *config = lldpctl_get_configuration(conn);
+ if (config == NULL) {
+ log_warnx("lldpctl", "unable to get configuration from lldpd. %s",
+ lldpctl_last_strerror(conn));
+ return 0;
+ }
+ if (lldpctl_atom_set_str(config,
+ lldpctl_k_config_max_neighbors, cmdenv_get(env, "max-neighbors")) == NULL) {
+ log_warnx("lldpctl", "unable to set maximum of neighbors. %s",
+ lldpctl_last_strerror(conn));
+ lldpctl_atom_dec_ref(config);
+ return 0;
+ }
+ log_info("lldpctl", "maximum neighbors set to new value %s", cmdenv_get(env, "max-neighbors"));
+ lldpctl_atom_dec_ref(config);
+ return 1;
+}
+
static int
cmd_status(struct lldpctl_conn_t *conn, struct writer *w,
struct cmd_env *env, void *arg)
NEWLINE, "Set LLDP transmit hold",
NULL, cmd_txhold, NULL);
+ commands_new(
+ commands_new(
+ commands_new(configure_lldp,
+ "max-neighbors", "Set maximum number of neighbors per port",
+ cmd_check_no_env, NULL, "ports"),
+ NULL, "Maximum number of neighbors",
+ NULL, cmd_store_env_value, "max-neighbors"),
+ NEWLINE, "Set maximum number of neighbors per port",
+ NULL, cmd_maxneighs, NULL);
+
struct cmd_node *status = commands_new(configure_lldp,
"status", "Set administrative status",
NULL, NULL, NULL);
lldpctl_atom_get_str(configuration, lldpctl_k_config_tx_interval));
tag_datatag(w, "tx-hold", "Transmit hold",
lldpctl_atom_get_str(configuration, lldpctl_k_config_tx_hold));
+ tag_datatag(w, "max-neighbors", "Maximum number of neighbors",
+ lldpctl_atom_get_str(configuration, lldpctl_k_config_max_neighbors));
tag_datatag(w, "rx-only", "Receive mode",
lldpctl_atom_get_int(configuration, lldpctl_k_config_receiveonly)?
"yes":"no");
the default TTL is 120 seconds.
.Ed
+.Cd configure
+.Cd lldp max-neighbors Ar neighbors
+.Bd -ragged -offset XXXXXX
+Change the maximum number of neighbors accepted (for each protocol) on
+an interface. This is a global value. The default is 32. This setting
+only applies to future neighbors.
+.Ed
+
.Cd configure
.Op ports Ar ethX Op ,...
.Cd lldp
cfg->g_config.c_ttl = cfg->g_config.c_tx_interval *
cfg->g_config.c_tx_hold;
}
+ if (CHANGED(c_max_neighbors) && config->c_max_neighbors > 0) {
+ log_debug("rpc", "client change maximum neighbors to %d",
+ config->c_max_neighbors);
+ cfg->g_config.c_max_neighbors = config->c_max_neighbors;
+ }
if (CHANGED(c_lldp_portid_type) &&
config->c_lldp_portid_type > LLDP_PORTID_SUBTYPE_UNKNOWN &&
config->c_lldp_portid_type <= LLDP_PORTID_SUBTYPE_MAX) {
#endif
case lldpctl_k_config_tx_hold:
return c->config->c_tx_hold;
+ case lldpctl_k_config_max_neighbors:
+ return c->config->c_max_neighbors;
default:
return SET_ERROR(atom->conn, LLDPCTL_ERR_NOT_EXIST);
}
config.c_tx_hold = value;
if (value > 0) c->config->c_tx_hold = value;
break;
+ case lldpctl_k_config_max_neighbors:
+ config.c_max_neighbors = value;
+ if (value > 0) c->config->c_max_neighbors = value;
+ break;
case lldpctl_k_config_bond_slave_src_mac_type:
config.c_bond_slave_src_mac_type = value;
c->config->c_bond_slave_src_mac_type = value;
lldpctl_k_config_bond_slave_src_mac_type, /**< `(I,WO)` bond slave src mac type. */
lldpctl_k_config_lldp_portid_type, /**< `(I,WO)` LLDP PortID TLV Subtype */
lldpctl_k_config_lldp_agent_type, /**< `(I,WO)` LLDP agent type */
+ lldpctl_k_config_max_neighbors, /**< `(I,WO)`Maximum number of neighbors per port. */
lldpctl_k_custom_tlvs = 5000, /**< `(AL)` custom TLVs */
lldpctl_k_custom_tlvs_clear, /** `(I,WO)` clear list of custom TLVs */
configure lldp portidsubtype local Batman description Batman
configure lldp tx-interval 30
configure lldp tx-hold 4
+configure lldp max-neighbors 16
configure lldp ports eth0 status tx-only
configure lldp status rx-and-tx
configure lldp custom-tlv oui 33,44,55 subtype 44