pf: don't assert on address family in pf_addrcpy()

This gets called (through PF_ACPY()) on user supplied input, so we can't assume
that the address family must be AF_INET or AF_INET6.

Reported-by:	syzbot+14dec0c55b8f512e271c@syzkaller.appspotmail.com
Sponsored by:	Rubicon Communications, LLC ("Netgate")
This commit is contained in:
Kristof Provost 2025-03-04 12:56:08 +01:00
parent 394a9a5b1c
commit 80b64ef0a1

View file

@ -811,8 +811,6 @@ pf_addrcpy(struct pf_addr *dst, const struct pf_addr *src, sa_family_t af)
case AF_INET6:
memcpy(&dst->v6, &src->v6, sizeof(dst->v6));
break;
default:
unhandled_af(af);
}
}
#endif /* INET6 */