From a8252c83039123ee511318bd0d9a8e4b26f11523 Mon Sep 17 00:00:00 2001 From: Daniil Baturin Date: Sat, 2 Aug 2014 00:52:41 +0200 Subject: Bug #246: add multicast querier toggle to bridge. --- .../bridge/node.tag/igmp-snooping/node.def | 1 + .../bridge/node.tag/igmp-snooping/querier/node.def | 21 +++++++++++++++++++++ 2 files changed, 22 insertions(+) create mode 100644 templates/interfaces/bridge/node.tag/igmp-snooping/node.def create mode 100644 templates/interfaces/bridge/node.tag/igmp-snooping/querier/node.def (limited to 'templates/interfaces') 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" + -- cgit v1.2.3