ipv4: Use flowi4 in public route lookup interfaces.
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
68a5e3dd0a
commit
9d6ec93801
14 changed files with 231 additions and 224 deletions
|
@ -22,16 +22,16 @@ static struct dst_entry *xfrm4_dst_lookup(struct net *net, int tos,
|
|||
const xfrm_address_t *saddr,
|
||||
const xfrm_address_t *daddr)
|
||||
{
|
||||
struct flowi fl = {
|
||||
.fl4_dst = daddr->a4,
|
||||
.fl4_tos = tos,
|
||||
struct flowi4 fl4 = {
|
||||
.daddr = daddr->a4,
|
||||
.flowi4_tos = tos,
|
||||
};
|
||||
struct rtable *rt;
|
||||
|
||||
if (saddr)
|
||||
fl.fl4_src = saddr->a4;
|
||||
fl4.saddr = saddr->a4;
|
||||
|
||||
rt = __ip_route_output_key(net, &fl);
|
||||
rt = __ip_route_output_key(net, &fl4);
|
||||
if (!IS_ERR(rt))
|
||||
return &rt->dst;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue