diff options
author | 2004-08-08 19:09:33 +0000 | |
---|---|---|
committer | 2004-08-08 19:09:33 +0000 | |
commit | 1c7a2e7125abe7a9a9452ae921d20d6e5d7a36cd (patch) | |
tree | 04c023b018f01371332dddfb601a659d4eec56a5 | |
parent | spacing (diff) | |
download | wireguard-openbsd-1c7a2e7125abe7a9a9452ae921d20d6e5d7a36cd.tar.xz wireguard-openbsd-1c7a2e7125abe7a9a9452ae921d20d6e5d7a36cd.zip |
Zero route info structure in rtredirect(), avoiding a panic on label
copy.
ok millert@ deraadt@ henning@
-rw-r--r-- | sys/net/route.c | 3 |
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; |