diff options
author | Eric W. Biederman <ebiederm@xmission.com> | 2015-09-15 20:04:14 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-09-17 17:18:36 -0700 |
commit | f2d74cf88c625bfa723c5ffb79885c852ee1f46b (patch) | |
tree | b7a5c3b351fb841fc0e0d5df8ab511133fd0d6b0 /net/bridge | |
parent | 6532948b2e7b75895c1264967342ae61dc97b4a6 (diff) | |
download | talos-obmc-linux-f2d74cf88c625bfa723c5ffb79885c852ee1f46b.tar.gz talos-obmc-linux-f2d74cf88c625bfa723c5ffb79885c852ee1f46b.zip |
bridge: Cache net in br_nf_pre_routing_finish
This is prep work for passing net to the netfilter hooks.
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/bridge')
-rw-r--r-- | net/bridge/br_netfilter_hooks.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/bridge/br_netfilter_hooks.c b/net/bridge/br_netfilter_hooks.c index e6910b71af6e..c1127908e23a 100644 --- a/net/bridge/br_netfilter_hooks.c +++ b/net/bridge/br_netfilter_hooks.c @@ -346,6 +346,7 @@ static int br_nf_pre_routing_finish(struct sock *sk, struct sk_buff *skb) { struct net_device *dev = skb->dev; struct iphdr *iph = ip_hdr(skb); + struct net *net = dev_net(dev); struct nf_bridge_info *nf_bridge = nf_bridge_info_get(skb); struct rtable *rt; int err; @@ -371,7 +372,7 @@ static int br_nf_pre_routing_finish(struct sock *sk, struct sk_buff *skb) if (err != -EHOSTUNREACH || !in_dev || IN_DEV_FORWARD(in_dev)) goto free_skb; - rt = ip_route_output(dev_net(dev), iph->daddr, 0, + rt = ip_route_output(net, iph->daddr, 0, RT_TOS(iph->tos), 0); if (!IS_ERR(rt)) { /* - Bridged-and-DNAT'ed traffic doesn't |