mirror of
https://gitlab.com/shorewall/code.git
synced 2025-06-19 17:28:35 +02:00
Merge multiple provider over single interface speedup from branches/4.2
git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@8878 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
parent
6b16d3f386
commit
5797e058c7
@ -988,18 +988,20 @@ find_echo() {
|
|||||||
#
|
#
|
||||||
find_mac() # $1 = IP address, $2 = interface
|
find_mac() # $1 = IP address, $2 = interface
|
||||||
{
|
{
|
||||||
qt ping -nc 1 -t 2 -I $2 $1
|
if interface_is_usable $2 ; then
|
||||||
|
qt ping -nc 1 -t 2 -I $2 $1
|
||||||
|
|
||||||
local result
|
local result
|
||||||
result=$(arp -na | awk "/[(]$1[)].* $2$/ {print \$4}")
|
result=$(arp -na | awk "/[(]$1[)].* $2$/ {print \$4}")
|
||||||
|
|
||||||
case $result in
|
case $result in
|
||||||
\<*\>)
|
\<*\>)
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
[ -n "$result" ] && echo $result
|
[ -n "$result" ] && echo $result
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
#
|
#
|
||||||
|
Loading…
x
Reference in New Issue
Block a user