diff options
| author | Wang Yufen <wangyufen@huawei.com> | 2014-03-28 21:27:30 -0400 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2014-03-31 16:16:16 -0400 |
| commit | 60ea37f7a5c776be4631c535c7cdd3ce62cf4dee (patch) | |
| tree | b2d87158ab2ea59d199d0b02b2242571e761ec58 /include/net | |
| parent | 4aa956d801470c9d338f6095e2cf9a5b58909337 (diff) | |
ipv6: reuse rt6_need_strict
Move the whole rt6_need_strict as static inline into ip6_route.h,
so that it can be reused
Signed-off-by: Wang Yufen <wangyufen@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net')
| -rw-r--r-- | include/net/ip6_route.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/net/ip6_route.h b/include/net/ip6_route.h index 00e3f12cb2f9..3c3bb184eb8f 100644 --- a/include/net/ip6_route.h +++ b/include/net/ip6_route.h | |||
| @@ -51,6 +51,11 @@ static inline unsigned int rt6_flags2srcprefs(int flags) | |||
| 51 | return (flags >> 3) & 7; | 51 | return (flags >> 3) & 7; |
| 52 | } | 52 | } |
| 53 | 53 | ||
| 54 | static inline bool rt6_need_strict(const struct in6_addr *daddr) | ||
| 55 | { | ||
| 56 | return ipv6_addr_type(daddr) & | ||
| 57 | (IPV6_ADDR_MULTICAST | IPV6_ADDR_LINKLOCAL | IPV6_ADDR_LOOPBACK); | ||
| 58 | } | ||
| 54 | 59 | ||
| 55 | void ip6_route_input(struct sk_buff *skb); | 60 | void ip6_route_input(struct sk_buff *skb); |
| 56 | 61 | ||
