summaryrefslogtreecommitdiff
path: root/templates/system/conntrack/modules/gre
diff options
context:
space:
mode:
authorDaniil Baturin <daniil.baturin@vyatta.com>2011-11-04 04:46:00 +0700
committerDaniil Baturin <daniil.baturin@vyatta.com>2011-11-04 04:46:00 +0700
commit410023fd604af49434ed5039c99c7ee6abc99b20 (patch)
tree74e703e1d778db8ace3796c3d1fdf528b302abe7 /templates/system/conntrack/modules/gre
downloadvyatta-conntrack-410023fd604af49434ed5039c99c7ee6abc99b20.tar.gz
vyatta-conntrack-410023fd604af49434ed5039c99c7ee6abc99b20.zip
Initial commit.debian/0.1
Diffstat (limited to 'templates/system/conntrack/modules/gre')
-rw-r--r--templates/system/conntrack/modules/gre/disable/node.def21
-rw-r--r--templates/system/conntrack/modules/gre/node.def1
2 files changed, 22 insertions, 0 deletions
diff --git a/templates/system/conntrack/modules/gre/disable/node.def b/templates/system/conntrack/modules/gre/disable/node.def
new file mode 100644
index 0000000..f6f9546
--- /dev/null
+++ b/templates/system/conntrack/modules/gre/disable/node.def
@@ -0,0 +1,21 @@
+help: Disable GRE connection tracking
+
+# GRE shouldn't be disabled when PPTP is enabled because PPTP depends on it
+create: cli-shell-api exists system conntrack modules pptp disable
+ if [ $? == 0 ]; then
+ # Unload PPTP modules if they are loaded
+ lsmod | grep -e "^nf_nat_pptp" 2>&1 >/dev/null
+ if [ $? == 0 ]; then
+ sudo rmmod nf_nat_pptp
+ sudo rmmod nf_conntrack_pptp
+ fi
+ # And GRE modules then
+ sudo rmmod nf_nat_proto_gre
+ sudo rmmod nf_conntrack_proto_gre
+ else
+ echo "Error: can not disable GRE connection tracking when PPTP connection tracking is enabled!"
+ exit 1
+ fi
+
+delete: sudo modprobe nf_conntrack_proto_gre
+ sudo modprobe nf_nat_proto_gre
diff --git a/templates/system/conntrack/modules/gre/node.def b/templates/system/conntrack/modules/gre/node.def
new file mode 100644
index 0000000..d192f7d
--- /dev/null
+++ b/templates/system/conntrack/modules/gre/node.def
@@ -0,0 +1 @@
+help: GRE connection tracking settings \ No newline at end of file