OSDN Git Service

ipv6: honor RT6_LOOKUP_F_DST_NOREF in rule lookup logic
authorWei Wang <weiwan@google.com>
Fri, 21 Jun 2019 00:36:39 +0000 (17:36 -0700)
committerDavid S. Miller <davem@davemloft.net>
Sun, 23 Jun 2019 20:24:17 +0000 (13:24 -0700)
commitd64a1f574a2957b4bcb06452d36cc1c6bf16e9fc
treeb07474822bdef5a6e543daf192c8e23e3408e3fd
parent74109218b051c2431eec2569886627c7217e235a
ipv6: honor RT6_LOOKUP_F_DST_NOREF in rule lookup logic

This patch specifically converts the rule lookup logic to honor this
flag and not release refcnt when traversing each rule and calling
lookup() on each routing table.
Similar to previous patch, we also need some special handling of dst
entries in uncached list because there is always 1 refcnt taken for them
even if RT6_LOOKUP_F_DST_NOREF flag is set.

Signed-off-by: Wei Wang <weiwan@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/ip6_route.h
net/ipv6/fib6_rules.c
net/ipv6/ip6_fib.c