提交 758ccac8 编写于 作者: E Eric W. Biederman 提交者: David S. Miller

ipv4: Only compute net once in ipmr_forward_finish

Signed-off-by: N"Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 38184b3b
...@@ -1681,9 +1681,10 @@ static void ip_encap(struct net *net, struct sk_buff *skb, ...@@ -1681,9 +1681,10 @@ static void ip_encap(struct net *net, struct sk_buff *skb,
static inline int ipmr_forward_finish(struct sock *sk, struct sk_buff *skb) static inline int ipmr_forward_finish(struct sock *sk, struct sk_buff *skb)
{ {
struct ip_options *opt = &(IPCB(skb)->opt); struct ip_options *opt = &(IPCB(skb)->opt);
struct net *net = dev_net(skb_dst(skb)->dev);
IP_INC_STATS_BH(dev_net(skb_dst(skb)->dev), IPSTATS_MIB_OUTFORWDATAGRAMS); IP_INC_STATS_BH(net, IPSTATS_MIB_OUTFORWDATAGRAMS);
IP_ADD_STATS_BH(dev_net(skb_dst(skb)->dev), IPSTATS_MIB_OUTOCTETS, skb->len); IP_ADD_STATS_BH(net, IPSTATS_MIB_OUTOCTETS, skb->len);
if (unlikely(opt->optlen)) if (unlikely(opt->optlen))
ip_forward_options(skb); ip_forward_options(skb);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册