From 9be762af869658d6af86bddf8777493bbbd2535a Mon Sep 17 00:00:00 2001
From: Christian Poessinger <christian@poessinger.com>
Date: Fri, 4 Dec 2020 13:50:49 +0100
Subject: T1579: migrate "ip source-validation" option to vyos-1x

---
 interface-templates/ip/node.def                   |  1 -
 interface-templates/ip/source-validation/node.def | 45 -----------------------
 interface-templates/ipv6/node.def                 |  1 -
 3 files changed, 47 deletions(-)
 delete mode 100644 interface-templates/ip/node.def
 delete mode 100644 interface-templates/ip/source-validation/node.def
 delete mode 100644 interface-templates/ipv6/node.def

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
-- 
cgit v1.2.3