diff options
author | Simon <965089+sarthurdev@users.noreply.github.com> | 2021-05-28 11:56:47 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-28 11:56:47 +0200 |
commit | c2c0bfe4be1e335dbf38b287aea82b511b7af999 (patch) | |
tree | 7f59e45f8692c615e14eb02b7c19e4963a8cc3f9 /scripts/vyos-update-nhrp.pl | |
parent | b0e814806d528abfae7c069c554736c16059f3ce (diff) | |
download | vyos-nhrp-c2c0bfe4be1e335dbf38b287aea82b511b7af999.tar.gz vyos-nhrp-c2c0bfe4be1e335dbf38b287aea82b511b7af999.zip |
nhrp: T3585: Fix syntax to updated 'interfaces tunnel' syntax
Diffstat (limited to 'scripts/vyos-update-nhrp.pl')
-rw-r--r-- | scripts/vyos-update-nhrp.pl | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/scripts/vyos-update-nhrp.pl b/scripts/vyos-update-nhrp.pl index 35c423c..c51aac0 100644 --- a/scripts/vyos-update-nhrp.pl +++ b/scripts/vyos-update-nhrp.pl @@ -105,7 +105,7 @@ sub configure_nhrp_tunnels { if (@nhrp_tunnels) { foreach my $nhrp_tunnel(@nhrp_tunnels) { if (grep {$_ eq $nhrp_tunnel} @tunnels) { - if ($config_tun->returnValue("$nhrp_tunnel encapsulation") eq "gre" && ! $config_tun->exists("$nhrp_tunnel remote-ip")) { + if ($config_tun->returnValue("$nhrp_tunnel encapsulation") eq "gre" && ! $config_tun->exists("$nhrp_tunnel remote")) { my @conf_file = tunnel_config($nhrp_tunnel); open (my $fh,">>$conffile"); foreach (@conf_file) { @@ -457,12 +457,12 @@ sub create_nhrp_iptables { $config_tun->setLevel("interfaces tunnel"); - if ( $config_tun->exists("$tun local-ip")) { - if ( $config_tun->exists("$tun remote-ip")) { + if ( $config_tun->exists("$tun source-address")) { + if ( $config_tun->exists("$tun remote")) { print ("$tun is not 'mGRE' tunnel'\n"); exit 1; } - my $local_ip = $config_tun->returnValue("$tun local-ip"); + my $local_ip = $config_tun->returnValue("$tun source-address"); system ("sudo iptables -N VYOS_NHRP_${tun}_OUT_HOOK") == 0 or die "System call failed: $!"; system ("sudo iptables -A VYOS_NHRP_${tun}_OUT_HOOK -p gre -s ${local_ip} -d 224.0.0.0/4 -j DROP") == 0 or die "System call failed: $!"; |