diff options
author | Ryan Thomas McBride <mcbride@cvs.openbsd.org> | 2005-01-20 17:54:27 +0000 |
---|---|---|
committer | Ryan Thomas McBride <mcbride@cvs.openbsd.org> | 2005-01-20 17:54:27 +0000 |
commit | b8cf2c3e29e0f438124125b7475045b332867e55 (patch) | |
tree | 9ca05d161496d23ecdbda7d97f65c527f387afb9 /sys/net | |
parent | d881f04e995f932442ebc5519e8b6f42e02c7139 (diff) |
sc->sc_sync_ifp = NULL if we fail to attach the multicast group.
ok mpf@
Diffstat (limited to 'sys/net')
-rw-r--r-- | sys/net/if_pfsync.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/net/if_pfsync.c b/sys/net/if_pfsync.c index 37a739606ae..9b28f316754 100644 --- a/sys/net/if_pfsync.c +++ b/sys/net/if_pfsync.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_pfsync.c,v 1.43 2005/01/20 17:47:38 mcbride Exp $ */ +/* $OpenBSD: if_pfsync.c,v 1.44 2005/01/20 17:54:26 mcbride Exp $ */ /* * Copyright (c) 2002 Michael Shalayeff @@ -831,6 +831,7 @@ pfsyncioctl(struct ifnet *ifp, u_long cmd, caddr_t data) struct in_addr addr; if (!(sc->sc_sync_ifp->if_flags & IFF_MULTICAST)) { + sc->sc_sync_ifp = NULL; splx(s); return (EADDRNOTAVAIL); } @@ -839,6 +840,7 @@ pfsyncioctl(struct ifnet *ifp, u_long cmd, caddr_t data) if ((imo->imo_membership[0] = in_addmulti(&addr, sc->sc_sync_ifp)) == NULL) { + sc->sc_sync_ifp = NULL; splx(s); return (ENOBUFS); } |