summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHenning Brauer <henning@cvs.openbsd.org>2009-06-04 22:45:33 +0000
committerHenning Brauer <henning@cvs.openbsd.org>2009-06-04 22:45:33 +0000
commit28fe999af9cbbe9254cfd5f3e95b68818ac74d41 (patch)
tree8a5984236dd2e0b737df79c4c3e96579d762cb09
parent2f210698fb6a71a6187d3b5a205462bfb483c3cf (diff)
turn ipvcrap on on the interface in question. sake bottle pushed by theo,
tested by naddy
-rw-r--r--usr.sbin/rtsold/if.c10
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));