mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-26 18:43:33 -05:00
netfilter: xt_HMARK: Use ip_is_fragment() helper
Use ip_is_fragment() to simpify code. Signed-off-by: YueHaibing <yuehaibing@huawei.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
This commit is contained in:
parent
ff73e7479b
commit
f5143e10a2
1 changed files with 1 additions and 1 deletions
|
@ -276,7 +276,7 @@ hmark_pkt_set_htuple_ipv4(const struct sk_buff *skb, struct hmark_tuple *t,
|
|||
return 0;
|
||||
|
||||
/* follow-up fragments don't contain ports, skip all fragments */
|
||||
if (ip->frag_off & htons(IP_MF | IP_OFFSET))
|
||||
if (ip_is_fragment(ip))
|
||||
return 0;
|
||||
|
||||
hmark_set_tuple_ports(skb, (ip->ihl * 4) + nhoff, t, info);
|
||||
|
|
Loading…
Add table
Reference in a new issue