mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-09 18:45:54 +02:00
Use MAC addresses to define a slave
It is now also possible to use the MAC address to define a slave of a bridge. Simply add the mac address to the ZONE_SLAVES=''. Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
This commit is contained in:
committed by
Michael Tremer
parent
18b6da69b6
commit
c2336f6bed
@@ -40,7 +40,9 @@ detect_zone() {
|
||||
# Try to find out if this INTERFACE is a slave of a zone
|
||||
local slave
|
||||
for slave in $(get_value "${zone}_SLAVES"); do
|
||||
if [ "${INTERFACE}" = "${slave}" ]; then
|
||||
|
||||
#Compare if the mac address matches or if the name matches
|
||||
if ([ "$(</sys/class/net/${INTERFACE}/address)" = "${slave}" ] || [ "${INTERFACE}" = "${slave}" ]); then
|
||||
echo "${zone}"
|
||||
return 0
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user