Don't dereference NULL is pf_get_mtag() fails.
PR: 200222 Submitted by: Franco Fichtner <franco opnsense.org>
This commit is contained in:
parent
d485dbc7d8
commit
b7f69c506d
@ -5903,13 +5903,14 @@ done:
|
||||
((pd.pf_mtag = pf_get_mtag(m)) == NULL)) {
|
||||
action = PF_DROP;
|
||||
REASON_SET(&reason, PFRES_MEMORY);
|
||||
} else {
|
||||
if (pqid || (pd.tos & IPTOS_LOWDELAY))
|
||||
pd.pf_mtag->qid = r->pqid;
|
||||
else
|
||||
pd.pf_mtag->qid = r->qid;
|
||||
/* Add hints for ecn. */
|
||||
pd.pf_mtag->hdr = h;
|
||||
}
|
||||
if (pqid || (pd.tos & IPTOS_LOWDELAY))
|
||||
pd.pf_mtag->qid = r->pqid;
|
||||
else
|
||||
pd.pf_mtag->qid = r->qid;
|
||||
/* add hints for ecn */
|
||||
pd.pf_mtag->hdr = h;
|
||||
|
||||
}
|
||||
#endif /* ALTQ */
|
||||
@ -6332,13 +6333,14 @@ done:
|
||||
((pd.pf_mtag = pf_get_mtag(m)) == NULL)) {
|
||||
action = PF_DROP;
|
||||
REASON_SET(&reason, PFRES_MEMORY);
|
||||
} else {
|
||||
if (pd.tos & IPTOS_LOWDELAY)
|
||||
pd.pf_mtag->qid = r->pqid;
|
||||
else
|
||||
pd.pf_mtag->qid = r->qid;
|
||||
/* Add hints for ecn. */
|
||||
pd.pf_mtag->hdr = h;
|
||||
}
|
||||
if (pd.tos & IPTOS_LOWDELAY)
|
||||
pd.pf_mtag->qid = r->pqid;
|
||||
else
|
||||
pd.pf_mtag->qid = r->qid;
|
||||
/* add hints for ecn */
|
||||
pd.pf_mtag->hdr = h;
|
||||
}
|
||||
#endif /* ALTQ */
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user