summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorOtto Moerbeek <otto@cvs.openbsd.org>2004-08-08 19:09:34 +0000
committerOtto Moerbeek <otto@cvs.openbsd.org>2004-08-08 19:09:34 +0000
commit1499b7cac95c6a5e2e57f6179505336da5eabe2d (patch)
tree766cdcba4cde8bda6fb70684f439c03a0d58d5f5 /sys
parent889f3d21fbb021429b724ecdb8320c3eb9cde03f (diff)
Zero route info structure in rtredirect(), avoiding a panic on label
copy. ok millert@ deraadt@ henning@
Diffstat (limited to 'sys')
-rw-r--r--sys/net/route.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/net/route.c b/sys/net/route.c
index d96e42183a2..14626e875ef 100644
--- a/sys/net/route.c
+++ b/sys/net/route.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: route.c,v 1.47 2004/08/03 11:22:15 henning Exp $ */
+/* $OpenBSD: route.c,v 1.48 2004/08/08 19:09:33 otto Exp $ */
/* $NetBSD: route.c,v 1.14 1996/02/13 22:00:46 christos Exp $ */
/*
@@ -431,6 +431,7 @@ rtredirect(dst, gateway, netmask, flags, src, rtp)
if (rt)
rtfree(rt);
flags |= RTF_GATEWAY | RTF_DYNAMIC;
+ bzero(&info, sizeof(info));
info.rti_info[RTAX_DST] = dst;
info.rti_info[RTAX_GATEWAY] = gateway;
info.rti_info[RTAX_NETMASK] = netmask;