projects
/
GitHub
/
moto-9609
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fcad0ac
)
ipv4: Compute net once in ip_forward_finish
author
Eric W. Biederman
<ebiederm@xmission.com>
Wed, 16 Sep 2015 01:03:55 +0000
(20:03 -0500)
committer
David S. Miller
<davem@davemloft.net>
Fri, 18 Sep 2015 00:18:33 +0000
(17:18 -0700)
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/ip_forward.c
patch
|
blob
|
blame
|
history
diff --git
a/net/ipv4/ip_forward.c
b/net/ipv4/ip_forward.c
index ba2f66b3b3f68066409eeb0428b8e638dbdeb098..95235c813f1826441c4c6a532743dc5a511afa09 100644
(file)
--- a/
net/ipv4/ip_forward.c
+++ b/
net/ipv4/ip_forward.c
@@
-63,10
+63,11
@@
static bool ip_exceeds_mtu(const struct sk_buff *skb, unsigned int mtu)
static int ip_forward_finish(struct sock *sk, struct sk_buff *skb)
{
+ struct net *net = dev_net(skb_dst(skb)->dev);
struct ip_options *opt = &(IPCB(skb)->opt);
- IP_INC_STATS_BH(
dev_net(skb_dst(skb)->dev)
, IPSTATS_MIB_OUTFORWDATAGRAMS);
- IP_ADD_STATS_BH(
dev_net(skb_dst(skb)->dev)
, IPSTATS_MIB_OUTOCTETS, skb->len);
+ IP_INC_STATS_BH(
net
, IPSTATS_MIB_OUTFORWDATAGRAMS);
+ IP_ADD_STATS_BH(
net
, IPSTATS_MIB_OUTOCTETS, skb->len);
if (unlikely(opt->optlen))
ip_forward_options(skb);