diff options
author | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2019-08-31 13:46:15 +0000 |
---|---|---|
committer | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2019-08-31 13:46:15 +0000 |
commit | 5570f58b2c83bdae25a6971746eb7e6bc669f58c (patch) | |
tree | 1a1dd34a999a016a311358ba2c340ce6a0d8579f /sbin/route/show.h | |
parent | c11d303f41f15a1a25dbf1ffcbebf91b86ef9556 (diff) |
The algorithm creating the routing addresses in route(8) and arp(6)
were still not correct. While the values written to the kernel are
fine, the bytes for padding were taken from memory after the sockaddr
structs.
In route(8) the union of sockaddrs can be made larger, so that the
padding is taken from there.
In arp(8) the size of the struct is known. Copy only the struct
and advance over the padding. The memory has been zeroed before.
Merge all address size fixes from arp(8) into ndp(8).
OK claudio@
Diffstat (limited to 'sbin/route/show.h')
-rw-r--r-- | sbin/route/show.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sbin/route/show.h b/sbin/route/show.h index f0ef7531da7..6108f3d7994 100644 --- a/sbin/route/show.h +++ b/sbin/route/show.h @@ -1,4 +1,4 @@ -/* $OpenBSD: show.h,v 1.14 2018/05/01 18:13:21 florian Exp $ */ +/* $OpenBSD: show.h,v 1.15 2019/08/31 13:46:14 bluhm Exp $ */ /* * Copyright (c) 2004 Claudio Jeker <claudio@openbsd.org> @@ -26,6 +26,7 @@ union sockunion { struct sockaddr_dl sdl; struct sockaddr_rtlabel rtlabel; struct sockaddr_mpls smpls; + struct sockaddr_storage padding; }; void get_rtaddrs(int, struct sockaddr *, struct sockaddr **); |