From 74972145b2310d4de2c9cd9897850041f6918741 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Mon, 9 Oct 2006 18:06:31 +0000 Subject: [PATCH] add masquerading rules in olsrd init if hna for lan is not present SVN-Revision: 4995 --- openwrt/package/olsrd/files/olsrd.init | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/openwrt/package/olsrd/files/olsrd.init b/openwrt/package/olsrd/files/olsrd.init index a72353d7ca..1f99097f70 100644 --- a/openwrt/package/olsrd/files/olsrd.init +++ b/openwrt/package/olsrd/files/olsrd.init @@ -31,9 +31,13 @@ EOF cat /etc/olsrd.conf ) | awk -f /usr/lib/parse-config.awk > /tmp/olsrd.conf iptables -D forwarding_rule -i "$wifi_ifname" -j ACCEPT 2>/dev/null >/dev/null # no duplicates please - iptables -D forwarding_rule -o "$wifi_ifname" -j ACCEPT 2>/dev/null >/dev/null # no duplicates please + iptables -D forwarding_rule -o "$wifi_ifname" -j ACCEPT 2>/dev/null >/dev/null iptables -A forwarding_rule -i "$wifi_ifname" -j ACCEPT iptables -A forwarding_rule -o "$wifi_ifname" -j ACCEPT + [ -z "$HNA_IP" ] && { + iptables -t nat -D POSTROUTING -o "$wifi_ifname" -j MASQUERADE 2>/dev/null >/dev/null + iptables -t nat -A POSTROUTING -o "$wifi_ifname" -j MASQUERADE + } olsrd $OPTIONS ;; *) -- 2.30.2