diff options
author | Thomas Mangin <thomas.mangin@exa.net.uk> | 2020-04-10 21:17:38 +0100 |
---|---|---|
committer | Thomas Mangin <thomas.mangin@exa.net.uk> | 2020-04-11 11:23:42 +0100 |
commit | cf51589163956bb53c55493c27b177a9d2d5c806 (patch) | |
tree | b6bb2ba3ed7f147a58cb6ac5b9d5e0b9a6d1ca7a /src/etc/dhcp/dhclient-exit-hooks.d/vyatta-dhclient-hook | |
parent | 927c98f23a6317e2e3565032023d68b753d71037 (diff) | |
download | vyos-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/etc/dhcp/dhclient-exit-hooks.d/vyatta-dhclient-hook')
-rw-r--r-- | src/etc/dhcp/dhclient-exit-hooks.d/vyatta-dhclient-hook | 7 |
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 \ |