refactor: remove add_nat_rule

it did too little to be worthwhile
This commit is contained in:
Matthias Radestock committed 2014-10-24 13:03:28 +01:00
1 parent 093b23fa83
commit de96742935
1 file changed
+3 -7
+3 -7
View File
@@ -73,10 +73,6 @@ add_iptables_rule() {
fi
}
add_nat_rule() {
add_iptables_rule nat "$@"
}
create_bridge() {
[ ! -d /sys/class/net/$BRIDGE ] && {
ip link add name $BRIDGE type bridge
@@ -106,9 +102,9 @@ destroy_bridge() {
setup_masquerading() {
run_iptables -t nat -N WEAVE >/dev/null 2>&1 || true
add_nat_rule POSTROUTING -j WEAVE
add_nat_rule WEAVE -o $BRIDGE ! -s $1 -j MASQUERADE
add_nat_rule WEAVE -s $1 ! -o $BRIDGE -j MASQUERADE
add_iptables_rule nat POSTROUTING -j WEAVE
add_iptables_rule nat WEAVE -o $BRIDGE ! -s $1 -j MASQUERADE
add_iptables_rule nat WEAVE -s $1 ! -o $BRIDGE -j MASQUERADE
}
stop_masquerading() {