Merge branch '4.4.22'

This commit is contained in:
Tom Eastep 2011-08-03 07:20:57 -07:00
commit b0fe8e1e60
5 changed files with 29 additions and 11 deletions

View File

@ -2315,7 +2315,7 @@ sub qt( $ ) {
print "SYS----> @_\n"; print "SYS----> @_\n";
system( "@_ 2>&1" ); system( "@_ 2>&1" );
} else { } else {
system( "@_ > /dev/null 2>&1" ) == 0; system( "@_ > /dev/null 2>&1 < /dev/null" ) == 0;
} }
} }

View File

@ -1989,8 +1989,8 @@ EOF
emit <<'EOF'; emit <<'EOF';
if [ -f ${VARDIR}/proxyarp ]; then if [ -f ${VARDIR}/proxyarp ]; then
while read address interface external haveroute; do while read address interface external haveroute; do
qt $IP -4 neigh del proxy $address dev $external qtnoin $IP -4 neigh del proxy $address dev $external
[ -z "${haveroute}${g_noroutes}" ] && qt $IP -4 route del $address/32 dev $interface [ -z "${haveroute}${g_noroutes}" ] && qtnoin $IP -4 route del $address/32 dev $interface
f=/proc/sys/net/ipv4/conf/$interface/proxy_arp f=/proc/sys/net/ipv4/conf/$interface/proxy_arp
[ -f $f ] && echo 0 > $f [ -f $f ] && echo 0 > $f
done < ${VARDIR}/proxyarp done < ${VARDIR}/proxyarp
@ -2003,8 +2003,8 @@ EOF
emit <<'EOF'; emit <<'EOF';
if [ -f ${VARDIR}/proxyndp ]; then if [ -f ${VARDIR}/proxyndp ]; then
while read address interface external haveroute; do while read address interface external haveroute; do
qt $IP -6 neigh del proxy $address dev $external qtnoin $IP -6 neigh del proxy $address dev $external
[ -z "${haveroute}${g_noroutes}" ] && qt $IP -6 route del $address/128 dev $interface [ -z "${haveroute}${g_noroutes}" ] && qtnoin $IP -6 route del $address/128 dev $interface
f=/proc/sys/net/ipv4/conf/$interface/proxy_ndp f=/proc/sys/net/ipv4/conf/$interface/proxy_ndp
[ -f $f ] && echo 0 > $f [ -f $f ] && echo 0 > $f
done < ${VARDIR}/proxyndp done < ${VARDIR}/proxyndp

View File

@ -270,7 +270,7 @@ get_interface_bcasts() # $1 = interface
# #
del_ip_addr() # $1 = address, $2 = interface del_ip_addr() # $1 = address, $2 = interface
{ {
[ $(find_first_interface_address_if_any $2) = $1 ] || qt $IP addr del $1 dev $2 [ $(find_first_interface_address_if_any $2) = $1 ] || qtnoin $IP addr del $1 dev $2
} }
# Add IP Aliases # Add IP Aliases
@ -622,8 +622,8 @@ conditionally_flush_conntrack() {
delete_proxyarp() { delete_proxyarp() {
if [ -f ${VARDIR}/proxyarp ]; then if [ -f ${VARDIR}/proxyarp ]; then
while read address interface external haveroute; do while read address interface external haveroute; do
qt $IP -4 neigh del proxy $address dev $external qtnoin $IP -4 neigh del proxy $address dev $external
[ -z "${haveroute}${g_noroutes}" ] && qt $IP -4 route del $address/32 dev $interface [ -z "${haveroute}${g_noroutes}" ] && qtnoin $IP -4 route del $address/32 dev $interface
f=/proc/sys/net/ipv4/conf/$interface/proxy_arp f=/proc/sys/net/ipv4/conf/$interface/proxy_arp
[ -f $f ] && echo 0 > $f [ -f $f ] && echo 0 > $f
done < ${VARDIR}/proxyarp done < ${VARDIR}/proxyarp

View File

@ -164,12 +164,21 @@ qt()
"$@" >/dev/null 2>&1 "$@" >/dev/null 2>&1
} }
#
# Suppress all output and input - mainly for preventing leaked file descriptors
# to avoid SELinux denials
#
qtnoin()
{
"$@" </dev/null >/dev/null 2>&1
}
qt1() qt1()
{ {
local status local status
while [ 1 ]; do while [ 1 ]; do
"$@" >/dev/null 2>&1 "$@" </dev/null >/dev/null 2>&1
status=$? status=$?
[ $status -ne 4 ] && return $status [ $status -ne 4 ] && return $status
done done
@ -179,7 +188,7 @@ qt1()
# Determine if Shorewall is "running" # Determine if Shorewall is "running"
# #
shorewall_is_started() { shorewall_is_started() {
qt $IPTABLES -L shorewall -n qt1 $IPTABLES -L shorewall -n
} }
# #

View File

@ -186,12 +186,21 @@ qt()
"$@" >/dev/null 2>&1 "$@" >/dev/null 2>&1
} }
#
# Suppress all output and input - mainly for preventing leaked file descriptors
# to avoid SELinux denials
#
qtnoin()
{
"$@" </dev/null >/dev/null 2>&1
}
qt1() qt1()
{ {
local status local status
while [ 1 ]; do while [ 1 ]; do
"$@" >/dev/null 2>&1 "$@" </dev/null >/dev/null 2>&1
status=$? status=$?
[ $status -ne 4 ] && return $status [ $status -ne 4 ] && return $status
done done