On 3/17/21 4:19 PM, ishaangandhi wrote:
> +void icmp_identify_arrival_interface(struct sk_buff *skb, struct net *net, 
> int room,
> +                                  char *icmph, int ip_version)
> +{
> +     unsigned int ext_len, orig_len, word_aligned_orig_len, offset, 
> extra_space_needed,
> +                  if_index, mtu = 0, name_len = 0, name_subobj_len = 0;
> +     struct interface_ipv4_addr_sub_obj ip4_addr_subobj = {.addr = 0};
> +     struct interface_ipv6_addr_sub_obj ip6_addr_subobj;
> +     struct icmp_extobj_hdr *iio_hdr;
> +     struct inet6_ifaddr ip6_ifaddr;
> +     struct inet6_dev *dev6 = NULL;
> +     struct icmp_ext_hdr *ext_hdr;
> +     char *name = NULL, ctype;
> +     struct net_device *dev;
> +     void *subobj_offset;
> +
> +     skb_linearize(skb);
> +     if_index = inet_iif(skb);

inet_iif is an IPv4 helper; it should not be used for v6 skb's.

Reply via email to