From cf51589163956bb53c55493c27b177a9d2d5c806 Mon Sep 17 00:00:00 2001 From: Thomas Mangin Date: Fri, 10 Apr 2020 21:17:38 +0100 Subject: 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. --- src/etc/dhcp/dhclient-exit-hooks.d/vyatta-dhclient-hook | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src') 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 \ -- cgit v1.2.3