]> git.baikalelectronics.ru Git - kernel.git/commit
ipv6: fix RTPROT_RA markup of RA routes w/nexthops
authorDenis Ovsienko <infrastation@yandex.ru>
Tue, 10 Jul 2012 04:45:50 +0000 (04:45 +0000)
committerDavid S. Miller <davem@davemloft.net>
Tue, 17 Jul 2012 05:55:54 +0000 (22:55 -0700)
commitb38a270b497cc91da850c6ca7cbdce78fcbd7527
tree8406b006f177e6d134a96c8c7771f1b36551995a
parent1c3511e715221b9af634ed9084652a0851b45737
ipv6: fix RTPROT_RA markup of RA routes w/nexthops

Userspace implementations of network routing protocols sometimes need to
tell RA-originated IPv6 routes from other kernel routes to make proper
routing decisions. This makes most sense for RA routes with nexthops,
namely, default routes and Route Information routes.

The intended mean of preserving RA route origin in a netlink message is
through indicating RTPROT_RA as protocol code. Function rt6_fill_node()
tried to do that for default routes, but its test condition was taken
wrong. This change is modeled after the original mailing list posting
by Jeff Haran. It fixes the test condition for default route case and
sets the same behaviour for Route Information case (both types use
nexthops). Handling of the 3rd RA route type, Prefix Information, is
left unchanged, as it stands for interface connected routes (without
nexthops).

Signed-off-by: Denis Ovsienko <infrastation@yandex.ru>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv6/route.c