summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniil Baturin <daniil@baturin.org>2014-08-02 00:52:41 +0200
committerDaniil Baturin <daniil@baturin.org>2014-08-02 00:52:41 +0200
commita8252c83039123ee511318bd0d9a8e4b26f11523 (patch)
tree285cf33d09786146ced83e83bd21dec3ad689e89
parente3610d837ffc5c87bb6e5a1dc71b69c5529be239 (diff)
downloadvyatta-cfg-system-a8252c83039123ee511318bd0d9a8e4b26f11523.tar.gz
vyatta-cfg-system-a8252c83039123ee511318bd0d9a8e4b26f11523.zip
Bug #246: add multicast querier toggle to bridge.
-rw-r--r--templates/interfaces/bridge/node.tag/igmp-snooping/node.def1
-rw-r--r--templates/interfaces/bridge/node.tag/igmp-snooping/querier/node.def21
2 files changed, 22 insertions, 0 deletions
diff --git a/templates/interfaces/bridge/node.tag/igmp-snooping/node.def b/templates/interfaces/bridge/node.tag/igmp-snooping/node.def
new file mode 100644
index 00000000..13471e47
--- /dev/null
+++ b/templates/interfaces/bridge/node.tag/igmp-snooping/node.def
@@ -0,0 +1 @@
+help: IGMP snooping settings
diff --git a/templates/interfaces/bridge/node.tag/igmp-snooping/querier/node.def b/templates/interfaces/bridge/node.tag/igmp-snooping/querier/node.def
new file mode 100644
index 00000000..d1fdf034
--- /dev/null
+++ b/templates/interfaces/bridge/node.tag/igmp-snooping/querier/node.def
@@ -0,0 +1,21 @@
+type: txt
+
+help: Enable of disable IGMP querier
+
+val_help: enable; Enable IGMP querier
+val_help: disable; Disable IGMP querier
+
+default: "disable"
+
+syntax:expression: $VAR(@) in "enable", "disable"; "querier option value must be enable or disable"
+
+update:
+ if [ x$VAR(@) == xenable ]; then
+ sudo sh -c "echo 1 > /sys/devices/virtual/net/$VAR(../../@)/bridge/multicast_querier"
+ else
+ sudo sh -c "echo 0 > /sys/devices/virtual/net/$VAR(../../@)/bridge/multicast_querier"
+ fi
+
+delete:
+ sudo sh -c "echo 0 > /sys/devices/virtual/net/$VAR(../../@)/bridge/multicast_querier"
+