From 07081897e718b22fbe2eefa1efb6e8ae06aefc16 Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Mon, 8 Aug 2011 16:29:40 -0700 Subject: bridge: allow setting mac address Bug 7164 set interface bridge br0 mac 00:01:02:03:04:05 --- templates/interfaces/bridge/node.def | 4 +++- templates/interfaces/bridge/node.tag/mac/node.def | 4 ++++ 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 templates/interfaces/bridge/node.tag/mac/node.def diff --git a/templates/interfaces/bridge/node.def b/templates/interfaces/bridge/node.def index 9deaa0a4..c20b361c 100644 --- a/templates/interfaces/bridge/node.def +++ b/templates/interfaces/bridge/node.def @@ -6,6 +6,9 @@ val_help: ; Bridge interface name syntax:expression: pattern $VAR(@) "^br[0-9]+$" ; "Must be (br0 - br999)" create: /usr/sbin/brctl addbr $VAR(@) + if [ -n "$VAR(mac/@)" ] ; then + ip li set dev $VAR(@) address $VAR(mac/@) + fi ip link set $VAR(@) up delete: if ! /opt/vyatta/sbin/vyatta-bridgegroup-depedency.pl \ @@ -15,4 +18,3 @@ delete: if ! /opt/vyatta/sbin/vyatta-bridgegroup-depedency.pl \ fi ip link set $VAR(@) down; /usr/sbin/brctl delbr $VAR(@); - diff --git a/templates/interfaces/bridge/node.tag/mac/node.def b/templates/interfaces/bridge/node.tag/mac/node.def new file mode 100644 index 00000000..5b797830 --- /dev/null +++ b/templates/interfaces/bridge/node.tag/mac/node.def @@ -0,0 +1,4 @@ +type: macaddr +help: Media Access Control (MAC) address +syntax:expression: exec "\ + /opt/vyatta/sbin/vyatta-interfaces.pl --dev $VAR(../@) --valid-mac $VAR(@)" -- cgit v1.2.3 From 676fbdb31cc3164125574db985ddfea790652451 Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Mon, 8 Aug 2011 16:43:34 -0700 Subject: 0.19.110 --- debian/changelog | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/debian/changelog b/debian/changelog index 1ac5eb5d..5e4251db 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +vyatta-cfg-system (0.19.110) unstable; urgency=low + + * bridge: allow setting mac address + + -- Stephen Hemminger Mon, 08 Aug 2011 16:43:34 -0700 + vyatta-cfg-system (0.19.109) unstable; urgency=low * 0.19.108 -- cgit v1.2.3