From 28fe999af9cbbe9254cfd5f3e95b68818ac74d41 Mon Sep 17 00:00:00 2001 From: Henning Brauer Date: Thu, 4 Jun 2009 22:45:33 +0000 Subject: turn ipvcrap on on the interface in question. sake bottle pushed by theo, tested by naddy --- usr.sbin/rtsold/if.c | 10 ++++++++-- 1 file 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)); -- cgit v1.2.3