From b8cf2c3e29e0f438124125b7475045b332867e55 Mon Sep 17 00:00:00 2001 From: Ryan Thomas McBride Date: Thu, 20 Jan 2005 17:54:27 +0000 Subject: sc->sc_sync_ifp = NULL if we fail to attach the multicast group. ok mpf@ --- sys/net/if_pfsync.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'sys/net') 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); } -- cgit v1.2.3