packages/net/miniupnpd/patches/100-iptables-wan-device-name.patch
thepeople 2d74523cfd fix external ip address detection
git-svn-id: svn://svn.openwrt.org/openwrt/packages@6973 3c298f89-4303-0410-b956-a3cf2f4a3e73
2007-04-16 13:18:37 +00:00

34 lines
1.2 KiB
Diff

diff -urN miniupnpd.orig/linux/iptables_init.sh miniupnpd/linux/iptables_init.sh
--- miniupnpd.orig/linux/iptables_init.sh 2007-04-13 10:02:22.291113712 -0500
+++ miniupnpd/linux/iptables_init.sh 2007-04-13 10:04:33.346190312 -0500
@@ -1,9 +1,12 @@
#! /bin/sh
# $Id: iptables_init.sh,v 1.3 2006/11/23 12:32:57 nanard Exp $
+. /etc/functions.sh
IPTABLES=iptables
#change this parameters :
-EXTIF=eth0
+include /lib/network
+scan_interfaces
+config_get EXTIF wan ifname
EXTIP="`LC_ALL=C /sbin/ifconfig $EXTIF | grep 'inet addr' | awk '{print $2}' | sed -e 's/.*://'`"
echo "External IP = $EXTIP"
diff -urN miniupnpd.orig/linux/iptables_removeall.sh miniupnpd/linux/iptables_removeall.sh
--- miniupnpd.orig/linux/iptables_removeall.sh 2007-04-13 10:01:53.455497392 -0500
+++ miniupnpd/linux/iptables_removeall.sh 2007-04-13 10:04:19.444303720 -0500
@@ -1,9 +1,12 @@
#! /bin/sh
# $Id: iptables_removeall.sh,v 1.3 2006/11/23 12:32:57 nanard Exp $
+. /etc/functions.sh
IPTABLES=iptables
#change this parameters :
-EXTIF=eth0
+include /lib/network
+scan_interfaces
+config_get EXTIF wan ifname
EXTIP="`LC_ALL=C /sbin/ifconfig $EXTIF | grep 'inet addr' | awk '{print $2}' | sed -e 's/.*://'`"
#removing the MINIUPNPD chain for nat