On Tue, Nov 27, 2018 at 3:21 PM Cong Wang <xiyou.wangc...@gmail.com> wrote: > + if (proto == htons(ETH_P_IP)) { > + struct iphdr *ipv4 = ip_p; > + > + pad_offset = network_depth + be16_to_cpu(ipv4->tot_len); > + } else if (proto == htons(ETH_P_IPV6)) { > + struct ipv6hdr *ipv6 = ip_p; > + > + pad_offset = network_depth + sizeof(struct ipv6hdr) + > + be16_to_cpu(ipv6->payload_len); > + } > +
Should return here for other protocols... Will fix this in v2.