git: dc818134974a - main - netlink: properly zero all fields in the ndmsg header.
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 28 Apr 2023 14:05:50 UTC
The branch main has been updated by melifaro: URL: https://cgit.FreeBSD.org/src/commit/?id=dc818134974a6ed33c3af4c4fb15a47980093aef commit dc818134974a6ed33c3af4c4fb15a47980093aef Author: Alexander V. Chernikov <melifaro@FreeBSD.org> AuthorDate: 2023-04-28 14:04:47 +0000 Commit: Alexander V. Chernikov <melifaro@FreeBSD.org> CommitDate: 2023-04-28 14:04:47 +0000 netlink: properly zero all fields in the ndmsg header. MFC after: 3 days --- sys/netlink/route/neigh.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sys/netlink/route/neigh.c b/sys/netlink/route/neigh.c index db72bc9bfd4e..807c125cc3f0 100644 --- a/sys/netlink/route/neigh.c +++ b/sys/netlink/route/neigh.c @@ -156,9 +156,12 @@ dump_lle_locked(struct llentry *lle, void *arg) ndm = nlmsg_reserve_object(nw, struct ndmsg); ndm->ndm_family = wa->family; + ndm->ndm_pad1 = 0; + ndm->ndm_pad2 = 0; ndm->ndm_ifindex = wa->ifp->if_index; ndm->ndm_state = lle_state_to_nl_state(wa->family, lle); ndm->ndm_flags = lle_flags_to_nl_flags(lle); + ndm->ndm_type = 0; switch (wa->family) { #ifdef INET