summaryrefslogtreecommitdiff
path: root/net-misc/miniupnpd/files/miniupnpd-2.2.3-testgetifaddr.patch
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2021-08-26 00:09:36 +0100
committerV3n3RiX <venerix@redcorelinux.org>2021-08-26 00:09:36 +0100
commitb1c81de4fadbd00897700a7321f03b390d952b2e (patch)
treee6cc812351d4f105c110cfc363ebb497e996f47a /net-misc/miniupnpd/files/miniupnpd-2.2.3-testgetifaddr.patch
parent7c59acba5699c9c58090a7a738669669a7307023 (diff)
gentoo resync : 26.08.2021
Diffstat (limited to 'net-misc/miniupnpd/files/miniupnpd-2.2.3-testgetifaddr.patch')
-rw-r--r--net-misc/miniupnpd/files/miniupnpd-2.2.3-testgetifaddr.patch14
1 files changed, 14 insertions, 0 deletions
diff --git a/net-misc/miniupnpd/files/miniupnpd-2.2.3-testgetifaddr.patch b/net-misc/miniupnpd/files/miniupnpd-2.2.3-testgetifaddr.patch
new file mode 100644
index 000000000000..73e4a87903e8
--- /dev/null
+++ b/net-misc/miniupnpd/files/miniupnpd-2.2.3-testgetifaddr.patch
@@ -0,0 +1,14 @@
+diff --git a/miniupnpd/testgetifaddr.sh b/miniupnpd/testgetifaddr.sh
+index 7ad56d9..2a26a24 100755
+--- a/testgetifaddr.sh
++++ b/testgetifaddr.sh
+@@ -12,7 +12,8 @@ case $OS in
+ *)
+ IP="`which ip`" || exit 1
+ EXTIF="`LC_ALL=C $IP -4 route | grep 'default' | sed -e 's/.*dev[[:space:]]*//' -e 's/[[:space:]].*//'`" || exit 1
+- EXTIP="`LC_ALL=C $IP -4 addr show $EXTIF | awk '/inet/ { print $2 }' | cut -d "/" -f 1`"
++ EXTIF="`LC_ALL=C $IP -4 addr show $EXTIF | awk '/[0-9]+:/ { print $2; exit 0 }' | cut -d ":" -f 1`"
++ EXTIP="`LC_ALL=C $IP -4 addr show $EXTIF | awk '/inet/ { print $2; exit 0 }' | cut -d "/" -f 1`"
+ ;;
+ esac
+