aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsobomax <sobomax@FreeBSD.org>2002-10-07 22:43:54 +0800
committersobomax <sobomax@FreeBSD.org>2002-10-07 22:43:54 +0800
commitc04b69cc50ea27d4954608635499bea711944256 (patch)
tree4432a8c0bfe11651e4f5678fd04994e26bbe3ae0
parent745b1790d28ffddb5c89d2316ade80e54b209657 (diff)
downloadfreebsd-ports-gnome-c04b69cc50ea27d4954608635499bea711944256.tar.gz
freebsd-ports-gnome-c04b69cc50ea27d4954608635499bea711944256.tar.zst
freebsd-ports-gnome-c04b69cc50ea27d4954608635499bea711944256.zip
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>
-rw-r--r--net/zebra-devel/Makefile1
-rw-r--r--net/zebra-devel/files/patch-ioctl.c29
-rw-r--r--net/zebra-pj/Makefile1
-rw-r--r--net/zebra-pj/files/patch-ioctl.c29
-rw-r--r--net/zebra/Makefile1
-rw-r--r--net/zebra/files/patch-ioctl.c29
6 files changed, 75 insertions, 15 deletions
diff --git a/net/zebra-devel/Makefile b/net/zebra-devel/Makefile
index 0bdf991b3047..72c8ee8beb4e 100644
--- a/net/zebra-devel/Makefile
+++ b/net/zebra-devel/Makefile
@@ -7,6 +7,7 @@
PORTNAME= zebra
PORTVERSION= 0.93b
+PORTREVISION= 1
CATEGORIES= net ipv6
MASTER_SITES= ftp://ftp.zebra.org/pub/zebra/ \
ftp://ftp.ripe.net/mirrors/sites/ftp.zebra.org/pub/zebra/ \
diff --git a/net/zebra-devel/files/patch-ioctl.c b/net/zebra-devel/files/patch-ioctl.c
index 2c06a9b189e5..aadb3ab5c5dd 100644
--- a/net/zebra-devel/files/patch-ioctl.c
+++ b/net/zebra-devel/files/patch-ioctl.c
@@ -1,6 +1,25 @@
---- zebra/ioctl.c.orig Wed Dec 12 18:02:16 2001
-+++ zebra/ioctl.c Wed Dec 12 18:02:30 2001
-@@ -478,6 +478,9 @@
+
+$FreeBSD$
+
+--- zebra/ioctl.c.orig Tue Oct 23 11:31:29 2001
++++ zebra/ioctl.c Fri Oct 4 19:45:04 2002
+@@ -349,6 +349,7 @@
+ int ret;
+ struct ifreq ifreq;
+
++ bzero(&ifreq, sizeof(struct ifreq));
+ ifreq_set_name (&ifreq, ifp);
+
+ ifreq.ifr_flags = ifp->flags;
+@@ -371,6 +372,7 @@
+ int ret;
+ struct ifreq ifreq;
+
++ bzero(&ifreq, sizeof(struct ifreq));
+ ifreq_set_name (&ifreq, ifp);
+
+ ifreq.ifr_flags = ifp->flags;
+@@ -473,6 +475,9 @@
mask.sin6_len = sizeof (struct sockaddr_in6);
#endif
memcpy (&addreq.ifra_prefixmask, &mask, sizeof (struct sockaddr_in6));
@@ -8,5 +27,5 @@
+ addreq.ifra_lifetime.ia6t_vltime = 0xffffffff;
+ addreq.ifra_lifetime.ia6t_pltime = 0xffffffff;
- ret = if_ioctl_ipv6 (SIOCAIFADDR_IN6, (caddr_t) &addreq);
- if (ret < 0)
+ addreq.ifra_lifetime.ia6t_pltime = ND6_INFINITE_LIFETIME;
+ addreq.ifra_lifetime.ia6t_vltime = ND6_INFINITE_LIFETIME;
diff --git a/net/zebra-pj/Makefile b/net/zebra-pj/Makefile
index 0bdf991b3047..72c8ee8beb4e 100644
--- a/net/zebra-pj/Makefile
+++ b/net/zebra-pj/Makefile
@@ -7,6 +7,7 @@
PORTNAME= zebra
PORTVERSION= 0.93b
+PORTREVISION= 1
CATEGORIES= net ipv6
MASTER_SITES= ftp://ftp.zebra.org/pub/zebra/ \
ftp://ftp.ripe.net/mirrors/sites/ftp.zebra.org/pub/zebra/ \
diff --git a/net/zebra-pj/files/patch-ioctl.c b/net/zebra-pj/files/patch-ioctl.c
index 2c06a9b189e5..aadb3ab5c5dd 100644
--- a/net/zebra-pj/files/patch-ioctl.c
+++ b/net/zebra-pj/files/patch-ioctl.c
@@ -1,6 +1,25 @@
---- zebra/ioctl.c.orig Wed Dec 12 18:02:16 2001
-+++ zebra/ioctl.c Wed Dec 12 18:02:30 2001
-@@ -478,6 +478,9 @@
+
+$FreeBSD$
+
+--- zebra/ioctl.c.orig Tue Oct 23 11:31:29 2001
++++ zebra/ioctl.c Fri Oct 4 19:45:04 2002
+@@ -349,6 +349,7 @@
+ int ret;
+ struct ifreq ifreq;
+
++ bzero(&ifreq, sizeof(struct ifreq));
+ ifreq_set_name (&ifreq, ifp);
+
+ ifreq.ifr_flags = ifp->flags;
+@@ -371,6 +372,7 @@
+ int ret;
+ struct ifreq ifreq;
+
++ bzero(&ifreq, sizeof(struct ifreq));
+ ifreq_set_name (&ifreq, ifp);
+
+ ifreq.ifr_flags = ifp->flags;
+@@ -473,6 +475,9 @@
mask.sin6_len = sizeof (struct sockaddr_in6);
#endif
memcpy (&addreq.ifra_prefixmask, &mask, sizeof (struct sockaddr_in6));
@@ -8,5 +27,5 @@
+ addreq.ifra_lifetime.ia6t_vltime = 0xffffffff;
+ addreq.ifra_lifetime.ia6t_pltime = 0xffffffff;
- ret = if_ioctl_ipv6 (SIOCAIFADDR_IN6, (caddr_t) &addreq);
- if (ret < 0)
+ addreq.ifra_lifetime.ia6t_pltime = ND6_INFINITE_LIFETIME;
+ addreq.ifra_lifetime.ia6t_vltime = ND6_INFINITE_LIFETIME;
diff --git a/net/zebra/Makefile b/net/zebra/Makefile
index 0bdf991b3047..72c8ee8beb4e 100644
--- a/net/zebra/Makefile
+++ b/net/zebra/Makefile
@@ -7,6 +7,7 @@
PORTNAME= zebra
PORTVERSION= 0.93b
+PORTREVISION= 1
CATEGORIES= net ipv6
MASTER_SITES= ftp://ftp.zebra.org/pub/zebra/ \
ftp://ftp.ripe.net/mirrors/sites/ftp.zebra.org/pub/zebra/ \
diff --git a/net/zebra/files/patch-ioctl.c b/net/zebra/files/patch-ioctl.c
index 2c06a9b189e5..aadb3ab5c5dd 100644
--- a/net/zebra/files/patch-ioctl.c
+++ b/net/zebra/files/patch-ioctl.c
@@ -1,6 +1,25 @@
---- zebra/ioctl.c.orig Wed Dec 12 18:02:16 2001
-+++ zebra/ioctl.c Wed Dec 12 18:02:30 2001
-@@ -478,6 +478,9 @@
+
+$FreeBSD$
+
+--- zebra/ioctl.c.orig Tue Oct 23 11:31:29 2001
++++ zebra/ioctl.c Fri Oct 4 19:45:04 2002
+@@ -349,6 +349,7 @@
+ int ret;
+ struct ifreq ifreq;
+
++ bzero(&ifreq, sizeof(struct ifreq));
+ ifreq_set_name (&ifreq, ifp);
+
+ ifreq.ifr_flags = ifp->flags;
+@@ -371,6 +372,7 @@
+ int ret;
+ struct ifreq ifreq;
+
++ bzero(&ifreq, sizeof(struct ifreq));
+ ifreq_set_name (&ifreq, ifp);
+
+ ifreq.ifr_flags = ifp->flags;
+@@ -473,6 +475,9 @@
mask.sin6_len = sizeof (struct sockaddr_in6);
#endif
memcpy (&addreq.ifra_prefixmask, &mask, sizeof (struct sockaddr_in6));
@@ -8,5 +27,5 @@
+ addreq.ifra_lifetime.ia6t_vltime = 0xffffffff;
+ addreq.ifra_lifetime.ia6t_pltime = 0xffffffff;
- ret = if_ioctl_ipv6 (SIOCAIFADDR_IN6, (caddr_t) &addreq);
- if (ret < 0)
+ addreq.ifra_lifetime.ia6t_pltime = ND6_INFINITE_LIFETIME;
+ addreq.ifra_lifetime.ia6t_vltime = ND6_INFINITE_LIFETIME;