ipv6: reuse rt6_need_strict
authorWang Yufen <wangyufen@huawei.com>
Sat, 29 Mar 2014 01:27:30 +0000 (09:27 +0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 31 Mar 2014 20:16:16 +0000 (16:16 -0400)
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>
include/net/ip6_route.h
net/ipv6/route.c

index 00e3f12..3c3bb18 100644 (file)
@@ -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);
 
index b93ae6a..5015c50 100644 (file)
@@ -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()