From 0e4f190ebf5a26e4b66fb49cd74ae0ff0c7e0863 Mon Sep 17 00:00:00 2001 From: paul Date: Thu, 12 Jun 2003 02:13:45 +0000 Subject: 2003-06-12 Paul Jakma * zebra/ioctl.c: Properly zero-out struct ifreq before passing it to the SIOCSIFFLAGS ioctl(2), so that it doesn't occasionally trigger promisc mode on interface. Reported/tested by: Vladimir B. Grebenschikov (patch snarfed taken from FreeBSD ports) --- zebra/ioctl.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'zebra/ioctl.c') diff --git a/zebra/ioctl.c b/zebra/ioctl.c index f8e7f22b..1a682e27 100644 --- a/zebra/ioctl.c +++ b/zebra/ioctl.c @@ -364,6 +364,7 @@ if_set_flags (struct interface *ifp, unsigned long flags) int ret; struct ifreq ifreq; + bzero(&ifreq, sizeof(struct ifreq)); ifreq_set_name (&ifreq, ifp); ifreq.ifr_flags = ifp->flags; @@ -386,6 +387,7 @@ if_unset_flags (struct interface *ifp, unsigned long flags) int ret; struct ifreq ifreq; + bzero(&ifreq, sizeof(struct ifreq)); ifreq_set_name (&ifreq, ifp); ifreq.ifr_flags = ifp->flags; @@ -488,6 +490,9 @@ if_prefix_add_ipv6 (struct interface *ifp, struct connected *ifc) mask.sin6_len = sizeof (struct sockaddr_in6); #endif memcpy (&addreq.ifra_prefixmask, &mask, sizeof (struct sockaddr_in6)); + + addreq.ifra_lifetime.ia6t_vltime = 0xffffffff; + addreq.ifra_lifetime.ia6t_pltime = 0xffffffff; #ifdef HAVE_IFRA_LIFETIME addreq.ifra_lifetime.ia6t_pltime = ND6_INFINITE_LIFETIME; -- cgit v1.2.1