diff options
author | 2009-06-04 22:45:32 +0000 | |
---|---|---|
committer | 2009-06-04 22:45:32 +0000 | |
commit | 493299347b1d7a37bbea0254e70fe074e17fe9e8 (patch) | |
tree | 8360c615e242184bf1032ea2dbb3b2b8fdeef4c3 | |
parent | change imsg_close() return type to void. It never fails nor does it (diff) | |
download | wireguard-openbsd-493299347b1d7a37bbea0254e70fe074e17fe9e8.tar.xz wireguard-openbsd-493299347b1d7a37bbea0254e70fe074e17fe9e8.zip |
turn ipvcrap on on the interface in question. sake bottle pushed by theo,
tested by naddy
-rw-r--r-- | usr.sbin/rtsold/if.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/usr.sbin/rtsold/if.c b/usr.sbin/rtsold/if.c index 3d58076ba36..c9804dc0116 100644 --- a/usr.sbin/rtsold/if.c +++ b/usr.sbin/rtsold/if.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if.c,v 1.22 2009/02/02 22:06:00 chl Exp $ */ +/* $OpenBSD: if.c,v 1.23 2009/06/04 22:45:32 henning Exp $ */ /* $KAME: if.c,v 1.18 2002/05/31 10:10:03 itojun Exp $ */ /* @@ -80,8 +80,14 @@ interface_up(char *name) struct ifreq ifr; int llflag; - strncpy(ifr.ifr_name, name, sizeof(ifr.ifr_name)); + strlcpy(ifr.ifr_name, name, sizeof(ifr.ifr_name)); + if (ioctl(ifsock, SIOCGIFXFLAGS, (caddr_t)&ifr) < 0) + warn("SIOCGIFXFLAGS"); + ifr.ifr_flags &= ~IFXF_NOINET6; + if (ioctl(ifsock, SIOCSIFXFLAGS, (caddr_t)&ifr) < 0) + warn("SIOCSIFXFLAGS"); + strlcpy(ifr.ifr_name, name, sizeof(ifr.ifr_name)); if (ioctl(ifsock, SIOCGIFFLAGS, (caddr_t)&ifr) < 0) { warnmsg(LOG_WARNING, __func__, "ioctl(SIOCGIFFLAGS): %s", strerror(errno)); |