Question about IPv4 packet checking in br_nf_pre_routing() function
Hello everyone,
I am working on Linux bridge netfilter. And to meet a special request, I would need to remove the pskb_trim_rcsum() in bridge netfilter processing for IPv4 packet.
Will be there any side effect if I removed this IPv4 check method pskb_trim_rcsum() used in br_nf_pre_routing() function?
Thanks.
The kernel code is as following:
...
if (!pskb_may_pull(skb, sizeof(struct iphdr)))
goto inhdr_error;
iph = ip_hdr(skb);
if (iph->ihl < 5 || iph->version != 4)
goto inhdr_error;
if (!pskb_may_pull(skb, 4 * iph->ihl))
goto inhdr_error;
iph = ip_hdr(skb);
if (ip_fast_csum((__u8 *) iph, iph->ihl) != 0)
goto inhdr_error;
len = ntohs(iph->tot_len);
if (skb->len < len || len < 4 * iph->ihl)
goto inhdr_error;
pskb_trim_rcsum(skb, len);
|