Commit 9479b0af authored by Eric W. Biederman's avatar Eric W. Biederman Committed by David S. Miller

ipv4: Explicitly compute net in ip_fragment

Signed-off-by: default avatar"Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 26a949db
...@@ -500,10 +500,9 @@ static int ip_fragment(struct sock *sk, struct sk_buff *skb, ...@@ -500,10 +500,9 @@ static int ip_fragment(struct sock *sk, struct sk_buff *skb,
if (unlikely(!skb->ignore_df || if (unlikely(!skb->ignore_df ||
(IPCB(skb)->frag_max_size && (IPCB(skb)->frag_max_size &&
IPCB(skb)->frag_max_size > mtu))) { IPCB(skb)->frag_max_size > mtu))) {
struct rtable *rt = skb_rtable(skb); struct net *net = dev_net(skb_rtable(skb)->dst.dev);
struct net_device *dev = rt->dst.dev;
IP_INC_STATS(dev_net(dev), IPSTATS_MIB_FRAGFAILS); IP_INC_STATS(net, IPSTATS_MIB_FRAGFAILS);
icmp_send(skb, ICMP_DEST_UNREACH, ICMP_FRAG_NEEDED, icmp_send(skb, ICMP_DEST_UNREACH, ICMP_FRAG_NEEDED,
htonl(mtu)); htonl(mtu));
kfree_skb(skb); kfree_skb(skb);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment