lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <5E97397E-7028-46E8-BC0D-44A3E30C41A4@gmail.com>
Date:   Fri, 19 Mar 2021 09:11:06 -0700
From:   Ishaan Gandhi <ishaangandhi@...il.com>
To:     David Ahern <dsahern@...il.com>
Cc:     David Miller <davem@...emloft.net>,
        Network Development <netdev@...r.kernel.org>,
        willemb@...gle.com,
        Willem de Bruijn <willemdebruijn.kernel@...il.com>,
        Stephen Hemminger <stephen@...workplumber.org>
Subject: Re: [PATCH v3] icmp: support rfc5837

Thank you. Would it be better to do instead:

+	if_index = skb->skb_iif;

or

+	if_index = ip_version == 4 ? inet_iif(skb) : skb->skb_iif;

> On Mar 19, 2021, at 7:55 AM, David Ahern <dsahern@...il.com> wrote:
> 
> 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.
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ