add: tcpdump logs

master
kvaps 2018-01-26 22:54:20 +01:00
parent b99e7f6f18
commit d193ef325f
1 changed files with 8 additions and 2 deletions

View File

@ -80,8 +80,14 @@ address_is_free(){
ARP_PACKETS=${ARP_PACKETS:-4}
# Start recording packets
tcpdump -nn -i "$BRIDGE" arp host "$1" 1>/dev/null 2>/tmp/tcpdump.out &
# Start recording packets
if [ "$DEBUG" == 1 ]; then
tcpdump -nn -i "$BRIDGE" arp host "$1" 2>/tmp/tcpdump.out 1>&2 &
else
tcpdump -nn -i "$BRIDGE" arp host "$1" 2>/tmp/tcpdump.out 1>/dev/null &
fi
# Wait for tcpdump
until [ -f /tmp/tcpdump.out ]; do sleep 0.1; done