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


Groups > linux.kernel > #1452479

Re: [Regression?] fib_rules: Added NLM_F_EXCL support to fib_nl_newrule breaks Android userspace

From John Stultz <john.stultz@linaro.org>
Newsgroups linux.kernel
Subject Re: [Regression?] fib_rules: Added NLM_F_EXCL support to fib_nl_newrule breaks Android userspace
Date 2016-07-29 19:00 +0200
Message-ID <s0jiF-7fv-3@gated-at.bofh.it> (permalink)
References <s07rb-83j-1@gated-at.bofh.it> <s07AR-89U-1@gated-at.bofh.it> <s0gNP-5Ib-7@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Fri, Jul 29, 2016 at 7:12 AM, David Ahern <dsa@cumulusnetworks.com> wrote:
> On 7/28/16 10:20 PM, David Miller wrote:
>>
>> From: John Stultz <john.stultz@linaro.org>
>> Date: Thu, 28 Jul 2016 21:18:16 -0700
>>
>>> After moving my HiKey tree to pre-v4.8-rc, I noticed when using
>>> Android that I was getting routing errors after toggling networking on
>>> and off (or entering suspend). Wifi associated, but I got some
>>> rounting errors in the logcat the connection manager wouldn't detect a
>>> valid network.
>>>
>>> Not being able to figure out exactly what was going wrong from the
>>> userspace side, I bisected (manually rebasing a 70 patch stack each
>>> step :P) it down and it seems that the commit: 153380ec4b9b
>>> ("fib_rules: Added NLM_F_EXCL support to fib_nl_newrule") is causing
>>> the problem.
>>>
>>> Reverting that patch seems to make things work again.
>>>
>>> I'm no networking guru, but I'm happy to help debug this further if
>>> folks can walk me through it a bit.
>>
>>
>> It simply sounds like Android's userspace is specifying NLM_F_EXCL when
>> it shouldn't be during FIB rule netlink operations.
>>
>
> I take Android userspace inserts the same rule multiple times? (ip rule ls)

With the patch reverted, and the system working,  I see:

# ip rule ls
0:      from all lookup local
10000:  from all fwmark 0xc0000/0xd0000 lookup legacy_system
13000:  from all fwmark 0x10063/0x1ffff lookup local_network
13000:  from all fwmark 0x10065/0x1ffff lookup wlan0
14000:  from all oif wlan0 lookup wlan0
14000:  from all oif wlan0 lookup wlan0
15000:  from all fwmark 0x0/0x10000 lookup legacy_system
16000:  from all fwmark 0x0/0x10000 lookup legacy_network
17000:  from all fwmark 0x0/0x10000 lookup local_network
19000:  from all fwmark 0x64/0x1ffff lookup wlan0
19000:  from all fwmark 0x65/0x1ffff lookup wlan0
22000:  from all fwmark 0x0/0xffff lookup wlan0
32000:  from all unreachable

With the patch applied, and after toggling wifi, when I see the problem:

# ip rule ls
0:      from all lookup local
10000:  from all fwmark 0xc0000/0xd0000 lookup legacy_system
13000:  from all fwmark 0x10063/0x1ffff lookup local_network
13000:  from all fwmark 0x10065/0x1ffff lookup wlan0
14000:  from all oif wlan0 lookup wlan0
15000:  from all fwmark 0x0/0x10000 lookup legacy_system
16000:  from all fwmark 0x0/0x10000 lookup legacy_network
17000:  from all fwmark 0x0/0x10000 lookup local_network
19000:  from all fwmark 0x64/0x1ffff lookup wlan0
32000:  from all unreachable


> If so and multiple components expect to manage their own 'copy' of the rule
> they will need to remove the NLM_F_EXCL flag.

Adding more networky Android folks to the CC.

thanks
-john

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


Thread

[Regression?] fib_rules: Added NLM_F_EXCL support to fib_nl_newrule  breaks Android userspace John Stultz <john.stultz@linaro.org> - 2016-07-29 06:20 +0200
  Re: [Regression?] fib_rules: Added NLM_F_EXCL support to  fib_nl_newrule breaks Android userspace David Miller <davem@davemloft.net> - 2016-07-29 06:30 +0200
    Re: [Regression?] fib_rules: Added NLM_F_EXCL support to  fib_nl_newrule breaks Android userspace David Ahern <dsa@cumulusnetworks.com> - 2016-07-29 16:20 +0200
      Re: [Regression?] fib_rules: Added NLM_F_EXCL support to  fib_nl_newrule breaks Android userspace John Stultz <john.stultz@linaro.org> - 2016-07-29 19:00 +0200
        Re: [Regression?] fib_rules: Added NLM_F_EXCL support to  fib_nl_newrule breaks Android userspace David Ahern <dsa@cumulusnetworks.com> - 2016-07-29 21:20 +0200
        Re: [Regression?] fib_rules: Added NLM_F_EXCL support to  fib_nl_newrule breaks Android userspace Lorenzo Colitti <lorenzo@google.com> - 2016-08-01 03:50 +0200
          Re: [Regression?] fib_rules: Added NLM_F_EXCL support to  fib_nl_newrule breaks Android userspace John Stultz <john.stultz@linaro.org> - 2016-08-02 18:40 +0200
            Re: [Regression?] fib_rules: Added NLM_F_EXCL support to  fib_nl_newrule breaks Android userspace David Ahern <dsa@cumulusnetworks.com> - 2016-08-02 19:10 +0200
              Re: [Regression?] fib_rules: Added NLM_F_EXCL support to  fib_nl_newrule breaks Android userspace David Miller <davem@davemloft.net> - 2016-08-02 20:20 +0200
                Re: [Regression?] fib_rules: Added NLM_F_EXCL support to  fib_nl_newrule breaks Android userspace David Miller <davem@davemloft.net> - 2016-08-02 20:30 +0200
                Re: [Regression?] fib_rules: Added NLM_F_EXCL support to  fib_nl_newrule breaks Android userspace John Stultz <john.stultz@linaro.org> - 2016-08-02 20:40 +0200
                Re: [Regression?] fib_rules: Added NLM_F_EXCL support to  fib_nl_newrule breaks Android userspace Lorenzo Colitti <lorenzo@google.com> - 2016-08-03 03:00 +0200
                Re: [Regression?] fib_rules: Added NLM_F_EXCL support to  fib_nl_newrule breaks Android userspace David Miller <davem@davemloft.net> - 2016-08-03 03:20 +0200
              Re: [Regression?] fib_rules: Added NLM_F_EXCL support to  fib_nl_newrule breaks Android userspace John Stultz <john.stultz@linaro.org> - 2016-08-02 21:00 +0200
            Re: [Regression?] fib_rules: Added NLM_F_EXCL support to  fib_nl_newrule breaks Android userspace John Stultz <john.stultz@linaro.org> - 2016-08-02 19:10 +0200

csiph-web