/net/ipv4/ |
D | ip_options.c | 50 memcpy(iph+sizeof(struct iphdr), opt->__data, opt->optlen); in ip_options_build() 95 int optlen; in __ip_options_echo() local 99 if (sopt->optlen == 0) in __ip_options_echo() 106 optlen = sptr[sopt->rr+1]; in __ip_options_echo() 108 dopt->rr = dopt->optlen + sizeof(struct iphdr); in __ip_options_echo() 109 memcpy(dptr, sptr+sopt->rr, optlen); in __ip_options_echo() 110 if (sopt->rr_needaddr && soffset <= optlen) { in __ip_options_echo() 111 if (soffset + 3 > optlen) in __ip_options_echo() 116 dptr += optlen; in __ip_options_echo() 117 dopt->optlen += optlen; in __ip_options_echo() [all …]
|
D | ip_sockglue.c | 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() [all …]
|
D | raw.c | 582 sizeof(*inet_opt) + inet_opt->opt.optlen); in raw_sendmsg() 812 static int raw_seticmpfilter(struct sock *sk, char __user *optval, int optlen) in raw_seticmpfilter() argument 814 if (optlen > sizeof(struct icmp_filter)) in raw_seticmpfilter() 815 optlen = sizeof(struct icmp_filter); in raw_seticmpfilter() 816 if (copy_from_user(&raw_sk(sk)->filter, optval, optlen)) in raw_seticmpfilter() 821 static int raw_geticmpfilter(struct sock *sk, char __user *optval, int __user *optlen) in raw_geticmpfilter() argument 825 if (get_user(len, optlen)) in raw_geticmpfilter() 833 if (put_user(len, optlen) || in raw_geticmpfilter() 841 char __user *optval, unsigned int optlen) in do_raw_setsockopt() argument 847 return raw_seticmpfilter(sk, optval, optlen); in do_raw_setsockopt() [all …]
|
D | udp_impl.h | 16 char __user *optval, unsigned int optlen); 18 char __user *optval, int __user *optlen); 22 char __user *optval, unsigned int optlen); 24 char __user *optval, int __user *optlen);
|
D | fou.c | 121 size_t len, optlen, hdrlen; in gue_udp_recv() local 166 optlen = guehdr->hlen << 2; in gue_udp_recv() 167 len += optlen; in gue_udp_recv() 175 if (validate_gue_flags(guehdr, optlen)) in gue_udp_recv() 178 hdrlen = sizeof(struct guehdr) + optlen; in gue_udp_recv() 319 size_t len, optlen, hdrlen, off; in gue_gro_receive() local 358 optlen = guehdr->hlen << 2; in gue_gro_receive() 359 len += optlen; in gue_gro_receive() 368 validate_gue_flags(guehdr, optlen)) in gue_gro_receive() 371 hdrlen = sizeof(*guehdr) + optlen; in gue_gro_receive() [all …]
|
D | cipso_ipv4.c | 1509 int optlen; in cipso_v4_optptr() local 1512 for (optlen = iph->ihl*4 - sizeof(struct iphdr); optlen > 1; ) { in cipso_v4_optptr() 1522 if (!taglen || taglen > optlen) in cipso_v4_optptr() 1527 optlen -= taglen; in cipso_v4_optptr() 1737 opt->optlen = ip_hdr(skb)->ihl*4 - sizeof(struct iphdr); in cipso_v4_error() 1874 opt->opt.optlen = opt_len; in cipso_v4_sock_setattr() 1886 sk_conn->icsk_ext_hdr_len -= old->opt.optlen; in cipso_v4_sock_setattr() 1887 sk_conn->icsk_ext_hdr_len += opt->opt.optlen; in cipso_v4_sock_setattr() 1951 opt->opt.optlen = opt_len; in cipso_v4_req_setattr() 2008 opt->opt.optlen - cipso_off - cipso_len); in cipso_v4_delopt() [all …]
|
D | tcp.c | 2786 int optname, char __user *optval, unsigned int optlen) in do_tcp_setsockopt() argument 2799 if (optlen < 1) in do_tcp_setsockopt() 2803 min_t(long, TCP_CA_NAME_MAX-1, optlen)); in do_tcp_setsockopt() 2818 if (optlen < 1) in do_tcp_setsockopt() 2823 optlen)); in do_tcp_setsockopt() 2840 if (optlen != TCP_FASTOPEN_KEY_LENGTH && in do_tcp_setsockopt() 2841 optlen != TCP_FASTOPEN_KEY_BUF_LENGTH) in do_tcp_setsockopt() 2844 if (copy_from_user(key, optval, optlen)) in do_tcp_setsockopt() 2847 if (optlen == TCP_FASTOPEN_KEY_BUF_LENGTH) in do_tcp_setsockopt() 2857 if (optlen < sizeof(int)) in do_tcp_setsockopt() [all …]
|
/net/ipv6/ |
D | ipv6_sockglue.c | 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() [all …]
|
D | raw.c | 975 char __user *optval, int optlen) in rawv6_seticmpfilter() argument 979 if (optlen > sizeof(struct icmp6_filter)) in rawv6_seticmpfilter() 980 optlen = sizeof(struct icmp6_filter); in rawv6_seticmpfilter() 981 if (copy_from_user(&raw6_sk(sk)->filter, optval, optlen)) in rawv6_seticmpfilter() 992 char __user *optval, int __user *optlen) in rawv6_geticmpfilter() argument 998 if (get_user(len, optlen)) in rawv6_geticmpfilter() 1004 if (put_user(len, optlen)) in rawv6_geticmpfilter() 1018 char __user *optval, unsigned int optlen) in do_rawv6_setsockopt() argument 1065 char __user *optval, unsigned int optlen) in rawv6_setsockopt() argument 1074 return rawv6_seticmpfilter(sk, level, optname, optval, optlen); in rawv6_setsockopt() [all …]
|
D | udp_impl.h | 19 char __user *optval, int __user *optlen); 21 char __user *optval, unsigned int optlen); 24 char __user *optval, unsigned int optlen); 26 char __user *optval, int __user *optlen);
|
D | exthdrs_core.c | 136 int optlen; in ipv6_find_tlv() local 143 optlen = 1; in ipv6_find_tlv() 146 optlen = nh[offset + 1] + 2; in ipv6_find_tlv() 147 if (optlen > len) in ipv6_find_tlv() 151 offset += optlen; in ipv6_find_tlv() 152 len -= optlen; in ipv6_find_tlv()
|
D | ah6.c | 110 int optlen = 0; in zero_out_mutable_opts() local 120 optlen = 1; in zero_out_mutable_opts() 125 optlen = opt[off+1]+2; in zero_out_mutable_opts() 126 if (len < optlen) in zero_out_mutable_opts() 133 off += optlen; in zero_out_mutable_opts() 134 len -= optlen; in zero_out_mutable_opts() 154 int optlen = 0; in ipv6_rearrange_destopt() local 164 optlen = 1; in ipv6_rearrange_destopt() 169 optlen = opt[off+1]+2; in ipv6_rearrange_destopt() 170 if (len < optlen) in ipv6_rearrange_destopt() [all …]
|
/net/sctp/ |
D | socket.c | 1385 int __user *optlen) in sctp_getsockopt_connectx3() argument 1418 if (put_user(sizeof(assoc_id), optlen)) in sctp_getsockopt_connectx3() 2198 unsigned int optlen) in sctp_setsockopt_disable_fragments() argument 2202 if (optlen < sizeof(int)) in sctp_setsockopt_disable_fragments() 2214 unsigned int optlen) in sctp_setsockopt_events() argument 2222 if (optlen > sizeof(struct sctp_event_subscribe)) in sctp_setsockopt_events() 2225 if (copy_from_user(&subscribe, optval, optlen)) in sctp_setsockopt_events() 2228 for (i = 0; i < optlen; i++) in sctp_setsockopt_events() 2268 unsigned int optlen) in sctp_setsockopt_autoclose() argument 2276 if (optlen != sizeof(int)) in sctp_setsockopt_autoclose() [all …]
|
/net/dccp/ |
D | proto.c | 405 char __user *optval, unsigned int optlen) in dccp_setsockopt_service() argument 411 optlen > DCCP_SERVICE_LIST_MAX_LEN * sizeof(u32)) in dccp_setsockopt_service() 414 if (optlen > sizeof(service)) { in dccp_setsockopt_service() 415 sl = kmalloc(optlen, GFP_KERNEL); in dccp_setsockopt_service() 419 sl->dccpsl_nr = optlen / sizeof(u32) - 1; in dccp_setsockopt_service() 422 optlen - sizeof(service)) || in dccp_setsockopt_service() 476 char __user *optval, unsigned int optlen) in dccp_setsockopt_ccid() argument 481 if (optlen < 1 || optlen > DCCP_FEAT_MAX_SP_VALS) in dccp_setsockopt_ccid() 484 val = memdup_user(optval, optlen); in dccp_setsockopt_ccid() 490 rc = dccp_feat_register_sp(sk, DCCPF_CCID, 1, val, optlen); in dccp_setsockopt_ccid() [all …]
|
D | ccid.h | 81 int __user *optlen); 85 int __user *optlen); 243 u32 __user *optval, int __user *optlen) in ccid_hc_rx_getsockopt() argument 248 optval, optlen); in ccid_hc_rx_getsockopt() 254 u32 __user *optval, int __user *optlen) in ccid_hc_tx_getsockopt() argument 259 optval, optlen); in ccid_hc_tx_getsockopt()
|
/net/ |
D | compat.c | 341 char __user *optval, unsigned int optlen) in do_set_attach_filter() argument 354 char __user *optval, unsigned int optlen) in compat_sock_setsockopt() argument 359 optval, optlen); in compat_sock_setsockopt() 360 return sock_setsockopt(sock, level, optname, optval, optlen); in compat_sock_setsockopt() 364 char __user *optval, unsigned int optlen) in __compat_sys_setsockopt() argument 369 if (optlen > INT_MAX) in __compat_sys_setsockopt() 382 optname, optval, optlen); in __compat_sys_setsockopt() 385 optname, optval, optlen); in __compat_sys_setsockopt() 388 optname, optval, optlen); in __compat_sys_setsockopt() 395 char __user *, optval, unsigned int, optlen) in COMPAT_SYSCALL_DEFINE5() argument [all …]
|
/net/rds/ |
D | af_rds.c | 331 int optlen) in rds_set_bool_option() argument 335 if (optlen < sizeof(int)) in rds_set_bool_option() 344 int optlen) in rds_cong_monitor() argument 348 ret = rds_set_bool_option(&rs->rs_cong_monitor, optval, optlen); in rds_cong_monitor() 362 int optlen) in rds_set_transport() argument 369 if (optlen != sizeof(int)) in rds_set_transport() 384 int optlen, int optname) in rds_enable_recvtstamp() argument 388 if (optlen != sizeof(int)) in rds_enable_recvtstamp() 408 int optlen) in rds_recv_track_latency() argument 413 if (optlen != sizeof(struct rds_rx_trace_so)) in rds_recv_track_latency() [all …]
|
/net/ipv6/netfilter/ |
D | ip6t_hbh.c | 57 unsigned int optlen; in hbh_mt6() local 138 optlen = *lp + 2; in hbh_mt6() 141 optlen = 1; in hbh_mt6() 145 pr_debug("len%04X\n", optlen); in hbh_mt6() 147 if ((ptr > skb->len - optlen || hdrlen < optlen) && in hbh_mt6() 152 ptr += optlen; in hbh_mt6() 153 hdrlen -= optlen; in hbh_mt6()
|
/net/ipv4/bpfilter/ |
D | sockopt.c | 27 unsigned int optlen, bool is_set) in bpfilter_mbox_request() argument 46 err = bpfilter_ops.sockopt(sk, optname, optval, optlen, is_set); in bpfilter_mbox_request() 53 unsigned int optlen) in bpfilter_ip_set_sockopt() argument 55 return bpfilter_mbox_request(sk, optname, optval, optlen, true); in bpfilter_ip_set_sockopt() 59 int __user *optlen) in bpfilter_ip_get_sockopt() argument 63 if (get_user(len, optlen)) in bpfilter_ip_get_sockopt()
|
/net/netfilter/ |
D | xt_tcpmss.c | 33 unsigned int i, optlen; in tcpmss_mt() local 44 optlen = th->doff*4 - sizeof(*th); in tcpmss_mt() 45 if (!optlen) in tcpmss_mt() 49 op = skb_header_pointer(skb, par->thoff + sizeof(*th), optlen, _opt); in tcpmss_mt() 53 for (i = 0; i < optlen; ) { in tcpmss_mt() 55 && (optlen - i) >= TCPOLEN_MSS in tcpmss_mt()
|
/net/can/ |
D | raw.c | 488 char __user *optval, unsigned int optlen) in raw_setsockopt() argument 504 if (optlen % sizeof(struct can_filter) != 0) in raw_setsockopt() 507 if (optlen > CAN_RAW_FILTER_MAX * sizeof(struct can_filter)) in raw_setsockopt() 510 count = optlen / sizeof(struct can_filter); in raw_setsockopt() 514 filter = memdup_user(optval, optlen); in raw_setsockopt() 568 if (optlen != sizeof(err_mask)) in raw_setsockopt() 571 if (copy_from_user(&err_mask, optval, optlen)) in raw_setsockopt() 607 if (optlen != sizeof(ro->loopback)) in raw_setsockopt() 610 if (copy_from_user(&ro->loopback, optval, optlen)) in raw_setsockopt() 616 if (optlen != sizeof(ro->recv_own_msgs)) in raw_setsockopt() [all …]
|
/net/xfrm/ |
D | xfrm_output.c | 146 int hdrlen, optlen; in xfrm4_beet_encap_add() local 149 optlen = XFRM_MODE_SKB_CB(skb)->optlen; in xfrm4_beet_encap_add() 150 if (unlikely(optlen)) in xfrm4_beet_encap_add() 151 hdrlen += IPV4_BEET_PHMAXLEN - (optlen & 4); in xfrm4_beet_encap_add() 167 if (unlikely(optlen)) { in xfrm4_beet_encap_add() 168 if (WARN_ON(optlen < 0)) in xfrm4_beet_encap_add() 171 ph->padlen = 4 - (optlen & 4); in xfrm4_beet_encap_add() 172 ph->hdrlen = optlen / 8; in xfrm4_beet_encap_add() 275 int optlen, hdr_len; in xfrm6_beet_encap_add() local 278 optlen = XFRM_MODE_SKB_CB(skb)->optlen; in xfrm6_beet_encap_add() [all …]
|
/net/tls/ |
D | tls_main.c | 328 int __user *optlen) in do_tls_getsockopt_tx() argument 335 if (get_user(len, optlen)) in do_tls_getsockopt_tx() 420 char __user *optval, int __user *optlen) in do_tls_getsockopt() argument 426 rc = do_tls_getsockopt_tx(sk, optval, optlen); in do_tls_getsockopt() 436 char __user *optval, int __user *optlen) in tls_getsockopt() argument 442 optname, optval, optlen); in tls_getsockopt() 444 return do_tls_getsockopt(sk, optname, optval, optlen); in tls_getsockopt() 448 unsigned int optlen, int tx) in do_tls_setsockopt_conf() argument 457 if (!optval || (optlen < sizeof(*crypto_info))) { in do_tls_setsockopt_conf() 514 if (optlen != optsize) { in do_tls_setsockopt_conf() [all …]
|
/net/bridge/ |
D | br_netfilter_ipv6.c | 61 int optlen = nh[off + 1] + 2; in br_nf_check_hbh_len() local 65 optlen = 1; in br_nf_check_hbh_len() 86 if (optlen > len) in br_nf_check_hbh_len() 90 off += optlen; in br_nf_check_hbh_len() 91 len -= optlen; in br_nf_check_hbh_len()
|
/net/decnet/ |
D | af_decnet.c | 153 …(struct socket *sock, int level, int optname, char __user *optval, unsigned int optlen, int flags); 154 …t(struct socket *sock, int level, int optname, char __user *optval, int __user *optlen, int flags); 1323 …n_setsockopt(struct socket *sock, int level, int optname, char __user *optval, unsigned int optlen) in dn_setsockopt() argument 1329 err = __dn_setsockopt(sock, level, optname, optval, optlen, 0); in dn_setsockopt() 1335 err = nf_setsockopt(sk, PF_DECnet, optname, optval, optlen); in dn_setsockopt() 1341 …pt(struct socket *sock, int level,int optname, char __user *optval, unsigned int optlen, int flags) in __dn_setsockopt() argument 1357 if (optlen && !optval) in __dn_setsockopt() 1360 if (optlen > sizeof(u)) in __dn_setsockopt() 1363 if (copy_from_user(&u, optval, optlen)) in __dn_setsockopt() 1373 if (optlen != sizeof(struct optdata_dn)) in __dn_setsockopt() [all …]
|