]> git.ipfire.org Git - people/ms/network.git/commit
Split port hooks in to (create|remove|up|down) actions
authorMichael Tremer <michael.tremer@ipfire.org>
Tue, 23 Dec 2014 00:29:15 +0000 (00:29 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Tue, 23 Dec 2014 00:29:15 +0000 (00:29 +0000)
commit1ba6a2bb3a8d7038e3e282bb82f44357de229643
treeeab9569b845b20912b8da2ce3603c59c588c39df
parent5bc016ba313173f66edeeb269fe550d7d6b873a1
Split port hooks in to (create|remove|up|down) actions

The port hooks formerly had two functions that brought the device
up or down. That caused some problems with hotplugging of the zones.

Now the entire process has been split into four functions that
every port hooks has to implement.

create:
Creates the device but does not bring it up yet. This will
usually trigger a hotplug event so that various other port
or zone hooks can attach the device or do similar actions.

up:
Essentially brings up the device, just like:
  ip link set devX up

The action should propagate to any slave devices.

down:
Does essentially the opposite of "up" and should propagate
to the slaves as well.

remove:
Removes any virtual devices and cleans up. This will also
trigger a hotplug event so that all connected hooks will
be notified about the removal.
16 files changed:
src/functions/functions.hook
src/functions/functions.ports
src/functions/functions.settings
src/functions/functions.zone
src/header-port
src/header-zone
src/hooks/ports/batman-adv
src/hooks/ports/bonding
src/hooks/ports/dummy
src/hooks/ports/ethernet
src/hooks/ports/vlan
src/hooks/ports/wireless-adhoc
src/hooks/ports/wireless-ap
src/hooks/zones/bridge
src/network
src/udev/network-hotplug