summaryrefslogtreecommitdiff
path: root/sys/net/if_pfsync.c
diff options
context:
space:
mode:
authorHenning Brauer <henning@cvs.openbsd.org>2006-10-31 22:00:39 +0000
committerHenning Brauer <henning@cvs.openbsd.org>2006-10-31 22:00:39 +0000
commitd433301d89089486f068cb51cb90f78ed729e7fd (patch)
treeb08200580c09ab025205e16b7930fc34d2b03fa4 /sys/net/if_pfsync.c
parent8f6795b4bf84d6a5e56ff53c8d4723851d51a816 (diff)
in pfsync_update_tdb, when there is no pfsync interface, we must return
without trying to free the (in that case nonexistant) tdb mbuf found out the hard way by pedro
Diffstat (limited to 'sys/net/if_pfsync.c')
-rw-r--r--sys/net/if_pfsync.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/net/if_pfsync.c b/sys/net/if_pfsync.c
index 9685abf5e84..76159056b51 100644
--- a/sys/net/if_pfsync.c
+++ b/sys/net/if_pfsync.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_pfsync.c,v 1.68 2006/10/31 17:37:11 deraadt Exp $ */
+/* $OpenBSD: if_pfsync.c,v 1.69 2006/10/31 22:00:38 henning Exp $ */
/*
* Copyright (c) 2002 Michael Shalayeff
@@ -1629,9 +1629,10 @@ pfsync_update_tdb(struct tdb *tdb, int output)
struct pfsync_tdb *pt = NULL;
int s, i, ret;
- if (sc != NULL)
- ifp = &sc->sc_if;
+ if (sc == NULL)
+ return (0);
+ ifp = &sc->sc_if;
if (sc == NULL || (ifp->if_bpf == NULL && sc->sc_sync_ifp == NULL &&
sc->sc_sync_peer.s_addr == INADDR_PFSYNC_GROUP)) {
/* Don't leave any stale pfsync packets hanging around. */