summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorThomas Mangin <thomas.mangin@exa.net.uk>2020-04-10 21:17:38 +0100
committerThomas Mangin <thomas.mangin@exa.net.uk>2020-04-11 11:23:42 +0100
commitcf51589163956bb53c55493c27b177a9d2d5c806 (patch)
treeb6bb2ba3ed7f147a58cb6ac5b9d5e0b9a6d1ca7a /src
parent927c98f23a6317e2e3565032023d68b753d71037 (diff)
downloadvyos-1x-cf51589163956bb53c55493c27b177a9d2d5c806.tar.gz
vyos-1x-cf51589163956bb53c55493c27b177a9d2d5c806.zip
dhcp: T2265: v4/v6 conflict for lease file
The vyatta-dhclient-hook is not differentiating between v4 and v6 and attempting to use the same lease file for both protocol. Therefore only dhcp v4 or v6 could be setup on an interface and not both.
Diffstat (limited to 'src')
-rw-r--r--src/etc/dhcp/dhclient-exit-hooks.d/vyatta-dhclient-hook7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/etc/dhcp/dhclient-exit-hooks.d/vyatta-dhclient-hook b/src/etc/dhcp/dhclient-exit-hooks.d/vyatta-dhclient-hook
index dcd06644f..eeb8b0782 100644
--- a/src/etc/dhcp/dhclient-exit-hooks.d/vyatta-dhclient-hook
+++ b/src/etc/dhcp/dhclient-exit-hooks.d/vyatta-dhclient-hook
@@ -22,8 +22,13 @@
# To enable this script set the following variable to "yes"
RUN="yes"
+proto=""
+if [[ $reason =~ (REBOOT6|INIT6|EXPIRE6|RELEASE6|STOP6|INFORM6|BOUND6|REBIND6|DELEGATED6) ]]; then
+ proto="v6"
+fi
+
if [ "$RUN" = "yes" ]; then
- LOG=/var/lib/dhcp/dhclient_"$interface"_lease
+ LOG=/var/lib/dhcp/dhclient_"$interface"."$proto"lease
echo `date` > $LOG
for i in reason interface new_expiry new_dhcp_lease_time medium \