aboutsummaryrefslogtreecommitdiffstats
path: root/net/bridge
diff options
context:
space:
mode:
Diffstat (limited to 'net/bridge')
-rw-r--r--net/bridge/br_netfilter.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/net/bridge/br_netfilter.c b/net/bridge/br_netfilter.c
index 4b5b66d07bba..45b57b173f70 100644
--- a/net/bridge/br_netfilter.c
+++ b/net/bridge/br_netfilter.c
@@ -428,14 +428,15 @@ static int br_nf_pre_routing_finish(struct sk_buff *skb)
428 if (err != -EHOSTUNREACH || !in_dev || IN_DEV_FORWARD(in_dev)) 428 if (err != -EHOSTUNREACH || !in_dev || IN_DEV_FORWARD(in_dev))
429 goto free_skb; 429 goto free_skb;
430 430
431 if (!ip_route_output_key(dev_net(dev), &rt, &fl)) { 431 rt = ip_route_output_key(dev_net(dev), &fl);
432 if (!IS_ERR(rt)) {
432 /* - Bridged-and-DNAT'ed traffic doesn't 433 /* - Bridged-and-DNAT'ed traffic doesn't
433 * require ip_forwarding. */ 434 * require ip_forwarding. */
434 if (((struct dst_entry *)rt)->dev == dev) { 435 if (rt->dst.dev == dev) {
435 skb_dst_set(skb, (struct dst_entry *)rt); 436 skb_dst_set(skb, &rt->dst);
436 goto bridged_dnat; 437 goto bridged_dnat;
437 } 438 }
438 dst_release((struct dst_entry *)rt); 439 ip_rt_put(rt);
439 } 440 }
440free_skb: 441free_skb:
441 kfree_skb(skb); 442 kfree_skb(skb);