packages/net/miniupnpd/patches/100-iptables-wan-device-name.patch
olli d7830540a3 Update miniupnpd: 1.0-RC5 > 1.0-RC6
git-svn-id: svn://svn.openwrt.org/openwrt/packages@7802 3c298f89-4303-0410-b956-a3cf2f4a3e73
2007-06-30 16:40:06 +00:00

37 lines
1.3 KiB
Diff

Index: miniupnpd-1.0-RC6/linux/iptables_init.sh
===================================================================
--- miniupnpd-1.0-RC6.orig/linux/iptables_init.sh 2007-06-30 18:30:56.000000000 +0200
+++ miniupnpd-1.0-RC6/linux/iptables_init.sh 2007-06-30 18:30:57.000000000 +0200
@@ -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"
Index: miniupnpd-1.0-RC6/linux/iptables_removeall.sh
===================================================================
--- miniupnpd-1.0-RC6.orig/linux/iptables_removeall.sh 2007-06-30 18:30:56.000000000 +0200
+++ miniupnpd-1.0-RC6/linux/iptables_removeall.sh 2007-06-30 18:30:57.000000000 +0200
@@ -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