summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbluhm <bluhm@openbsd.org>2013-11-05 21:04:52 +0000
committerbluhm <bluhm@openbsd.org>2013-11-05 21:04:52 +0000
commit131c651236ca38c426665c54fd802049a4538b04 (patch)
tree681f05dead624d6998d0b16332b4c0bace32f79b
parentCleanup, no functional change: (diff)
downloadwireguard-openbsd-131c651236ca38c426665c54fd802049a4538b04.tar.xz
wireguard-openbsd-131c651236ca38c426665c54fd802049a4538b04.zip
Fix ifconfig with IPv6 tunnel addresses which was broken by the
vxlan(4) commit. found by todd@; OK reyk@
-rw-r--r--sbin/ifconfig/ifconfig.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sbin/ifconfig/ifconfig.c b/sbin/ifconfig/ifconfig.c
index 1e1059527f3..d58326d6bc0 100644
--- a/sbin/ifconfig/ifconfig.c
+++ b/sbin/ifconfig/ifconfig.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ifconfig.c,v 1.275 2013/10/28 15:05:35 deraadt Exp $ */
+/* $OpenBSD: ifconfig.c,v 1.276 2013/11/05 21:04:52 bluhm Exp $ */
/* $NetBSD: ifconfig.c,v 1.40 1997/10/01 02:19:43 enami Exp $ */
/*
@@ -3163,7 +3163,8 @@ settunnel(const char *src, const char *dst)
int ecode;
struct if_laddrreq req;
- if (strchr (dst, ':') == NULL) {
+ if (strchr(dst, ':') == NULL || strchr(dst, ':') != strrchr(dst, ':')) {
+ /* no port or IPv6 */
dstip = dst;
dstport = NULL;
} else {