Fix DIOCNATLOOK: zero key padding before performing lookup.

This commit is contained in:
Gleb Smirnoff 2012-09-18 09:15:32 +00:00
parent a80a10b13b
commit effbcf3842
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=240638

View File

@ -1808,6 +1808,7 @@ pfioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flags, struct thread *td
(!pnl->dport || !pnl->sport)))
error = EINVAL;
else {
bzero(&key, sizeof(key));
key.af = pnl->af;
key.proto = pnl->proto;
PF_ACPY(&key.addr[sidx], &pnl->saddr, pnl->af);