Simple write checks for arp_announce and arp_ignore proc files
parent
6355ac3c23
commit
ae76016f74
|
@ -145,9 +145,18 @@ function apply_ipv4_hack {
|
|||
# I have things going through specific wires for a reason. This fixes
|
||||
# that and makes it behave as expected.
|
||||
display_c PURPLE " MULTI-NIC-ARP-LOCK"
|
||||
PROC_NET_IPV4="/proc/sys/net/ipv4/conf"
|
||||
for i in default all; do
|
||||
echo "1" > /proc/sys/net/ipv4/conf/$i/arp_ignore
|
||||
echo "2" > /proc/sys/net/ipv4/conf/$i/arp_announce
|
||||
if [ -w ${PROC_NET_IPV4}/$i/arp_ignore ]; then
|
||||
echo "1" > ${PROC_NET_IPV4}/$i/arp_ignore
|
||||
else
|
||||
display_c RED "\nError: Could not write to ${PROC_NET_IPV4}/$i/arp_ignore"
|
||||
fi
|
||||
if [ -w ${PROC_NET_IPV4}/$i/arp_announce ]; then
|
||||
echo "2" > ${PROC_NET_IPV4}/$i/arp_announce
|
||||
else
|
||||
display_c RED "\nError: Could not write to ${PROC_NET_IPV4}/$i/arp_announce"
|
||||
fi
|
||||
done
|
||||
;;
|
||||
esac
|
||||
|
|
Loading…
Reference in New Issue