diff options
author | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2009-06-04 14:49:08 -0700 |
---|---|---|
committer | An-Cheng Huang <ancheng@vyatta.com> | 2009-06-12 15:19:01 -0700 |
commit | 6bd650f8ebcf63008a5a8dbbff19f56224857310 (patch) | |
tree | 8bc24fb7af087c952c22738bcdb702bd45a9e84f | |
parent | 6f008c2a35b5ab2e7e85d8bd0771e5c4badab955 (diff) | |
download | vyatta-cfg-6bd650f8ebcf63008a5a8dbbff19f56224857310.tar.gz vyatta-cfg-6bd650f8ebcf63008a5a8dbbff19f56224857310.zip |
Make sure interface name regex are anchored
Bug 4501
This solves the problem that 'show interfaces ethernet' also
shows pseudo ethernet (peth0) device. The problem was that peth0
matched the regex since it was missing start/end.
(cherry picked from commit 71fb6be3ac3d7ce3c7f08b1408c8c9a6b9fc0422)
-rw-r--r-- | templates/interfaces/ethernet/node.tag/duplex/node.def | 2 | ||||
-rw-r--r-- | templates/interfaces/ethernet/node.tag/speed/node.def | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/templates/interfaces/ethernet/node.tag/duplex/node.def b/templates/interfaces/ethernet/node.tag/duplex/node.def index 4600533..9277729 100644 --- a/templates/interfaces/ethernet/node.tag/duplex/node.def +++ b/templates/interfaces/ethernet/node.tag/duplex/node.def @@ -5,7 +5,7 @@ syntax:expression: $VAR(@) in "auto", "half", "full"; "duplex must be auto, half commit:expression: ( $VAR(@) == "auto" && $VAR(../speed/@) == "auto" ) || \ ( $VAR(@) != "auto" && $VAR(../speed/@) != "auto" ) ; \ "if duplex is hardcoded, speed must also be hardcoded" -update: /opt/vyatta/sbin/vyatta-interfaces.pl --dev=$(../@) \ +update: /opt/vyatta/sbin/vyatta-interfaces.pl --dev=$VAR(../@) \ --speed-duplex $VAR(../speed/@) $VAR(@) comp_help:Possible completions: auto\t\tAuto negotiation (default) diff --git a/templates/interfaces/ethernet/node.tag/speed/node.def b/templates/interfaces/ethernet/node.tag/speed/node.def index 436e481..e822df9 100644 --- a/templates/interfaces/ethernet/node.tag/speed/node.def +++ b/templates/interfaces/ethernet/node.tag/speed/node.def @@ -5,7 +5,7 @@ syntax:expression: $VAR(@) in "auto", "10", "100", "1000", "2500", "10000"; "Spe commit:expression: ( $VAR(@) == "auto" && $VAR(../duplex/@) == "auto" ) || \ ( $VAR(@) != "auto" && $VAR(../duplex/@) != "auto" ) ; \ "if speed is hardcoded, duplex must also be hardcoded" -update: /opt/vyatta/sbin/vyatta-interfaces.pl --dev=$(../@) \ +update: /opt/vyatta/sbin/vyatta-interfaces.pl --dev=$VAR(../@) \ --speed-duplex $VAR(@) $VAR(../duplex/@) comp_help:Possible completions: auto\t\tAuto negotiation (default) |