summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorYueHaibing <yuehaibing@huawei.com>2020-08-27 22:08:13 +0800
committerPablo Neira Ayuso <pablo@netfilter.org>2020-08-28 19:55:51 +0200
commitf5143e10a2e41f70ed6b1f3bbd8119ede5240c80 (patch)
tree305b1209c7aa27b58f4b799f31934fe8c1214751 /net
parentff73e7479b8eea594a985ca29f4b45d604dbcb2c (diff)
downloadlinux-f5143e10a2e41f70ed6b1f3bbd8119ede5240c80.tar.gz
linux-f5143e10a2e41f70ed6b1f3bbd8119ede5240c80.tar.bz2
linux-f5143e10a2e41f70ed6b1f3bbd8119ede5240c80.zip
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>
Diffstat (limited to 'net')
-rw-r--r--net/netfilter/xt_HMARK.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/netfilter/xt_HMARK.c b/net/netfilter/xt_HMARK.c
index 713fb38541df..8928ec56c388 100644
--- a/net/netfilter/xt_HMARK.c
+++ b/net/netfilter/xt_HMARK.c
@@ -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);