diff options
author | Daniil Baturin <daniil@baturin.org> | 2017-09-08 16:50:55 +0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-09-08 16:50:55 +0700 |
commit | 89e93de5dc239c9f7d868b525054de2b887fa5b8 (patch) | |
tree | 99487368b4a71d84fdd0670b3ba2fd0cde67e780 | |
parent | 371a82ff2a351f33188e3dec7fabb6d3dbb5ffb0 (diff) | |
parent | 444e6fffa5866216979219d6fd826320d826d30f (diff) | |
download | vyatta-cfg-quagga-89e93de5dc239c9f7d868b525054de2b887fa5b8.tar.gz vyatta-cfg-quagga-89e93de5dc239c9f7d868b525054de2b887fa5b8.zip |
Merge pull request #15 from c-po/t345-delete-vti
T345 Fix VTI interface deletion
-rw-r--r-- | interface-templates/ip/source-validation/node.def | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/interface-templates/ip/source-validation/node.def b/interface-templates/ip/source-validation/node.def index 036bf0c2..3ddb6aa5 100644 --- a/interface-templates/ip/source-validation/node.def +++ b/interface-templates/ip/source-validation/node.def @@ -3,8 +3,8 @@ # The max value from conf/{all,interface}/rp_filter is used # when doing source validation on the {interface}. -priority: 500 type: txt + help: Policy for source validation by reversed path, as specified in RFC3704 val_help: strict; Enable Strict Reverse Path Forwarding as defined in RFC3704 @@ -33,8 +33,12 @@ update: fi echo "Global value is $global" fi - sudo sh -c "echo $new > \ - /proc/sys/net/ipv4/conf/$IFNAME/rp_filter" + if [ -d /sys/class/net/$VAR(../@) ] ; then + sudo sh -c "echo $new > \ + /proc/sys/net/ipv4/conf/$IFNAME/rp_filter" + fi delete: - sudo sh -c "echo 0 > /proc/sys/net/ipv4/conf/$IFNAME/rp_filter" + if [ -d /sys/class/net/$VAR(../@) ] ; then + sudo sh -c "echo 0 > /proc/sys/net/ipv4/conf/$IFNAME/rp_filter" + fi |