Commit f2c750fe authored by Sven Eckelmann's avatar Sven Eckelmann Committed by Simon Wunderlich

batman-adv: Use rtnl link in device creation example

The standard kernel API to add new virtual interfaces and attach other
interfaces to it is rtnl-link. batman-adv supports it since v3.10. This
functionality should be used instead of the legacy batman-adv-only sysfs
interface.
Signed-off-by: default avatarSven Eckelmann <sven@narfation.org>
Signed-off-by: default avatarMarek Lindner <mareklindner@neomailbox.ch>
Signed-off-by: default avatarSimon Wunderlich <sw@simonwunderlich.de>
parent 9791860c
...@@ -43,10 +43,15 @@ new interfaces to verify the compatibility. There is no need to ...@@ -43,10 +43,15 @@ new interfaces to verify the compatibility. There is no need to
reload the module if you plug your USB wifi adapter into your ma- reload the module if you plug your USB wifi adapter into your ma-
chine after batman advanced was initially loaded. chine after batman advanced was initially loaded.
To activate a given interface simply write "bat0" into its The batman-adv soft-interface can be created using the iproute2
"mesh_iface" file inside the batman_adv subfolder: tool "ip"
# echo bat0 > /sys/class/net/eth0/batman_adv/mesh_iface # ip link add name bat0 type batadv
To activate a given interface simply attach it to the "bat0"
interface
# ip link set dev eth0 master bat0
Repeat this step for all interfaces you wish to add. Now batman Repeat this step for all interfaces you wish to add. Now batman
starts using/broadcasting on this/these interface(s). starts using/broadcasting on this/these interface(s).
...@@ -56,10 +61,10 @@ By reading the "iface_status" file you can check its status: ...@@ -56,10 +61,10 @@ By reading the "iface_status" file you can check its status:
# cat /sys/class/net/eth0/batman_adv/iface_status # cat /sys/class/net/eth0/batman_adv/iface_status
# active # active
To deactivate an interface you have to write "none" into its To deactivate an interface you have to detach it from the
"mesh_iface" file: "bat0" interface:
# echo none > /sys/class/net/eth0/batman_adv/mesh_iface # ip link set dev eth0 nomaster
All mesh wide settings can be found in batman's own interface All mesh wide settings can be found in batman's own interface
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment