diff options
author | paul <paul> | 2003-06-12 02:13:45 +0000 |
---|---|---|
committer | paul <paul> | 2003-06-12 02:13:45 +0000 |
commit | 0e4f190ebf5a26e4b66fb49cd74ae0ff0c7e0863 (patch) | |
tree | cb2d35c5a85e8dd5f70db46604e6dda55b9bc9f4 /zebra | |
parent | 9238b1e82efd5c6a7192491e2ccde2dfa32322c8 (diff) |
2003-06-12 Paul Jakma <paul@dishone.st>
* 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 <vova@sw.ru>
(patch snarfed taken from FreeBSD ports)
Diffstat (limited to 'zebra')
-rw-r--r-- | zebra/ioctl.c | 5 |
1 files changed, 5 insertions, 0 deletions
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; |