Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1635301

Re: net/ipv6: GPF in rt6_device_match

From David Ahern <dsahern@gmail.com>
Newsgroups linux.kernel
Subject Re: net/ipv6: GPF in rt6_device_match
Date 2017-05-04 00:10 +0200
Message-ID <tDaD7-2VX-5@gated-at.bofh.it> (permalink)
References <tD5tL-7R3-1@gated-at.bofh.it> <tD5WO-8gC-3@gated-at.bofh.it> <tD7ce-Ai-11@gated-at.bofh.it> <tDaD8-2VX-7@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On 5/3/17 4:02 PM, Cong Wang wrote:
> On Wed, May 3, 2017 at 11:22 AM, David Ahern <dsahern@gmail.com> wrote:
>> On 5/3/17 11:02 AM, Cong Wang wrote:
>>> A quick glance shows we need to simply check local->rt6i_idev
>>> since we do the same check for sprt right above.
>>
>> As I recall, rt6i_idev is set for all routes except null_entry and it is
>> not set on null_entry only because of initialization order.
> 
> Are you sure?
> 
>         if (event == NETDEV_REGISTER && (dev->flags & IFF_LOOPBACK)) {
>                 net->ipv6.ip6_null_entry->dst.dev = dev;
>                 net->ipv6.ip6_null_entry->rt6i_idev = in6_dev_get(dev);
> #ifdef CONFIG_IPV6_MULTIPLE_TABLES
>                 net->ipv6.ip6_prohibit_entry->dst.dev = dev;
>                 net->ipv6.ip6_prohibit_entry->rt6i_idev = in6_dev_get(dev);
>                 net->ipv6.ip6_blk_hole_entry->dst.dev = dev;
>                 net->ipv6.ip6_blk_hole_entry->rt6i_idev = in6_dev_get(dev);
> #endif
>         }
> 
> Loopback is the first one to register, so null entry is set to
> loopback dev initially. Similar for init_net.
> 

Why don't you add a printk and see ;-)

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: net/ipv6: GPF in rt6_device_match Cong Wang <xiyou.wangcong@gmail.com> - 2017-05-03 19:10 +0200
  Re: net/ipv6: GPF in rt6_device_match David Ahern <dsahern@gmail.com> - 2017-05-03 20:30 +0200
    Re: net/ipv6: GPF in rt6_device_match Cong Wang <xiyou.wangcong@gmail.com> - 2017-05-04 00:10 +0200
      Re: net/ipv6: GPF in rt6_device_match David Ahern <dsahern@gmail.com> - 2017-05-04 00:10 +0200
        Re: net/ipv6: GPF in rt6_device_match Cong Wang <xiyou.wangcong@gmail.com> - 2017-05-04 01:40 +0200
          Re: net/ipv6: GPF in rt6_device_match David Ahern <dsahern@gmail.com> - 2017-05-04 04:50 +0200
            Re: net/ipv6: GPF in rt6_device_match Cong Wang <xiyou.wangcong@gmail.com> - 2017-05-04 06:00 +0200
              Re: net/ipv6: GPF in rt6_device_match David Ahern <dsahern@gmail.com> - 2017-05-04 06:20 +0200

csiph-web