summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2020-12-04 13:50:49 +0100
committerChristian Poessinger <christian@poessinger.com>2020-12-04 13:50:49 +0100
commit9be762af869658d6af86bddf8777493bbbd2535a (patch)
tree9a24ff55af71202dd30cb2c59a0c1bb4055d2086
parenta6188249200ea2daf7861ea790a52fbdadd9b941 (diff)
downloadvyatta-cfg-quagga-9be762af869658d6af86bddf8777493bbbd2535a.tar.gz
vyatta-cfg-quagga-9be762af869658d6af86bddf8777493bbbd2535a.zip
T1579: migrate "ip source-validation" option to vyos-1x
-rw-r--r--interface-templates/ip/node.def1
-rw-r--r--interface-templates/ip/source-validation/node.def45
-rw-r--r--interface-templates/ipv6/node.def1
3 files changed, 0 insertions, 47 deletions
diff --git a/interface-templates/ip/node.def b/interface-templates/ip/node.def
deleted file mode 100644
index 85dfeded..00000000
--- a/interface-templates/ip/node.def
+++ /dev/null
@@ -1 +0,0 @@
-help: IPv4 routing parameters
diff --git a/interface-templates/ip/source-validation/node.def b/interface-templates/ip/source-validation/node.def
deleted file mode 100644
index df7bcb8a..00000000
--- a/interface-templates/ip/source-validation/node.def
+++ /dev/null
@@ -1,45 +0,0 @@
-priority: 610
-# rp_filter
-# default value - 0
-# The max value from conf/{all,interface}/rp_filter is used
-# when doing source validation on the {interface}.
-
-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
-val_help: loose; Enable Loose Reverse Path Forwarding as defined in RFC3704
-val_help: disable; No source validation
-
-syntax:expression: $VAR(@) in "strict", "loose", "disable"; "source-validation must be set to 'loose', 'strict' or 'disable'"
-
-update:
- read all < /proc/sys/net/ipv4/conf/all/rp_filter
- if [ x$VAR(@) == xstrict ]; then
- new=1
- elif [ x$VAR(@) == xloose ]; then
- new=2
- else
- new=0
- fi
-
- if [ "$all" -gt "$new" ]; then
- echo "Warning: global source-validation overrides per interface"
- global="disable"
- if [ "$all" -eq 1 ]; then
- global=strict
- elif [ "$all" -eq 2 ]; then
- global=loose
- fi
- echo "Global value is $global"
- fi
- if [ -d /sys/class/net/$IFNAME ] ; then
- sudo sh -c "echo $new > \
- /proc/sys/net/ipv4/conf/$IFNAME/rp_filter"
- fi
-
-delete:
- if [ -d /sys/class/net/$IFNAME ] ; then
- sudo sh -c "echo 0 > /proc/sys/net/ipv4/conf/$IFNAME/rp_filter"
- fi
diff --git a/interface-templates/ipv6/node.def b/interface-templates/ipv6/node.def
deleted file mode 100644
index 539673c9..00000000
--- a/interface-templates/ipv6/node.def
+++ /dev/null
@@ -1 +0,0 @@
-help: IPv6 routing parameters