Merge pull request #5366 from brianjmurrell/dhcrelay-update
dhcrelay4: add support for up/downstream interfaces
This commit is contained in:
commit
b570344ee5
|
@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
|
||||||
PKG_NAME:=isc-dhcp
|
PKG_NAME:=isc-dhcp
|
||||||
UPSTREAM_NAME:=dhcp
|
UPSTREAM_NAME:=dhcp
|
||||||
PKG_VERSION:=4.4.0
|
PKG_VERSION:=4.4.0
|
||||||
PKG_RELEASE:=3
|
PKG_RELEASE:=4
|
||||||
|
|
||||||
PKG_LICENSE:=BSD-3-Clause
|
PKG_LICENSE:=BSD-3-Clause
|
||||||
PKG_LICENSE_FILES:=LICENSE
|
PKG_LICENSE_FILES:=LICENSE
|
||||||
|
|
|
@ -7,6 +7,8 @@ config dhcrelay ipv4
|
||||||
|
|
||||||
# network interfaces to listen on (e.g. lan or wan)
|
# network interfaces to listen on (e.g. lan or wan)
|
||||||
option 'interfaces' ''
|
option 'interfaces' ''
|
||||||
|
option 'upstream_interfaces' ''
|
||||||
|
option 'downstream_interfaces' ''
|
||||||
|
|
||||||
# What to do about packets that already have a relay option:
|
# What to do about packets that already have a relay option:
|
||||||
# 'append': Forward and append our own relay option
|
# 'append': Forward and append our own relay option
|
||||||
|
|
|
@ -25,6 +25,18 @@ start() {
|
||||||
append args "-i $ifname"
|
append args "-i $ifname"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
config_get interfaces ipv4 upstream_interfaces
|
||||||
|
for net in $interfaces; do
|
||||||
|
if network_get_device ifname "$net"; then
|
||||||
|
append args "-iu $ifname"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
config_get interfaces ipv4 downstream_interfaces
|
||||||
|
for net in $interfaces; do
|
||||||
|
if network_get_device ifname "$net"; then
|
||||||
|
append args "-id $ifname"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
# link selection sub-option (RFC3527)
|
# link selection sub-option (RFC3527)
|
||||||
local link_selection
|
local link_selection
|
||||||
|
|
Loading…
Reference in New Issue