diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2006-02-21 15:34:00 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2006-02-21 15:34:00 +0000 |
commit | 7956e13240b91ad207cb04ec2a30f3d013c3abc6 (patch) | |
tree | 6c0ec33455b580c79436ad2af97dbcea3baeb9cb /sys/netinet/in.c | |
parent | 9b7aea669cd96a62cd1fcfef410c57217dc11711 (diff) |
Fix a panic reported by D.Snezhkov by issuing an ifconfig command with
-alias and netmask used at the same time. This resulted in a corrupted
routing table and a panic in rn_walktree after the interface was destroyed.
OK krw@ henning@
Diffstat (limited to 'sys/netinet/in.c')
-rw-r--r-- | sys/netinet/in.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/netinet/in.c b/sys/netinet/in.c index 9b5a946579d..4e9f456bb86 100644 --- a/sys/netinet/in.c +++ b/sys/netinet/in.c @@ -1,4 +1,4 @@ -/* $OpenBSD: in.c,v 1.41 2005/06/03 08:14:01 pascoe Exp $ */ +/* $OpenBSD: in.c,v 1.42 2006/02/21 15:33:59 claudio Exp $ */ /* $NetBSD: in.c,v 1.26 1996/02/13 23:41:39 christos Exp $ */ /* @@ -275,6 +275,7 @@ in_control(so, cmd, data, ifp) TAILQ_INSERT_TAIL(&ifp->if_addrlist, (struct ifaddr *)ia, ifa_list); ia->ia_addr.sin_family = AF_INET; + ia->ia_addr.sin_len = sizeof(ia->ia_addr); ia->ia_ifa.ifa_addr = sintosa(&ia->ia_addr); ia->ia_ifa.ifa_dstaddr = sintosa(&ia->ia_dstaddr); ia->ia_ifa.ifa_netmask = sintosa(&ia->ia_sockmask); |