Skip to content

Commit

Permalink
ipv6: reuse rt6_need_strict
Browse files Browse the repository at this point in the history
Move the whole rt6_need_strict as static inline into ip6_route.h,
so that it can be reused

Signed-off-by: Wang Yufen <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
wangyufen316 authored and davem330 committed Mar 31, 2014
1 parent 4aa956d commit 60ea37f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
5 changes: 5 additions & 0 deletions include/net/ip6_route.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,11 @@ static inline unsigned int rt6_flags2srcprefs(int flags)
return (flags >> 3) & 7;
}

static inline bool rt6_need_strict(const struct in6_addr *daddr)
{
return ipv6_addr_type(daddr) &
(IPV6_ADDR_MULTICAST | IPV6_ADDR_LINKLOCAL | IPV6_ADDR_LOOPBACK);
}

void ip6_route_input(struct sk_buff *skb);

Expand Down
6 changes: 0 additions & 6 deletions net/ipv6/route.c
Original file line number Diff line number Diff line change
Expand Up @@ -374,12 +374,6 @@ static bool rt6_check_expired(const struct rt6_info *rt)
return false;
}

static bool rt6_need_strict(const struct in6_addr *daddr)
{
return ipv6_addr_type(daddr) &
(IPV6_ADDR_MULTICAST | IPV6_ADDR_LINKLOCAL | IPV6_ADDR_LOOPBACK);
}

/* Multipath route selection:
* Hash based function using packet header and flowlabel.
* Adapted from fib_info_hashfn()
Expand Down

0 comments on commit 60ea37f

Please sign in to comment.