Skip to content

Commit

Permalink
ipv4: avoid useless call of the function check_peer_pmtu
Browse files Browse the repository at this point in the history
In func ipv4_dst_check,check_peer_pmtu should be called only when peer is updated.
So,if the peer is not updated in ip_rt_frag_needed,we can not inc __rt_peer_genid.

Signed-off-by: Gao feng <gaofeng@cn.fujitsu.com>
Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Gao feng authored and David S. Miller committed Oct 24, 2011
1 parent 1805b2f commit 59445b6
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions net/ipv4/route.c
Original file line number Diff line number Diff line change
Expand Up @@ -1593,11 +1593,10 @@ unsigned short ip_rt_frag_needed(struct net *net, const struct iphdr *iph,
est_mtu = mtu;
peer->pmtu_learned = mtu;
peer->pmtu_expires = pmtu_expires;
atomic_inc(&__rt_peer_genid);
}

inet_putpeer(peer);

atomic_inc(&__rt_peer_genid);
}
return est_mtu ? : new_mtu;
}
Expand Down

0 comments on commit 59445b6

Please sign in to comment.