Fix a possible NULL-pointer dereference on the pfsync(4) reconfiguration.
Reported by: Eugene M. Zheganin
This commit is contained in:
parent
18f8f46e9f
commit
415077bad9
@ -1324,7 +1324,10 @@ pfsyncioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
|
||||
else if ((sifp = ifunit_ref(pfsyncr.pfsyncr_syncdev)) == NULL)
|
||||
return (EINVAL);
|
||||
|
||||
if (pfsyncr.pfsyncr_syncpeer.s_addr == 0 && sifp != NULL)
|
||||
if (sifp != NULL && (
|
||||
pfsyncr.pfsyncr_syncpeer.s_addr == 0 ||
|
||||
pfsyncr.pfsyncr_syncpeer.s_addr ==
|
||||
htonl(INADDR_PFSYNC_GROUP)))
|
||||
mship = malloc((sizeof(struct in_multi *) *
|
||||
IP_MIN_MEMBERSHIPS), M_PFSYNC, M_WAITOK | M_ZERO);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user