[Olsr-dev] broadcast packet filtering
Joe Gio
(spam-protected)
Mon May 5 20:26:45 CEST 2008
It has been noticed that nodes generating high broadcast traffic (bmf
encap packets for instance) will "loose" some incoming messages even
though they are clearly visible being received using tcp dump on the
wireless interface.
The problem is that "broadcast " packets sent from the local node are
looped back to any listening sockets on the same box as is the case in
bmf, so bmf has to process (discard) its own broadcasts. Since bmf is
already busy reading packets of the wired interface the wireless receive
queue starts to get backed quickly so any "real" packets received from
other nodes get dropped in the socket buff before bmf can process. This
can be confirmed using the netstat command "while sleep 1; do netstat
-a 2<&1 | grep 50698; done"
This command filters out the nodes own broadcast packets using ip tables
on the gateworks armeb board.
ADDR=`ifconfig ath0 | grep "inet addr" | awk '{print $2}'`
BCAST=`ifconfig ath0 | grep "inet addr" | awk '{print $3}'`
ADDR=`echo $ADDR | sed -e s/:/\ /g | awk '{print $2}'`
BCAST=`echo $BCAST | sed -e s/:/\ /g | awk '{print $2}'`
iptables -I INPUT -p udp --src $ADDR --dst $BCAST -j DROP
Joe Gio
More information about the Olsr-dev
mailing list