Commit ea6e574e authored by Florian Westphal's avatar Florian Westphal Committed by Pablo Neira Ayuso

ipv6: add ip6_route_lookup

like rt6_lookup, but allows caller to pass in flowi6 structure.
Will be used by the upcoming ipv6 netfilter reverse path filter
match.
Signed-off-by: default avatarFlorian Westphal <fw@strlen.de>
Acked-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
parent 8f97339d
...@@ -70,6 +70,8 @@ extern void ip6_route_input(struct sk_buff *skb); ...@@ -70,6 +70,8 @@ extern void ip6_route_input(struct sk_buff *skb);
extern struct dst_entry * ip6_route_output(struct net *net, extern struct dst_entry * ip6_route_output(struct net *net,
const struct sock *sk, const struct sock *sk,
struct flowi6 *fl6); struct flowi6 *fl6);
extern struct dst_entry * ip6_route_lookup(struct net *net,
struct flowi6 *fl6, int flags);
extern int ip6_route_init(void); extern int ip6_route_init(void);
extern void ip6_route_cleanup(void); extern void ip6_route_cleanup(void);
......
...@@ -658,6 +658,13 @@ static struct rt6_info *ip6_pol_route_lookup(struct net *net, ...@@ -658,6 +658,13 @@ static struct rt6_info *ip6_pol_route_lookup(struct net *net,
} }
struct dst_entry * ip6_route_lookup(struct net *net, struct flowi6 *fl6,
int flags)
{
return fib6_rule_lookup(net, fl6, flags, ip6_pol_route_lookup);
}
EXPORT_SYMBOL_GPL(ip6_route_lookup);
struct rt6_info *rt6_lookup(struct net *net, const struct in6_addr *daddr, struct rt6_info *rt6_lookup(struct net *net, const struct in6_addr *daddr,
const struct in6_addr *saddr, int oif, int strict) const struct in6_addr *saddr, int oif, int strict)
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment