summaryrefslogtreecommitdiffstats
path: root/net/ipv6/ipv6_sockglue.c
diff options
context:
space:
mode:
authorJohn Dykstra <john.dykstra1@gmail.com>2009-10-20 06:53:53 +0200
committerDavid S. Miller <davem@davemloft.net>2009-10-20 08:22:52 +0200
commit0eae750e6019a93643063924209c1daf9cb9b4a7 (patch)
treea9c85a1561be628ed6bd45e70ebd833fdd1828a9 /net/ipv6/ipv6_sockglue.c
parenti2400m-sdio: select IWMC3200TOP in Kconfig (diff)
downloadlinux-0eae750e6019a93643063924209c1daf9cb9b4a7.tar.xz
linux-0eae750e6019a93643063924209c1daf9cb9b4a7.zip
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/ipv6/ipv6_sockglue.c')
-rw-r--r--net/ipv6/ipv6_sockglue.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv6/ipv6_sockglue.c b/net/ipv6/ipv6_sockglue.c
index 39e10ac88019..68566de4bcc5 100644
--- a/net/ipv6/ipv6_sockglue.c
+++ b/net/ipv6/ipv6_sockglue.c
@@ -662,7 +662,7 @@ done:
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;