diff options
author | Alexandr Nedvedicky <sashan@cvs.openbsd.org> | 2021-01-04 15:02:35 +0000 |
---|---|---|
committer | Alexandr Nedvedicky <sashan@cvs.openbsd.org> | 2021-01-04 15:02:35 +0000 |
commit | 0deeea9d153cd6ce527ed3764c57d1de5815bb00 (patch) | |
tree | 3876da5d217a4a458fdb7148f74e0a8517620500 /sys/netinet/ip_carp.c | |
parent | c2205846cde7c83117f110fb6b8686d6a876caec (diff) |
- fix use after free, when packet gets dropped.
patch submitted by Ralf Horstmann from ackstorm.de
OK dlg@
Diffstat (limited to 'sys/netinet/ip_carp.c')
-rw-r--r-- | sys/netinet/ip_carp.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/sys/netinet/ip_carp.c b/sys/netinet/ip_carp.c index 0d52cffa606..f021f0e2792 100644 --- a/sys/netinet/ip_carp.c +++ b/sys/netinet/ip_carp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ip_carp.c,v 1.349 2020/07/28 16:44:34 yasuoka Exp $ */ +/* $OpenBSD: ip_carp.c,v 1.350 2021/01/04 15:02:34 sashan Exp $ */ /* * Copyright (c) 2002 Michael Shalayeff. All rights reserved. @@ -2282,10 +2282,8 @@ carp_transmit(struct carp_softc *sc, struct ifnet *ifp0, struct mbuf *m) #if NBPFILTER > 0 { caddr_t if_bpf = ifp->if_bpf; - if (if_bpf) { - if (bpf_mtap_ether(if_bpf, m, BPF_DIRECTION_OUT)) - m_freem(m); - } + if (if_bpf) + bpf_mtap_ether(if_bpf, m, BPF_DIRECTION_OUT); } #endif /* NBPFILTER > 0 */ |