Up to [cvs.NetBSD.org] / src / sys / sys
Request diff between arbitrary revisions
Default branch: MAIN
Current tag: nick-csl-alignment-base5
Revision 1.88 / (download) - annotate - [select for diffs], Thu Aug 30 02:17:39 2007 UTC (16 years, 6 months ago) by dyoung
Branch: MAIN
CVS Tags: nick-csl-alignment-base5
Changes since 1.87: +4 -3
lines
Diff to previous 1.87 (colored)
Use malloc(9) for sockaddrs instead of pool(9), and remove dom_sa_pool and dom_sa_len members from struct domain. Pools of fixed-size objects are too rigid for sockaddr_dls, whose size can vary over a wide range. Return sockaddr_dl to its "historical" size. Now that I'm using malloc(9) instead of pool(9) to allocate sockaddr_dl, I can create a sockaddr_dl of any size in the kernel, so expanding sockaddr_dl is useless. Avoid using sizeof(struct sockaddr_dl) in the kernel. Introduce sockaddr_dl_alloc() for allocating & initializing an arbitrary sockaddr_dl on the heap. Add an argument, the sockaddr length, to sockaddr_alloc(), sockaddr_copy(), and sockaddr_dl_setaddr(). Constify: LLADDR() -> CLLADDR(). Where the kernel overwrites LLADDR(), use sockaddr_dl_setaddr(), instead. Used properly, sockaddr_dl_setaddr() will not overrun the end of the sockaddr.