• Home
  • Raw
  • Download

Lines Matching refs:optlen

78 	if (IPCB(skb)->opt.optlen == 0)  in ip_cmsg_recv_opts()
81 put_cmsg(msg, SOL_IP, IP_RECVOPTS, IPCB(skb)->opt.optlen, in ip_cmsg_recv_opts()
92 if (IPCB(skb)->opt.optlen == 0) in ip_cmsg_recv_retopts()
101 put_cmsg(msg, SOL_IP, IP_RETOPTS, opt->optlen, opt->__data); in ip_cmsg_recv_retopts()
591 int optname, char __user *optval, unsigned int optlen) in do_ip_setsockopt() argument
623 if (optlen >= sizeof(int)) { in do_ip_setsockopt()
626 } else if (optlen >= sizeof(char)) { in do_ip_setsockopt()
640 return ip_mroute_setsockopt(sk, optname, optval, optlen); in do_ip_setsockopt()
652 if (optlen > 40) in do_ip_setsockopt()
655 optval, optlen); in do_ip_setsockopt()
669 icsk->icsk_ext_hdr_len -= old->opt.optlen; in do_ip_setsockopt()
671 icsk->icsk_ext_hdr_len += opt->opt.optlen; in do_ip_setsockopt()
757 if (optlen < 1) in do_ip_setsockopt()
793 if (optlen < 1) in do_ip_setsockopt()
802 if (optlen < 1) in do_ip_setsockopt()
812 if (optlen != sizeof(int)) in do_ip_setsockopt()
851 if (optlen < sizeof(struct in_addr)) in do_ip_setsockopt()
855 if (optlen >= sizeof(struct ip_mreqn)) { in do_ip_setsockopt()
860 if (optlen >= sizeof(struct ip_mreq)) { in do_ip_setsockopt()
864 } else if (optlen >= sizeof(struct in_addr)) { in do_ip_setsockopt()
914 if (optlen < sizeof(struct ip_mreq)) in do_ip_setsockopt()
917 if (optlen >= sizeof(struct ip_mreqn)) { in do_ip_setsockopt()
936 if (optlen < IP_MSFILTER_SIZE(0)) in do_ip_setsockopt()
938 if (optlen > sysctl_optmem_max) { in do_ip_setsockopt()
942 msf = memdup_user(optval, optlen); in do_ip_setsockopt()
954 if (IP_MSFILTER_SIZE(msf->imsf_numsrc) > optlen) { in do_ip_setsockopt()
971 if (optlen != sizeof(struct ip_mreq_source)) in do_ip_setsockopt()
1008 if (optlen < sizeof(struct group_req)) in do_ip_setsockopt()
1036 if (optlen != sizeof(struct group_source_req)) in do_ip_setsockopt()
1087 if (optlen < GROUP_FILTER_SIZE(0)) in do_ip_setsockopt()
1089 if (optlen > sysctl_optmem_max) { in do_ip_setsockopt()
1093 gsf = memdup_user(optval, optlen); in do_ip_setsockopt()
1105 if (GROUP_FILTER_SIZE(gsf->gf_numsrc) > optlen) { in do_ip_setsockopt()
1143 if (optlen < 1) in do_ip_setsockopt()
1151 if (optlen < 1) in do_ip_setsockopt()
1161 err = xfrm_user_policy(sk, optname, optval, optlen); in do_ip_setsockopt()
1170 if (optlen < 1) in do_ip_setsockopt()
1176 if (optlen < 1) in do_ip_setsockopt()
1241 int optname, char __user *optval, unsigned int optlen) in ip_setsockopt() argument
1248 err = do_ip_setsockopt(sk, level, optname, optval, optlen); in ip_setsockopt()
1252 err = bpfilter_ip_set_sockopt(sk, optname, optval, optlen); in ip_setsockopt()
1260 err = nf_setsockopt(sk, PF_INET, optname, optval, optlen); in ip_setsockopt()
1268 char __user *optval, unsigned int optlen) in compat_ip_setsockopt() argument
1276 return compat_mc_setsockopt(sk, level, optname, optval, optlen, in compat_ip_setsockopt()
1279 err = do_ip_setsockopt(sk, level, optname, optval, optlen); in compat_ip_setsockopt()
1287 optlen); in compat_ip_setsockopt()
1310 char __user *optval, int __user *optlen, unsigned int flags) in do_ip_getsockopt() argument
1321 return ip_mroute_getsockopt(sk, optname, optval, optlen); in do_ip_getsockopt()
1323 if (get_user(len, optlen)) in do_ip_getsockopt()
1341 opt->optlen = 0; in do_ip_getsockopt()
1345 inet_opt->opt.optlen); in do_ip_getsockopt()
1348 if (opt->optlen == 0) in do_ip_getsockopt()
1349 return put_user(0, optlen); in do_ip_getsockopt()
1353 len = min_t(unsigned int, len, opt->optlen); in do_ip_getsockopt()
1354 if (put_user(len, optlen)) in do_ip_getsockopt()
1444 if (put_user(len, optlen)) in do_ip_getsockopt()
1463 (struct ip_msfilter __user *)optval, optlen); in do_ip_getsockopt()
1480 optlen); in do_ip_getsockopt()
1516 return put_user(len, optlen); in do_ip_getsockopt()
1536 if (put_user(len, optlen)) in do_ip_getsockopt()
1542 if (put_user(len, optlen)) in do_ip_getsockopt()
1557 int optname, char __user *optval, int __user *optlen) in ip_getsockopt() argument
1561 err = do_ip_getsockopt(sk, level, optname, optval, optlen, 0); in ip_getsockopt()
1565 err = bpfilter_ip_get_sockopt(sk, optname, optval, optlen); in ip_getsockopt()
1573 if (get_user(len, optlen)) in ip_getsockopt()
1578 err = put_user(len, optlen); in ip_getsockopt()
1588 char __user *optval, int __user *optlen) in compat_ip_getsockopt() argument
1593 return compat_mc_getsockopt(sk, level, optname, optval, optlen, in compat_ip_getsockopt()
1596 err = do_ip_getsockopt(sk, level, optname, optval, optlen, in compat_ip_getsockopt()
1602 err = bpfilter_ip_get_sockopt(sk, optname, optval, optlen); in compat_ip_getsockopt()
1610 if (get_user(len, optlen)) in compat_ip_getsockopt()
1615 err = put_user(len, optlen); in compat_ip_getsockopt()