f502f7fd5df553a4412dd49ef31cf2239d900f00
[openwrt/svn-archive/archive.git] / net / miniupnpd / patches / 100-iptables-wan-device-name.patch
1 Index: miniupnpd-1.0-RC6/linux/iptables_init.sh
2 ===================================================================
3 --- miniupnpd-1.0-RC6.orig/linux/iptables_init.sh 2007-06-30 18:30:56.000000000 +0200
4 +++ miniupnpd-1.0-RC6/linux/iptables_init.sh 2007-06-30 18:30:57.000000000 +0200
5 @@ -1,9 +1,12 @@
6 #! /bin/sh
7 # $Id: iptables_init.sh,v 1.3 2006/11/23 12:32:57 nanard Exp $
8 +. /etc/functions.sh
9 IPTABLES=iptables
10
11 #change this parameters :
12 -EXTIF=eth0
13 +include /lib/network
14 +scan_interfaces
15 +config_get EXTIF wan ifname
16 EXTIP="`LC_ALL=C /sbin/ifconfig $EXTIF | grep 'inet addr' | awk '{print $2}' | sed -e 's/.*://'`"
17 echo "External IP = $EXTIP"
18
19 Index: miniupnpd-1.0-RC6/linux/iptables_removeall.sh
20 ===================================================================
21 --- miniupnpd-1.0-RC6.orig/linux/iptables_removeall.sh 2007-06-30 18:30:56.000000000 +0200
22 +++ miniupnpd-1.0-RC6/linux/iptables_removeall.sh 2007-06-30 18:30:57.000000000 +0200
23 @@ -1,9 +1,12 @@
24 #! /bin/sh
25 # $Id: iptables_removeall.sh,v 1.3 2006/11/23 12:32:57 nanard Exp $
26 +. /etc/functions.sh
27 IPTABLES=iptables
28
29 #change this parameters :
30 -EXTIF=eth0
31 +include /lib/network
32 +scan_interfaces
33 +config_get EXTIF wan ifname
34 EXTIP="`LC_ALL=C /sbin/ifconfig $EXTIF | grep 'inet addr' | awk '{print $2}' | sed -e 's/.*://'`"
35
36 #removing the MINIUPNPD chain for nat