Skip to content

Commit

Permalink
Minor improvements to bridge/vlan code
Browse files Browse the repository at this point in the history
  • Loading branch information
joukewitteveen committed Mar 1, 2014
1 parent 23ae179 commit 6d83ce0
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 6 deletions.
1 change: 0 additions & 1 deletion README
Expand Up @@ -11,7 +11,6 @@ Optional:
- dialog: for the interactive assistant
- ifplugd: for automatic connection
- wpa_actiond: for automatic connection
- bridge-utils: for bridge support

For documentation generation:
- asciidoc
Expand Down
6 changes: 3 additions & 3 deletions docs/netctl.profile.5.txt
Expand Up @@ -39,8 +39,7 @@ AVAILABLE CONNECTION TYPES
+bond+::
For bonded interfaces.
+bridge+::
Network bridging. This connection type requires *brctl* to be
available.
For bridge interfaces.
+dummy+::
For dummy interfaces.
+ppp+::
Expand Down Expand Up @@ -455,7 +454,8 @@ single network interface.

All options for connections of the `ethernet' type are understood for
connections of the `vlan' type. Additionally, connections of the `vlan'
type can set a vlan identifier using 'VLANID='. See *ip*(8) for details.
type must set a vlan identifier using 'VLANID='. See *ip*(8) for
details.


SPECIAL QUOTING RULES
Expand Down
2 changes: 1 addition & 1 deletion src/lib/connections/bridge
Expand Up @@ -29,7 +29,7 @@ bridge_up() {

bridge_down() {
for member in "${BindsToInterfaces[@]}"; do
ip link set "$member" promisc off down
ip link set dev "$member" promisc off down
ip link set dev "$member" nomaster
done

Expand Down
3 changes: 3 additions & 0 deletions src/lib/connections/vlan
Expand Up @@ -10,6 +10,9 @@ vlan_up() {
if is_interface "$Interface"; then
report_error "Interface '$Interface' already exists"
return 1
elif [[ $VLANID != +([[:digit:]]) ]]; then
report_error "Invalid VLAN identifier: '$VLANID'"
return 1
else
bring_interface_up "$BindsToInterfaces"
interface_add vlan "$Interface" "$BindsToInterfaces" id "$VLANID"
Expand Down
2 changes: 1 addition & 1 deletion src/lib/network
Expand Up @@ -18,7 +18,7 @@ is_interface() {
interface_add() {
local type="$1" name="$2" link="$3"
shift 3
ip link add ${link:+link "$link"} name "$name" type "$type" "$@"
ip link add ${link:+link "$link"} name "$name" type "$type" "$@" || return
if [[ -x "$PROFILE_DIR/interfaces/$name" ]]; then
source "$PROFILE_DIR/interfaces/$name"
fi
Expand Down

0 comments on commit 6d83ce0

Please sign in to comment.