summaryrefslogtreecommitdiffstats
path: root/sys/netinet
diff options
context:
space:
mode:
authorbms <bms@FreeBSD.org>2004-06-18 02:04:07 +0000
committerbms <bms@FreeBSD.org>2004-06-18 02:04:07 +0000
commitf0aeb408c294739845f2c7ae018a79924f4880f4 (patch)
tree4258bb098c21db89801d39e1aa231795024fd229 /sys/netinet
parent1dc333167a3c4a3ac024082d3163cff84f6d7ca0 (diff)
downloadFreeBSD-src-f0aeb408c294739845f2c7ae018a79924f4880f4.zip
FreeBSD-src-f0aeb408c294739845f2c7ae018a79924f4880f4.tar.gz
Ensure that dst is bzeroed before calling rtalloc_ign(), to avoid possible
routing table corruption. PR: kern/40563, freebsd4/432 (KAME) Obtained from: NetBSD (in_gif.c rev 1.26.10.1) Requested by: Jean-Luc Richier
Diffstat (limited to 'sys/netinet')
-rw-r--r--sys/netinet/in_gif.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/netinet/in_gif.c b/sys/netinet/in_gif.c
index 72e2f86..873255f 100644
--- a/sys/netinet/in_gif.c
+++ b/sys/netinet/in_gif.c
@@ -177,6 +177,7 @@ in_gif_output(ifp, family, m)
if (dst->sin_family != sin_dst->sin_family ||
dst->sin_addr.s_addr != sin_dst->sin_addr.s_addr) {
/* cache route doesn't match */
+ bzero(dst, sizeof(*dst));
dst->sin_family = sin_dst->sin_family;
dst->sin_len = sizeof(struct sockaddr_in);
dst->sin_addr = sin_dst->sin_addr;
OpenPOWER on IntegriCloud