mirror of
https://git.FreeBSD.org/src.git
synced 2025-02-08 10:43:09 +00:00
Revert "pf: Limit the maximum number of fragments per packet"
This reverts commit r337969. We'll handle this the OpenBSD way, in upcoming commits.
This commit is contained in:
parent
1493c2ee62
commit
19a22ae313
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=340057
@ -91,10 +91,8 @@ struct pf_fragment {
|
||||
TAILQ_ENTRY(pf_fragment) frag_next;
|
||||
uint32_t fr_timeout;
|
||||
uint16_t fr_maxlen; /* maximum length of single fragment */
|
||||
uint16_t fr_entries; /* Total number of pf_fragment entries */
|
||||
TAILQ_HEAD(pf_fragq, pf_frent) fr_queue;
|
||||
};
|
||||
#define PF_MAX_FRENT_PER_FRAGMENT 64
|
||||
|
||||
struct pf_fragment_tag {
|
||||
uint16_t ft_hdrlen; /* header length of reassembled pkt */
|
||||
@ -386,7 +384,6 @@ pf_fillup_fragment(struct pf_fragment_cmp *key, struct pf_frent *frent,
|
||||
*(struct pf_fragment_cmp *)frag = *key;
|
||||
frag->fr_timeout = time_uptime;
|
||||
frag->fr_maxlen = frent->fe_len;
|
||||
frag->fr_entries = 0;
|
||||
TAILQ_INIT(&frag->fr_queue);
|
||||
|
||||
RB_INSERT(pf_frag_tree, &V_pf_frag_tree, frag);
|
||||
@ -398,9 +395,6 @@ pf_fillup_fragment(struct pf_fragment_cmp *key, struct pf_frent *frent,
|
||||
return (frag);
|
||||
}
|
||||
|
||||
if (frag->fr_entries >= PF_MAX_FRENT_PER_FRAGMENT)
|
||||
goto bad_fragment;
|
||||
|
||||
KASSERT(!TAILQ_EMPTY(&frag->fr_queue), ("!TAILQ_EMPTY()->fr_queue"));
|
||||
|
||||
/* Remember maximum fragment len for refragmentation. */
|
||||
@ -473,8 +467,6 @@ pf_fillup_fragment(struct pf_fragment_cmp *key, struct pf_frent *frent,
|
||||
else
|
||||
TAILQ_INSERT_AFTER(&frag->fr_queue, prev, frent, fr_next);
|
||||
|
||||
frag->fr_entries++;
|
||||
|
||||
return (frag);
|
||||
|
||||
bad_fragment:
|
||||
|
Loading…
x
Reference in New Issue
Block a user