ip: introduce ip_is_fragment helper inline function
There are enough instances of this: iph->frag_off & htons(IP_MF | IP_OFFSET) that a helper function is probably warranted. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: David S. Miller <davem@davemloft.net>
此提交包含在:
@@ -157,7 +157,7 @@ static unsigned int sfq_hash(struct sfq_sched_data *q, struct sk_buff *skb)
|
||||
iph = ip_hdr(skb);
|
||||
h = (__force u32)iph->daddr;
|
||||
h2 = (__force u32)iph->saddr ^ iph->protocol;
|
||||
if (iph->frag_off & htons(IP_MF | IP_OFFSET))
|
||||
if (ip_is_fragment(iph))
|
||||
break;
|
||||
poff = proto_ports_offset(iph->protocol);
|
||||
if (poff >= 0 &&
|
||||
|
新增問題並參考
封鎖使用者