Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 60ea37f7 authored by Wang Yufen's avatar Wang Yufen Committed by David S. Miller
Browse files

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: default avatarWang Yufen <wangyufen@huawei.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 4aa956d8
Loading
Loading
Loading
Loading
+5 −0
Original line number Original line Diff line number Diff line
@@ -51,6 +51,11 @@ static inline unsigned int rt6_flags2srcprefs(int flags)
	return (flags >> 3) & 7;
	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);
void ip6_route_input(struct sk_buff *skb);


+0 −6
Original line number Original line Diff line number Diff line
@@ -374,12 +374,6 @@ static bool rt6_check_expired(const struct rt6_info *rt)
	return false;
	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:
/* Multipath route selection:
 *   Hash based function using packet header and flowlabel.
 *   Hash based function using packet header and flowlabel.
 * Adapted from fib_info_hashfn()
 * Adapted from fib_info_hashfn()