Commit 1813e6f0 authored by Henrik Riomar's avatar Henrik Riomar

main/dhcp: fix vrf support

dhcrelay init.d overrides start(), due to this the built in vrf support
in openrc does not work. Due to this dhcrelay init.d must handle the
vrf support.
parent 492e0955
Pipeline #59781 passed with stages
in 9 minutes and 4 seconds
......@@ -2,7 +2,7 @@
pkgname=dhcp
pkgver=4.4.2
_realver=${pkgver/_p/-P}
pkgrel=3
pkgrel=4
pkgdesc="ISC Dynamic Host Configuration Protocol (DHCP)"
url="https://www.isc.org/"
arch="all"
......@@ -196,7 +196,7 @@ d5697a56fbbff25199962608986e7ffb533ed4afd3e344e3c79d2010dda73cc0b088f06c454e9f0c
ff07f613da93de6d6a81cf5147ecc937e1405913f1649bf9c58d45214417e6b94b3fd897796d1dd3422ed27a43d935a84d7c72df98d59f30abd88b12f4f6edad segfault-fix.patch
fcc9f3c5a361e8a5fa690986c415a23e86c347f697aec3087c5783670d4abefcb0f073a37cfac8fe07206ac3e349df9cb7283b84356cdc4f4777b426ab0305ef remove-duplicate-definitions.patch
d1dce58875793316761f168e29feddc1d3454d1d917d063d43ae102b7b6aab256c3cb420478335c57ebcdb2b7c804afa4d8a1f9ab06a29a4dd23bc5d87db8df2 dhclient-script-alpine
ce62693cb483616844bb6774f9046af6a1a210e35cfaa59ab3bd12f68d50176714a324e92538b35139110b78191866f65b30d6979d8a45f7b68e572e7a1e8427 dhcrelay.initd
fd15dbaa4c61c3c26f407bf13dde859470a1adba134da064b653ccc152ce42635ee8de2fe113ae21ba8470e97e3caad8c1a47b69eb25e5e92b40e26790b96f6d dhcrelay.confd
4e5d7bf7e5e55dbbc1961378e0abebce9931e794cbafef053255f6eec74a37e2111364b4212b3dac94dca428a005b80a068c3e7c894039b295c21a9cb575b5e1 dhcrelay.initd
970ee381dd6a7e0e30d71e28597d17074421ac167b233f597a129ed9b977cba1026375a020dff2613c3f4d458b71ed9fe4447abfcf5edf27b395e6f2b00f0982 dhcrelay.confd
7b7a77b7826b475a4113ebeee54501ce417cc56e85754301a82a185d88b4713d198f615a366e63e0e2b0aef988c8137dcd1e18c4036d993378257079da17693d dhcpd.confd
1f78c4f64a891012b4de029c50934b284ad80313959e06b0f29416f33a9e4f0deca8b61e9224a683a92faf8a08e8b7c075bc6e833ab73b6305c0d6d9712d0baf dhcpd.initd"
......@@ -11,3 +11,6 @@
# Space separated list of IPs to forward BOOTP/DHCP packets to.
DHCRELAY_SERVERS=""
# vrf e.g 'vrf-int'
#vrf=""
......@@ -15,6 +15,12 @@ start() {
return 1
fi
# If we are configured to run in a VRF, provide a hint for that
RC_VRF_EXEC=""
if [ -n "$vrf" ]; then
RC_VRF_EXEC="/sbin/ip vrf exec $vrf"
fi
local IFACES= i=
for i in ${IFACE} ; do
IFACES="${IFACES} -i ${i}"
......@@ -23,7 +29,7 @@ start() {
checkpath --directory --owner dhcp:dhcp /run/dhcp
ebegin "Starting dhcrelay"
start-stop-daemon --start --exec /usr/sbin/dhcrelay \
eval ${RC_VRF_EXEC} start-stop-daemon --start --exec /usr/sbin/dhcrelay \
-- -q ${IFACES} ${DHCRELAY_OPTS} ${DHCRELAY_SERVERS}
eend $?
}
......
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