diff options
author | Kristof Provost <kp@FreeBSD.org> | 2024-12-28 17:52:18 +0000 |
---|---|---|
committer | Kristof Provost <kp@FreeBSD.org> | 2024-12-30 20:42:13 +0000 |
commit | 4be8e29e776b078b43e95c04259ecebdf407481f (patch) | |
tree | 418b1ab60327c45acad4fd6a578235a4b277fe4e | |
parent | 07579e2110b3c00acafd1b692a3ce9a80fb3104b (diff) |
pf: initialise addresses in pf_get_transaddr_af()
Ensure we fully initialise nsaddr and ndaddr.
Reported by: markj, KMSAN
Sponsored by: Rubicon Communications, LLC ("Netgate")
-rw-r--r-- | sys/netpfil/pf/pf_lb.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sys/netpfil/pf/pf_lb.c b/sys/netpfil/pf/pf_lb.c index 35896bdcf5b1..cb92c724a541 100644 --- a/sys/netpfil/pf/pf_lb.c +++ b/sys/netpfil/pf/pf_lb.c @@ -994,6 +994,9 @@ pf_get_transaddr_af(struct pf_krule *r, struct pf_pdesc *pd) struct pf_srchash *sh = NULL; struct pf_ksrc_node *sns = NULL; + bzero(&nsaddr, sizeof(nsaddr)); + bzero(&ndaddr, sizeof(ndaddr)); + if (V_pf_status.debug >= PF_DEBUG_MISC) { printf("pf: af-to %s %s, ", pd->naf == AF_INET ? "inet" : "inet6", |