ipv4: Make output route lookup return rtable directly.

Instead of on the stack.

Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
David S. Miller 2011-03-02 14:31:35 -08:00
parent 452edd598f
commit b23dd4fe42
36 changed files with 267 additions and 224 deletions

View file

@ -1618,8 +1618,8 @@ static void ipmr_queue_xmit(struct net *net, struct mr_table *mrt,
.fl4_tos = RT_TOS(iph->tos),
.proto = IPPROTO_IPIP
};
if (ip_route_output_key(net, &rt, &fl))
rt = ip_route_output_key(net, &fl);
if (IS_ERR(rt))
goto out_free;
encap = sizeof(struct iphdr);
} else {
@ -1629,8 +1629,8 @@ static void ipmr_queue_xmit(struct net *net, struct mr_table *mrt,
.fl4_tos = RT_TOS(iph->tos),
.proto = IPPROTO_IPIP
};
if (ip_route_output_key(net, &rt, &fl))
rt = ip_route_output_key(net, &fl);
if (IS_ERR(rt))
goto out_free;
}