summaryrefslogtreecommitdiff
path: root/net/ipv4/ip_sockglue.c
diff options
context:
space:
mode:
authorJohn Dykstra <john.dykstra1@gmail.com>2009-10-19 21:53:53 -0700
committerDavid S. Miller <davem@davemloft.net>2009-10-19 23:22:52 -0700
commit0eae750e6019a93643063924209c1daf9cb9b4a7 (patch)
treea9c85a1561be628ed6bd45e70ebd833fdd1828a9 /net/ipv4/ip_sockglue.c
parentce5eb7a29251a66e613a300532b642ddc23b48d8 (diff)
IP: Cleanups
Use symbols instead of magic constants while checking PMTU discovery setsockopt. Remove redundant test in ip_rt_frag_needed() (done by caller). Signed-off-by: John Dykstra <john.dykstra1@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/ip_sockglue.c')
-rw-r--r--net/ipv4/ip_sockglue.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv4/ip_sockglue.c b/net/ipv4/ip_sockglue.c
index c602d985fe14..2445fedec0b8 100644
--- a/net/ipv4/ip_sockglue.c
+++ b/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;