Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#284 iptables output emits UUOC

open
nobody
API (9)
5
2011-01-11
2011-01-11
Jan Engelhardt
No

cat file | while read xyz; do ... done
Should be
while read xyz; do ... done <file

--->
reset_iptables_v6() {
$IP6TABLES -P OUTPUT DROP
$IP6TABLES -P INPUT DROP
$IP6TABLES -P FORWARD DROP

cat /proc/net/ip6_tables_names | while read table; do
$IP6TABLES -t $table -L -n | while read c chain rest; do
if test "X$c" = "XChain" ; then
$IP6TABLES -t $table -F $chain
fi
done
$IP6TABLES -t $table -X
done
}
# same for ipv4

Discussion