diff options
author | glebius <glebius@FreeBSD.org> | 2015-05-18 15:51:27 +0000 |
---|---|---|
committer | glebius <glebius@FreeBSD.org> | 2015-05-18 15:51:27 +0000 |
commit | dd1d37071a62de7a3148abd977aafe98ed5c84bb (patch) | |
tree | 7a7849c70b2d76722639042943531f42fee0668f /sys/netpfil/pf/pf.c | |
parent | e91cf73a565a9153e0926956798e8acb43f265eb (diff) | |
download | FreeBSD-src-dd1d37071a62de7a3148abd977aafe98ed5c84bb.zip FreeBSD-src-dd1d37071a62de7a3148abd977aafe98ed5c84bb.tar.gz |
A miss from r283061: don't dereference NULL is pf_get_mtag() fails.
PR: 200222
Submitted by: Franco Fichtner <franco opnsense.org>
Diffstat (limited to 'sys/netpfil/pf/pf.c')
-rw-r--r-- | sys/netpfil/pf/pf.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index da74ecf..abe8c26 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -5949,9 +5949,11 @@ done: log = 1; DPFPRINTF(PF_DEBUG_MISC, ("pf: failed to allocate tag\n")); + } else { + pd.pf_mtag->flags |= + PF_FASTFWD_OURS_PRESENT; + m->m_flags &= ~M_FASTFWD_OURS; } - pd.pf_mtag->flags |= PF_FASTFWD_OURS_PRESENT; - m->m_flags &= ~M_FASTFWD_OURS; } ip_divert_ptr(*m0, dir == PF_IN ? DIR_IN : DIR_OUT); *m0 = NULL; |