]> git.baikalelectronics.ru Git - kernel.git/commit
ipv6: use rt6_get_dflt_router to get default router in rt6_route_rcv
authorDuan Jiong <duanj.fnst@cn.fujitsu.com>
Fri, 8 Nov 2013 01:56:53 +0000 (09:56 +0800)
committerDavid S. Miller <davem@davemloft.net>
Fri, 8 Nov 2013 20:16:04 +0000 (15:16 -0500)
commit46ace0afc7e226c484d60382812af0cf5018492c
tree6c85b2cfd65fb0e0e5a506eac73ba70c04a0427a
parent3214b400d8c013217d0213c5c31bf56b72360d96
ipv6: use rt6_get_dflt_router to get default router in rt6_route_rcv

As the rfc 4191 said, the Router Preference and Lifetime values in a
::/0 Route Information Option should override the preference and lifetime
values in the Router Advertisement header. But when the kernel deals with
a ::/0 Route Information Option, the rt6_get_route_info() always return
NULL, that means that overriding will not happen, because those default
routers were added without flag RTF_ROUTEINFO in rt6_add_dflt_router().

In order to deal with that condition, we should call rt6_get_dflt_router
when the prefix length is 0.

Signed-off-by: Duan Jiong <duanj.fnst@cn.fujitsu.com>
Acked-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv6/route.c