diff --git a/miniupnpd/Changelog.txt b/miniupnpd/Changelog.txt index 256af19..ff56279 100644 --- a/miniupnpd/Changelog.txt +++ b/miniupnpd/Changelog.txt @@ -1,5 +1,8 @@ $Id: Changelog.txt,v 1.242 2011/11/18 11:21:20 nanard Exp $ +2012/01/02: + Fixing netfilter/iptables_*.sh scripts for new ifconfig output format. + 2011/11/18: avoid infinite loop in SendResp_upnphttp() in case of error Replaced SendResp_upnphttp() + CloseSocket_upnphttp() by diff --git a/miniupnpd/netfilter/iptables_init.sh b/miniupnpd/netfilter/iptables_init.sh index 357a095..d3510dc 100755 --- a/miniupnpd/netfilter/iptables_init.sh +++ b/miniupnpd/netfilter/iptables_init.sh @@ -4,7 +4,7 @@ IPTABLES=/sbin/iptables #change this parameters : EXTIF=eth0 -EXTIP="`LC_ALL=C /sbin/ifconfig $EXTIF | grep 'inet addr' | awk '{print $2}' | sed -e 's/.*://'`" +EXTIP="`LC_ALL=C /sbin/ifconfig $EXTIF | grep 'inet ' | awk '{print $2}' | sed -e 's/.*://'`" echo "External IP = $EXTIP" #adding the MINIUPNPD chain for nat diff --git a/miniupnpd/netfilter/iptables_init_and_clean.sh b/miniupnpd/netfilter/iptables_init_and_clean.sh index aaa90a1..0b1ab47 100755 --- a/miniupnpd/netfilter/iptables_init_and_clean.sh +++ b/miniupnpd/netfilter/iptables_init_and_clean.sh @@ -5,7 +5,7 @@ EXTIF=eth0 IPTABLES=/sbin/iptables -EXTIP="`LC_ALL=C /sbin/ifconfig $EXTIF | grep 'inet addr' | awk '{print $2}' | sed -e 's/.*://'`" +EXTIP="`LC_ALL=C /sbin/ifconfig $EXTIF | grep 'inet ' | awk '{print $2}' | sed -e 's/.*://'`" NDIRTY="`LC_ALL=C /sbin/iptables -t nat -L -n | grep 'MINIUPNPD' | awk '{printf $1}'`" FDIRTY="`LC_ALL=C /sbin/iptables -t filter -L -n | grep 'MINIUPNPD' | awk '{printf $1}'`" echo "External IP = $EXTIP" diff --git a/miniupnpd/netfilter/iptables_removeall.sh b/miniupnpd/netfilter/iptables_removeall.sh index d5ab275..4299cc2 100755 --- a/miniupnpd/netfilter/iptables_removeall.sh +++ b/miniupnpd/netfilter/iptables_removeall.sh @@ -4,7 +4,7 @@ IPTABLES=/sbin/iptables #change this parameters : EXTIF=eth0 -EXTIP="`LC_ALL=C /sbin/ifconfig $EXTIF | grep 'inet addr' | awk '{print $2}' | sed -e 's/.*://'`" +EXTIP="`LC_ALL=C /sbin/ifconfig $EXTIF | grep 'inet ' | awk '{print $2}' | sed -e 's/.*://'`" #removing the MINIUPNPD chain for nat $IPTABLES -t nat -F MINIUPNPD