diff options
author | Lucas Christian <lucas@lucasec.com> | 2024-02-10 11:26:47 -0800 |
---|---|---|
committer | Lucas Christian <lucas@lucasec.com> | 2024-03-10 11:40:23 -0700 |
commit | 92012a0b3db8e93b10db4137414073f0371ed8cc (patch) | |
tree | 4ae0c6080b2f4d9066a9b4b1ec31f0090059fb35 /src/etc/dhcp/dhclient-exit-hooks.d/99-ipsec-dhclient-hook | |
parent | cd8ef21f280f726955f537132e3fab2bcb3c286f (diff) | |
download | vyos-1x-92012a0b3db8e93b10db4137414073f0371ed8cc.tar.gz vyos-1x-92012a0b3db8e93b10db4137414073f0371ed8cc.zip |
T5872: further fixes to ipsec dhcp exit hook
Diffstat (limited to 'src/etc/dhcp/dhclient-exit-hooks.d/99-ipsec-dhclient-hook')
-rwxr-xr-x | src/etc/dhcp/dhclient-exit-hooks.d/99-ipsec-dhclient-hook | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/etc/dhcp/dhclient-exit-hooks.d/99-ipsec-dhclient-hook b/src/etc/dhcp/dhclient-exit-hooks.d/99-ipsec-dhclient-hook index 4dc52c6db..3f0c9cb7a 100755 --- a/src/etc/dhcp/dhclient-exit-hooks.d/99-ipsec-dhclient-hook +++ b/src/etc/dhcp/dhclient-exit-hooks.d/99-ipsec-dhclient-hook @@ -14,22 +14,22 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -if [ "$reason" == "REBOOT" ] || [ "$reason" == "EXPIRE" ]; then - return 0 -fi - DHCP_HOOK_IFLIST="/tmp/ipsec_dhcp_waiting" if [ -f $DHCP_HOOK_IFLIST ] && [ "$reason" == "BOUND" ]; then if grep -qw $interface $DHCP_HOOK_IFLIST; then sudo rm $DHCP_HOOK_IFLIST sudo /usr/libexec/vyos/conf_mode/vpn_ipsec.py - return 0 + exit 0 fi fi -if [ "$old_ip_address" == "$new_ip_address" ] && [ "$reason" == "BOUND" ]; then - return 0 +if [ "$reason" == "RENEW" ] || [ "$reason" == "REBIND" ]; then + if [ "$old_ip_address" == "$new_ip_address" ]; then + exit 0 + fi +else + exit 0 fi python3 - <<PYEND |