cd870708d5c770eed5c9e1e832c25b9710be2682
[openwrt/svn-archive/archive.git] / net / miniupnpd / patches / 100-iptables-wan-device-name.patch
1 Index: miniupnpd-1.1/netfilter/iptables_init.sh
2 ===================================================================
3 --- miniupnpd-1.1.orig/netfilter/iptables_init.sh 2007-09-17 17:43:54.000000000 -0500
4 +++ miniupnpd-1.1/netfilter/iptables_init.sh 2007-09-17 17:43:54.000000000 -0500
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.1/netfilter/iptables_removeall.sh
20 ===================================================================
21 --- miniupnpd-1.1.orig/netfilter/iptables_removeall.sh 2007-09-17 17:43:54.000000000 -0500
22 +++ miniupnpd-1.1/netfilter/iptables_removeall.sh 2007-09-17 17:43:54.000000000 -0500
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