Commit 3aee7559 authored by Adam Wujek's avatar Adam Wujek 💬

Kconfig: add LLDP tx interval

Signed-off-by: Adam Wujek's avatarAdam Wujek <adam.wujek@cern.ch>
parent 9f860d10
......@@ -928,6 +928,13 @@ config LLDPD_DISABLE
Disable LLDP daemon to prevent sending LLDP frames. It may be useful
for networks not using LLDP or with a low latency requirement.
config LLDPD_TX_INTERVAL
int "LLDP TX interval"
default 5
depends on !LLDPD_DISABLE
help
Define how often LLDP frames are sent.
config LLDPD_MANAGEMENT_PORT_DISABLE
bool "Disable LLDP on the management port"
default n
......
......@@ -51,6 +51,18 @@ start() {
echo "# This configuration file was generated by $0 at startup" > $LLDPD_CONFIG
echo "# If you would like to change a lldpd configuration in runtime please consider using lldpcli" >> $LLDPD_CONFIG
echo "configure system hostname '$(hostname)'" >> $LLDPD_CONFIG
tx_interval=5
if [ ! -z "$CONFIG_LLDPD_TX_INTERVAL" ]; then
tx_int=$CONFIG_LLDPD_TX_INTERVAL
# check if given value is an int
case $tx_int in
''|*[!0-9]*) echo -n "wrong CONFIG_LLDPD_TX_INTERVAL "$tx_int". Using 5 as the default interval. " ;;
*) echo tx_interval=$tx_int ;;
esac
fi
echo "configure lldp tx-interval $tx_interval" >> $LLDPD_CONFIG
if [ "$CONFIG_LLDPD_MINIMUM_FRAME_SIZE" = "y" ]; then
echo "configure system description 'WR-SWITCH'" >> $LLDPD_CONFIG
else
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment