From d889a76a6659491e68b7f3b67f5b1f528b45a596 Mon Sep 17 00:00:00 2001 From: John Dykstra Date: Mon, 19 Oct 2009 21:53:53 -0700 Subject: [PATCH] --- yaml --- r: 170743 b: refs/heads/master c: 0eae750e6019a93643063924209c1daf9cb9b4a7 h: refs/heads/master i: 170741: 35bb1e127aab368bde26c30f9e81c001dc8a8b93 170739: 876818be1657e237a43a8d611ca1cc08e755af05 170735: 72f515a87f1cd20a1ec8f1c9ec9e01eeb94fcc91 v: v3 --- [refs] | 2 +- trunk/net/ipv4/ip_sockglue.c | 2 +- trunk/net/ipv4/route.c | 3 --- trunk/net/ipv6/ipv6_sockglue.c | 2 +- 4 files changed, 3 insertions(+), 6 deletions(-) diff --git a/[refs] b/[refs] index b03c778f166a..aa9f198b23ec 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: ce5eb7a29251a66e613a300532b642ddc23b48d8 +refs/heads/master: 0eae750e6019a93643063924209c1daf9cb9b4a7 diff --git a/trunk/net/ipv4/ip_sockglue.c b/trunk/net/ipv4/ip_sockglue.c index c602d985fe14..2445fedec0b8 100644 --- a/trunk/net/ipv4/ip_sockglue.c +++ b/trunk/net/ipv4/ip_sockglue.c @@ -575,7 +575,7 @@ static int do_ip_setsockopt(struct sock *sk, int level, inet->hdrincl = val ? 1 : 0; break; case IP_MTU_DISCOVER: - if (val < 0 || val > 3) + if (val < IP_PMTUDISC_DONT || val > IP_PMTUDISC_PROBE) goto e_inval; inet->pmtudisc = val; break; diff --git a/trunk/net/ipv4/route.c b/trunk/net/ipv4/route.c index bb4199252026..68fb22702051 100644 --- a/trunk/net/ipv4/route.c +++ b/trunk/net/ipv4/route.c @@ -1628,9 +1628,6 @@ unsigned short ip_rt_frag_needed(struct net *net, struct iphdr *iph, __be32 daddr = iph->daddr; unsigned short est_mtu = 0; - if (ipv4_config.no_pmtu_disc) - return 0; - for (k = 0; k < 2; k++) { for (i = 0; i < 2; i++) { unsigned hash = rt_hash(daddr, skeys[i], ikeys[k], diff --git a/trunk/net/ipv6/ipv6_sockglue.c b/trunk/net/ipv6/ipv6_sockglue.c index 39e10ac88019..68566de4bcc5 100644 --- a/trunk/net/ipv6/ipv6_sockglue.c +++ b/trunk/net/ipv6/ipv6_sockglue.c @@ -662,7 +662,7 @@ static int do_ipv6_setsockopt(struct sock *sk, int level, int optname, case IPV6_MTU_DISCOVER: if (optlen < sizeof(int)) goto e_inval; - if (val<0 || val>3) + if (val < IP_PMTUDISC_DONT || val > IP_PMTUDISC_PROBE) goto e_inval; np->pmtudisc = val; retv = 0;