]> git.baikalelectronics.ru Git - kernel.git/commit
net-ipv6: fix excessive RTF_ADDRCONF flag on ::1/128 local route (and others)
authorMaciej Żenczykowski <maze@google.com>
Mon, 2 Sep 2019 16:23:36 +0000 (09:23 -0700)
committerDavid S. Miller <davem@davemloft.net>
Wed, 4 Sep 2019 22:31:50 +0000 (00:31 +0200)
commit066e51b9e83c84a56ba86cb10b6e9b535008ec0d
treeaabaa7f2b246209a378fa34b24436446fc990139
parentdbd20c1d1b8f524737bca20930a1036d5bd3e5b7
net-ipv6: fix excessive RTF_ADDRCONF flag on ::1/128 local route (and others)

There is a subtle change in behaviour introduced by:
  commit 157c4223e771a473b6a7481721c6ede99e1182e3
  'ipv6: Change addrconf_f6i_alloc to use ip6_route_info_create'

Before that patch /proc/net/ipv6_route includes:
00000000000000000000000000000001 80 00000000000000000000000000000000 00 00000000000000000000000000000000 00000000 00000003 00000000 80200001 lo

Afterwards /proc/net/ipv6_route includes:
00000000000000000000000000000001 80 00000000000000000000000000000000 00 00000000000000000000000000000000 00000000 00000002 00000000 80240001 lo

ie. the above commit causes the ::1/128 local (automatic) route to be flagged with RTF_ADDRCONF (0x040000).

AFAICT, this is incorrect since these routes are *not* coming from RA's.

As such, this patch restores the old behaviour.

Fixes: 157c4223e771 ("ipv6: Change addrconf_f6i_alloc to use ip6_route_info_create")
Cc: David Ahern <dsahern@gmail.com>
Cc: Lorenzo Colitti <lorenzo@google.com>
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Reviewed-by: David Ahern <dsahern@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv6/route.c