On Thu, Jan 28, 2016 at 12:06:38PM +0800, Antonio Quartulli wrote:
On Thu, Jan 28, 2016 at 04:54:19AM +0100, Andrew Lunn wrote:
When running within a network namespace, access to files within debugfs have to take into account the network name space. Each namespace has its own directory under /sys/kernel/debug/batman_adv/netns.
Thanks for providing the batctl patch Andrew.
What do you think about documenting this feature in the README file as well? Imho a few words in the "How does it work?" section plus an example on how to use it would be really nice!
Yes, i can do that. Here is a little example for three nodes which i used for testing.
Andrew
EMU1="ip netns exec emu1" EMU2="ip netns exec emu2"
ip netns add emu1 ip netns add emu2
ip link add emu1-veth1 type veth peer name emu2-veth1 ip link set emu1-veth1 netns emu1 ip link set emu2-veth1 netns emu2
$EMU1 ip link set emu1-veth1 name veth1 $EMU2 ip link set emu2-veth1 name veth1
$EMU1 ip link set veth1 up $EMU2 ip link set veth1 up
ip link add emu1-veth2 type veth peer name veth2 ip link set emu1-veth2 netns emu1 $EMU1 ip link set emu1-veth2 name veth2
$EMU1 ip link set veth2 up ip link set veth2 up
$EMU1 batctl if add veth1 $EMU1 batctl if add veth2 $EMU1 ip link set bat0 up
$EMU2 batctl if add veth1 $EMU2 ip link set bat0 up
batctl if add veth2 ip link set bat0 up
# Give DAD time to complete echo Waiting for DAD sleep 4
($EMU1 alfred -m -i bat0 -u /var/run/emu1-alfred.soc) & ($EMU2 alfred -m -i bat0 -u /var/run/emu2-alfred.soc) & alfred -m -i bat0 &
sleep 1
($EMU1 batadv-vis -s -u /var/run/emu1-alfred.soc) & ($EMU2 batadv-vis -s -u /var/run/emu2-alfred.soc) & batadv-vis -s &