If we specify the interface that's the one we should grep for the address of!

This commit is contained in:
Andrew McMillan 2007-11-27 18:05:22 +13:00
parent 045b369c69
commit aa928076f3

View File

@ -9,7 +9,7 @@ DUMP="tcp port ${PORT}"
IPCLAUSE="" IPCLAUSE=""
if [ "${IFACE}" != "any" ]; then if [ "${IFACE}" != "any" ]; then
IP="`ip addr show dev wlan0 | grep ' inet ' | tr -s ' ' | cut -f3 -d' ' | cut -f1 -d'/'`" IP="`ip addr show dev ${IFACE} | grep ' inet ' | tr -s ' ' | cut -f3 -d' ' | cut -f1 -d'/'`"
IPCLAUSE=" and ((src host ${IP} and src port ${PORT}) or (dst host ${IP} and dst port ${PORT}))" IPCLAUSE=" and ((src host ${IP} and src port ${PORT}) or (dst host ${IP} and dst port ${PORT}))"
fi fi