summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Bluhm <bluhm@cvs.openbsd.org>2013-11-05 21:04:53 +0000
committerAlexander Bluhm <bluhm@cvs.openbsd.org>2013-11-05 21:04:53 +0000
commit25d541a566b9368285b8b1554da056153bd49815 (patch)
treeb60d9c87aca4461a0ce49ff5563922f11b4fa1c0
parent5fd73121dd5f0d0304bb27597049614c51835609 (diff)
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 {