Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
W
White Rabbit Switch - Software
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
86
Issues
86
List
Board
Labels
Milestones
Merge Requests
4
Merge Requests
4
CI / CD
CI / CD
Pipelines
Schedules
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
White Rabbit Switch - Software
Commits
c23b5a5f
Commit
c23b5a5f
authored
Jul 17, 2018
by
Adam Wujek
💬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Kconfig: allow disabling LLDP on the management port
Signed-off-by:
Adam Wujek
<
adam.wujek@cern.ch
>
parent
c187ed89
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
5 deletions
+18
-5
Kconfig
Kconfig
+7
-0
lldpd.sh
userspace/rootfs_override/etc/init.d/lldpd.sh
+11
-5
No files found.
Kconfig
View file @
c23b5a5f
...
@@ -927,6 +927,13 @@ config LLDPD_DISABLE
...
@@ -927,6 +927,13 @@ config LLDPD_DISABLE
help
help
Disable LLDP daemon to prevent sending LLDP frames. It may be useful
Disable LLDP daemon to prevent sending LLDP frames. It may be useful
for networks not using LLDP or with a low latency requirement.
for networks not using LLDP or with a low latency requirement.
config LLDPD_MANAGEMENT_PORT_DISABLE
bool "Disable LLDP on the management port"
default n
depends on !LLDPD_DISABLE
help
Disable LLDP traffic on management port.
endmenu
endmenu
config HTTPD_DISABLE
config HTTPD_DISABLE
...
...
userspace/rootfs_override/etc/init.d/lldpd.sh
View file @
c23b5a5f
...
@@ -5,6 +5,7 @@
...
@@ -5,6 +5,7 @@
LLDPD_CONFIG
=
/etc/lldpd.conf
LLDPD_CONFIG
=
/etc/lldpd.conf
LLDPD
=
/usr/sbin/lldpd
LLDPD
=
/usr/sbin/lldpd
LLDPD_CLI
=
/usr/sbin/lldpcli
# -x -- Enable SNMP subagent.
# -x -- Enable SNMP subagent.
LLDPD_OPT
=
-x
LLDPD_OPT
=
-x
MONIT
=
/usr/bin/monit
MONIT
=
/usr/bin/monit
...
@@ -26,11 +27,6 @@ start_counter() {
...
@@ -26,11 +27,6 @@ start_counter() {
start
()
{
start
()
{
echo
-n
"Creating lldpd config: "
echo
"configure system hostname '
$(
hostname
)
'"
>
$LLDPD_CONFIG
echo
"configure system description 'WR-SWITCH:
$(
/wr/bin/wrsw_version
)
'"
>>
$LLDPD_CONFIG
echo
"resume"
>>
$LLDPD_CONFIG
echo
"OK"
echo
-n
"Starting lldpd: "
echo
-n
"Starting lldpd: "
...
@@ -51,6 +47,16 @@ start() {
...
@@ -51,6 +47,16 @@ start() {
echo
-n
"Force start of lldpd: "
echo
-n
"Force start of lldpd: "
fi
fi
# Creating lldpd config
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
echo
"configure system description 'WR-SWITCH:
$(
/wr/bin/wrsw_version
)
'"
>>
$LLDPD_CONFIG
if
[
"
$CONFIG_LLDPD_MANAGEMENT_PORT_DISABLE
"
=
"y"
]
;
then
echo
"configure system interface pattern '!eth*'"
>>
$LLDPD_CONFIG
fi
echo
"resume"
>>
$LLDPD_CONFIG
start-stop-daemon
-S
-q
-p
/var/run/lldpd.pid
--exec
$LLDPD
--
$LLDPD_OPT
start-stop-daemon
-S
-q
-p
/var/run/lldpd.pid
--exec
$LLDPD
--
$LLDPD_OPT
ret
=
$?
ret
=
$?
if
[
$ret
-eq
0
]
;
then
if
[
$ret
-eq
0
]
;
then
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment