mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
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
1 changed files with 14 additions and 12 deletions
|
|
@ -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…
Reference in a new issue