Lines Matching refs:optlen
140 char __user *optval, unsigned int optlen) in do_ipv6_setsockopt() argument
151 if (optlen >= sizeof(int)) { in do_ipv6_setsockopt()
161 return ip6_mroute_setsockopt(sk, optname, optval, optlen); in do_ipv6_setsockopt()
170 if (optlen < sizeof(int)) in do_ipv6_setsockopt()
255 if (optlen < sizeof(int) || in do_ipv6_setsockopt()
263 if (optlen < sizeof(int)) in do_ipv6_setsockopt()
270 if (optlen < sizeof(int)) in do_ipv6_setsockopt()
277 if (optlen < sizeof(int)) in do_ipv6_setsockopt()
284 if (optlen < sizeof(int)) in do_ipv6_setsockopt()
291 if (optlen < sizeof(int)) in do_ipv6_setsockopt()
298 if (optlen < sizeof(int)) in do_ipv6_setsockopt()
305 if (optlen < sizeof(int)) in do_ipv6_setsockopt()
312 if (optlen < sizeof(int)) in do_ipv6_setsockopt()
319 if (optlen < sizeof(int)) in do_ipv6_setsockopt()
326 if (optlen < sizeof(int)) in do_ipv6_setsockopt()
333 if (optlen < sizeof(int)) in do_ipv6_setsockopt()
345 if (optlen < sizeof(int)) in do_ipv6_setsockopt()
352 if (optlen < sizeof(int)) in do_ipv6_setsockopt()
359 if (optlen < sizeof(int)) in do_ipv6_setsockopt()
371 if (optlen < sizeof(int)) in do_ipv6_setsockopt()
379 if (optlen < sizeof(int)) in do_ipv6_setsockopt()
387 if (optlen < sizeof(int)) in do_ipv6_setsockopt()
409 if (optlen == 0) in do_ipv6_setsockopt()
413 else if (optlen < sizeof(struct ipv6_opt_hdr) || in do_ipv6_setsockopt()
414 optlen & 0x7 || optlen > 8 * 255) in do_ipv6_setsockopt()
417 new = memdup_user(optval, optlen); in do_ipv6_setsockopt()
422 if (unlikely(ipv6_optlen(new) > optlen)) { in do_ipv6_setsockopt()
455 if (!seg6_validate_srh(srh, optlen)) in do_ipv6_setsockopt()
478 if (optlen == 0) in do_ipv6_setsockopt()
480 else if (optlen < sizeof(struct in6_pktinfo) || !optval) in do_ipv6_setsockopt()
507 if (optlen == 0) in do_ipv6_setsockopt()
514 if (optlen > 64*1024) in do_ipv6_setsockopt()
517 opt = sock_kmalloc(sk, sizeof(*opt) + optlen, GFP_KERNEL); in do_ipv6_setsockopt()
524 opt->tot_len = sizeof(*opt) + optlen; in do_ipv6_setsockopt()
526 if (copy_from_user(opt+1, optval, optlen)) in do_ipv6_setsockopt()
529 msg.msg_controllen = optlen; in do_ipv6_setsockopt()
547 if (optlen < sizeof(int)) in do_ipv6_setsockopt()
558 if (optlen < sizeof(int)) in do_ipv6_setsockopt()
567 if (optlen < sizeof(int)) in do_ipv6_setsockopt()
580 if (optlen != sizeof(int)) in do_ipv6_setsockopt()
608 if (optlen < sizeof(int)) in do_ipv6_setsockopt()
640 if (optlen < sizeof(struct ipv6_mreq)) in do_ipv6_setsockopt()
662 if (optlen < sizeof(struct ipv6_mreq)) in do_ipv6_setsockopt()
676 if (optlen < sizeof(int)) in do_ipv6_setsockopt()
688 if (optlen < sizeof(struct group_req)) in do_ipv6_setsockopt()
715 if (optlen < sizeof(struct group_source_req)) in do_ipv6_setsockopt()
755 if (optlen < GROUP_FILTER_SIZE(0)) in do_ipv6_setsockopt()
757 if (optlen > sysctl_optmem_max) { in do_ipv6_setsockopt()
761 gsf = memdup_user(optval, optlen); in do_ipv6_setsockopt()
773 if (GROUP_FILTER_SIZE(gsf->gf_numsrc) > optlen) { in do_ipv6_setsockopt()
784 if (optlen < sizeof(int)) in do_ipv6_setsockopt()
789 if (optlen < sizeof(int)) in do_ipv6_setsockopt()
795 if (optlen < sizeof(int)) in do_ipv6_setsockopt()
803 if (optlen < sizeof(int)) in do_ipv6_setsockopt()
811 if (optlen < sizeof(int)) in do_ipv6_setsockopt()
819 if (optlen < sizeof(int)) in do_ipv6_setsockopt()
825 retv = ipv6_flowlabel_opt(sk, optval, optlen); in do_ipv6_setsockopt()
832 retv = xfrm_user_policy(sk, optname, optval, optlen); in do_ipv6_setsockopt()
840 if (optlen < sizeof(int)) in do_ipv6_setsockopt()
898 if (optlen < sizeof(int)) in do_ipv6_setsockopt()
934 char __user *optval, unsigned int optlen) in ipv6_setsockopt() argument
939 return udp_prot.setsockopt(sk, level, optname, optval, optlen); in ipv6_setsockopt()
944 err = do_ipv6_setsockopt(sk, level, optname, optval, optlen); in ipv6_setsockopt()
949 err = nf_setsockopt(sk, PF_INET6, optname, optval, optlen); in ipv6_setsockopt()
957 char __user *optval, unsigned int optlen) in compat_ipv6_setsockopt() argument
964 optval, optlen); in compat_ipv6_setsockopt()
965 return udp_prot.setsockopt(sk, level, optname, optval, optlen); in compat_ipv6_setsockopt()
972 return compat_mc_setsockopt(sk, level, optname, optval, optlen, in compat_ipv6_setsockopt()
975 err = do_ipv6_setsockopt(sk, level, optname, optval, optlen); in compat_ipv6_setsockopt()
981 optlen); in compat_ipv6_setsockopt()
1023 char __user *optval, int __user *optlen, unsigned int flags) in do_ipv6_getsockopt() argument
1030 return ip6_mroute_getsockopt(sk, optname, optval, optlen); in do_ipv6_getsockopt()
1032 if (get_user(len, optlen)) in do_ipv6_getsockopt()
1057 (struct group_filter __user *)optval, optlen); in do_ipv6_getsockopt()
1115 return put_user(len, optlen); in do_ipv6_getsockopt()
1175 return put_user(len, optlen); in do_ipv6_getsockopt()
1229 if (put_user(len, optlen)) in do_ipv6_getsockopt()
1323 if (put_user(len, optlen)) in do_ipv6_getsockopt()
1373 if (put_user(len, optlen)) in do_ipv6_getsockopt()
1381 char __user *optval, int __user *optlen) in ipv6_getsockopt() argument
1386 return udp_prot.getsockopt(sk, level, optname, optval, optlen); in ipv6_getsockopt()
1391 err = do_ipv6_getsockopt(sk, level, optname, optval, optlen, 0); in ipv6_getsockopt()
1397 if (get_user(len, optlen)) in ipv6_getsockopt()
1402 err = put_user(len, optlen); in ipv6_getsockopt()
1411 char __user *optval, int __user *optlen) in compat_ipv6_getsockopt() argument
1418 optval, optlen); in compat_ipv6_getsockopt()
1419 return udp_prot.getsockopt(sk, level, optname, optval, optlen); in compat_ipv6_getsockopt()
1426 return compat_mc_getsockopt(sk, level, optname, optval, optlen, in compat_ipv6_getsockopt()
1429 err = do_ipv6_getsockopt(sk, level, optname, optval, optlen, in compat_ipv6_getsockopt()
1436 if (get_user(len, optlen)) in compat_ipv6_getsockopt()
1441 err = put_user(len, optlen); in compat_ipv6_getsockopt()