/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 | xfrm4_mode_beet.c | 43 int hdrlen, optlen; in xfrm4_beet_output() local 46 optlen = XFRM_MODE_SKB_CB(skb)->optlen; in xfrm4_beet_output() 47 if (unlikely(optlen)) in xfrm4_beet_output() 48 hdrlen += IPV4_BEET_PHMAXLEN - (optlen & 4); in xfrm4_beet_output() 64 if (unlikely(optlen)) { in xfrm4_beet_output() 65 BUG_ON(optlen < 0); in xfrm4_beet_output() 67 ph->padlen = 4 - (optlen & 4); in xfrm4_beet_output() 68 ph->hdrlen = optlen / 8; in xfrm4_beet_output() 86 int optlen = 0; in xfrm4_beet_input() local 99 optlen = ph->hdrlen * 8 + (IPV4_BEET_PHMAXLEN - phlen); in xfrm4_beet_input() [all …]
|
D | ip_sockglue.c | 76 if (IPCB(skb)->opt.optlen == 0) in ip_cmsg_recv_opts() 79 put_cmsg(msg, SOL_IP, IP_RECVOPTS, IPCB(skb)->opt.optlen, in ip_cmsg_recv_opts() 90 if (IPCB(skb)->opt.optlen == 0) in ip_cmsg_recv_retopts() 99 put_cmsg(msg, SOL_IP, IP_RETOPTS, opt->optlen, opt->__data); in ip_cmsg_recv_retopts() 594 int optname, char __user *optval, unsigned int optlen) in do_ip_setsockopt() argument 626 if (optlen >= sizeof(int)) { in do_ip_setsockopt() 629 } else if (optlen >= sizeof(char)) { in do_ip_setsockopt() 641 return ip_mroute_setsockopt(sk, optname, optval, optlen); in do_ip_setsockopt() 653 if (optlen > 40) in do_ip_setsockopt() 656 optval, optlen); in do_ip_setsockopt() [all …]
|
D | udp_impl.h | 15 char __user *optval, unsigned int optlen); 17 char __user *optval, int __user *optlen); 21 char __user *optval, unsigned int optlen); 23 char __user *optval, int __user *optlen);
|
D | raw.c | 590 sizeof(*inet_opt) + inet_opt->opt.optlen); in raw_sendmsg() 811 static int raw_seticmpfilter(struct sock *sk, char __user *optval, int optlen) in raw_seticmpfilter() argument 813 if (optlen > sizeof(struct icmp_filter)) in raw_seticmpfilter() 814 optlen = sizeof(struct icmp_filter); in raw_seticmpfilter() 815 if (copy_from_user(&raw_sk(sk)->filter, optval, optlen)) in raw_seticmpfilter() 820 static int raw_geticmpfilter(struct sock *sk, char __user *optval, int __user *optlen) in raw_geticmpfilter() argument 824 if (get_user(len, optlen)) in raw_geticmpfilter() 832 if (put_user(len, optlen) || in raw_geticmpfilter() 840 char __user *optval, unsigned int optlen) in do_raw_setsockopt() argument 846 return raw_seticmpfilter(sk, optval, optlen); in do_raw_setsockopt() [all …]
|
D | fou.c | 119 size_t len, optlen, hdrlen; in gue_udp_recv() local 164 optlen = guehdr->hlen << 2; in gue_udp_recv() 165 len += optlen; in gue_udp_recv() 173 hdrlen = sizeof(struct guehdr) + optlen; in gue_udp_recv() 175 if (guehdr->version != 0 || 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() [all …]
|
D | tcp.c | 2499 int optname, char __user *optval, unsigned int optlen) in do_tcp_setsockopt() argument 2512 if (optlen < 1) in do_tcp_setsockopt() 2516 min_t(long, TCP_CA_NAME_MAX-1, optlen)); in do_tcp_setsockopt() 2531 if (optlen < 1) in do_tcp_setsockopt() 2536 optlen)); in do_tcp_setsockopt() 2551 if (optlen < sizeof(int)) in do_tcp_setsockopt() 2643 optlen); in do_tcp_setsockopt() 2761 err = tp->af_specific->md5_parse(sk, optname, optval, optlen); in do_tcp_setsockopt() 2805 err = tcp_repair_set_window(tp, optval, optlen); in do_tcp_setsockopt() 2821 unsigned int optlen) in tcp_setsockopt() argument [all …]
|
D | cipso_ipv4.c | 1523 int optlen; in cipso_v4_optptr() local 1526 for (optlen = iph->ihl*4 - sizeof(struct iphdr); optlen > 1; ) { in cipso_v4_optptr() 1536 if (!taglen || taglen > optlen) in cipso_v4_optptr() 1541 optlen -= taglen; in cipso_v4_optptr() 1752 opt->optlen = ip_hdr(skb)->ihl*4 - sizeof(struct iphdr); in cipso_v4_error() 1893 opt->opt.optlen = opt_len; in cipso_v4_sock_setattr() 1905 sk_conn->icsk_ext_hdr_len -= old->opt.optlen; in cipso_v4_sock_setattr() 1906 sk_conn->icsk_ext_hdr_len += opt->opt.optlen; in cipso_v4_sock_setattr() 1970 opt->opt.optlen = opt_len; in cipso_v4_req_setattr() 2027 opt->opt.optlen - cipso_off - cipso_len); in cipso_v4_delopt() [all …]
|
/net/ipv6/ |
D | ipv6_sockglue.c | 142 char __user *optval, unsigned int optlen) in do_ipv6_setsockopt() argument 153 if (optlen >= sizeof(int)) { in do_ipv6_setsockopt() 163 return ip6_mroute_setsockopt(sk, optname, optval, optlen); in do_ipv6_setsockopt() 172 if (optlen < sizeof(int)) in do_ipv6_setsockopt() 263 if (optlen < sizeof(int) || in do_ipv6_setsockopt() 271 if (optlen < sizeof(int)) in do_ipv6_setsockopt() 278 if (optlen < sizeof(int)) in do_ipv6_setsockopt() 285 if (optlen < sizeof(int)) in do_ipv6_setsockopt() 292 if (optlen < sizeof(int)) in do_ipv6_setsockopt() 299 if (optlen < sizeof(int)) in do_ipv6_setsockopt() [all …]
|
D | xfrm6_mode_beet.c | 44 int optlen, hdr_len; in xfrm6_beet_output() local 47 optlen = XFRM_MODE_SKB_CB(skb)->optlen; in xfrm6_beet_output() 48 if (unlikely(optlen)) in xfrm6_beet_output() 49 hdr_len += IPV4_BEET_PHMAXLEN - (optlen & 4); in xfrm6_beet_output() 62 if (unlikely(optlen)) { in xfrm6_beet_output() 64 BUG_ON(optlen < 0); in xfrm6_beet_output() 66 ph->padlen = 4 - (optlen & 4); in xfrm6_beet_output() 67 ph->hdrlen = optlen / 8; in xfrm6_beet_output()
|
D | raw.c | 978 char __user *optval, int optlen) in rawv6_seticmpfilter() argument 982 if (optlen > sizeof(struct icmp6_filter)) in rawv6_seticmpfilter() 983 optlen = sizeof(struct icmp6_filter); in rawv6_seticmpfilter() 984 if (copy_from_user(&raw6_sk(sk)->filter, optval, optlen)) in rawv6_seticmpfilter() 995 char __user *optval, int __user *optlen) in rawv6_geticmpfilter() argument 1001 if (get_user(len, optlen)) in rawv6_geticmpfilter() 1007 if (put_user(len, optlen)) in rawv6_geticmpfilter() 1021 char __user *optval, unsigned int optlen) in do_rawv6_setsockopt() argument 1068 char __user *optval, unsigned int optlen) in rawv6_setsockopt() argument 1077 return rawv6_seticmpfilter(sk, level, optname, optval, optlen); in rawv6_setsockopt() [all …]
|
D | udp_impl.h | 18 char __user *optval, int __user *optlen); 20 char __user *optval, unsigned int optlen); 23 char __user *optval, unsigned int optlen); 25 char __user *optval, int __user *optlen);
|
D | exthdrs_core.c | 135 int optlen; in ipv6_find_tlv() local 142 optlen = 1; in ipv6_find_tlv() 145 optlen = nh[offset + 1] + 2; in ipv6_find_tlv() 146 if (optlen > len) in ipv6_find_tlv() 150 offset += optlen; in ipv6_find_tlv() 151 len -= optlen; in ipv6_find_tlv()
|
D | ah6.c | 122 int optlen = 0; in zero_out_mutable_opts() local 132 optlen = 1; in zero_out_mutable_opts() 137 optlen = opt[off+1]+2; in zero_out_mutable_opts() 138 if (len < optlen) in zero_out_mutable_opts() 145 off += optlen; in zero_out_mutable_opts() 146 len -= optlen; in zero_out_mutable_opts() 166 int optlen = 0; in ipv6_rearrange_destopt() local 176 optlen = 1; in ipv6_rearrange_destopt() 181 optlen = opt[off+1]+2; in ipv6_rearrange_destopt() 182 if (len < optlen) in ipv6_rearrange_destopt() [all …]
|
/net/sctp/ |
D | socket.c | 1428 int __user *optlen) in sctp_getsockopt_connectx3() argument 1461 if (put_user(sizeof(assoc_id), optlen)) in sctp_getsockopt_connectx3() 2242 unsigned int optlen) in sctp_setsockopt_disable_fragments() argument 2246 if (optlen < sizeof(int)) in sctp_setsockopt_disable_fragments() 2258 unsigned int optlen) in sctp_setsockopt_events() argument 2263 if (optlen > sizeof(struct sctp_event_subscribe)) in sctp_setsockopt_events() 2265 if (copy_from_user(&sctp_sk(sk)->subscribe, optval, optlen)) in sctp_setsockopt_events() 2301 unsigned int optlen) in sctp_setsockopt_autoclose() argument 2309 if (optlen != sizeof(int)) in sctp_setsockopt_autoclose() 2311 if (copy_from_user(&sp->autoclose, optval, optlen)) in sctp_setsockopt_autoclose() [all …]
|
/net/rds/ |
D | af_rds.c | 228 int optlen) in rds_set_bool_option() argument 232 if (optlen < sizeof(int)) in rds_set_bool_option() 241 int optlen) in rds_cong_monitor() argument 245 ret = rds_set_bool_option(&rs->rs_cong_monitor, optval, optlen); in rds_cong_monitor() 259 int optlen) in rds_set_transport() argument 266 if (optlen != sizeof(int)) in rds_set_transport() 281 int optlen) in rds_enable_recvtstamp() argument 285 if (optlen != sizeof(int)) in rds_enable_recvtstamp() 302 int optlen) in rds_recv_track_latency() argument 307 if (optlen != sizeof(struct rds_rx_trace_so)) in rds_recv_track_latency() [all …]
|
/net/dccp/ |
D | proto.c | 406 char __user *optval, unsigned int optlen) in dccp_setsockopt_service() argument 412 optlen > DCCP_SERVICE_LIST_MAX_LEN * sizeof(u32)) in dccp_setsockopt_service() 415 if (optlen > sizeof(service)) { in dccp_setsockopt_service() 416 sl = kmalloc(optlen, GFP_KERNEL); in dccp_setsockopt_service() 420 sl->dccpsl_nr = optlen / sizeof(u32) - 1; in dccp_setsockopt_service() 423 optlen - sizeof(service)) || in dccp_setsockopt_service() 477 char __user *optval, unsigned int optlen) in dccp_setsockopt_ccid() argument 482 if (optlen < 1 || optlen > DCCP_FEAT_MAX_SP_VALS) in dccp_setsockopt_ccid() 485 val = memdup_user(optval, optlen); in dccp_setsockopt_ccid() 491 rc = dccp_feat_register_sp(sk, DCCPF_CCID, 1, val, optlen); in dccp_setsockopt_ccid() [all …]
|
D | ccid.h | 84 int __user *optlen); 88 int __user *optlen); 246 u32 __user *optval, int __user *optlen) in ccid_hc_rx_getsockopt() argument 251 optval, optlen); in ccid_hc_rx_getsockopt() 257 u32 __user *optval, int __user *optlen) in ccid_hc_tx_getsockopt() argument 262 optval, optlen); in ccid_hc_tx_getsockopt()
|
/net/ |
D | compat.c | 339 char __user *optval, unsigned int optlen) in do_set_attach_filter() argument 352 int optname, char __user *optval, unsigned int optlen) in do_set_sock_timeout() argument 359 if (optlen < sizeof(*up)) in do_set_sock_timeout() 374 char __user *optval, unsigned int optlen) in compat_sock_setsockopt() argument 379 optval, optlen); in compat_sock_setsockopt() 382 return do_set_sock_timeout(sock, level, optname, optval, optlen); in compat_sock_setsockopt() 384 return sock_setsockopt(sock, level, optname, optval, optlen); in compat_sock_setsockopt() 388 char __user *, optval, unsigned int, optlen) in COMPAT_SYSCALL_DEFINE5() argument 402 optname, optval, optlen); in COMPAT_SYSCALL_DEFINE5() 405 optname, optval, optlen); in COMPAT_SYSCALL_DEFINE5() [all …]
|
/net/tls/ |
D | tls_main.c | 299 int __user *optlen) in do_tls_getsockopt_tx() argument 306 if (get_user(len, optlen)) in do_tls_getsockopt_tx() 365 char __user *optval, int __user *optlen) in do_tls_getsockopt() argument 371 rc = do_tls_getsockopt_tx(sk, optval, optlen); in do_tls_getsockopt() 381 char __user *optval, int __user *optlen) in tls_getsockopt() argument 386 return ctx->getsockopt(sk, level, optname, optval, optlen); in tls_getsockopt() 388 return do_tls_getsockopt(sk, optname, optval, optlen); in tls_getsockopt() 392 unsigned int optlen) in do_tls_setsockopt_tx() argument 399 if (!optval || (optlen < sizeof(*crypto_info))) { in do_tls_setsockopt_tx() 425 if (optlen != sizeof(struct tls12_crypto_info_aes_gcm_128)) { in do_tls_setsockopt_tx() [all …]
|
/net/ipv6/netfilter/ |
D | ip6t_hbh.c | 60 unsigned int optlen; in hbh_mt6() local 141 optlen = *lp + 2; in hbh_mt6() 144 optlen = 1; in hbh_mt6() 148 pr_debug("len%04X\n", optlen); in hbh_mt6() 150 if ((ptr > skb->len - optlen || hdrlen < optlen) && in hbh_mt6() 155 ptr += optlen; in hbh_mt6() 156 hdrlen -= optlen; in hbh_mt6()
|
/net/netfilter/ |
D | xt_tcpmss.c | 36 unsigned int i, optlen; in tcpmss_mt() local 47 optlen = th->doff*4 - sizeof(*th); in tcpmss_mt() 48 if (!optlen) in tcpmss_mt() 52 op = skb_header_pointer(skb, par->thoff + sizeof(*th), optlen, _opt); in tcpmss_mt() 56 for (i = 0; i < optlen; ) { in tcpmss_mt() 58 && (optlen - i) >= TCPOLEN_MSS in tcpmss_mt()
|
/net/can/ |
D | raw.c | 490 char __user *optval, unsigned int optlen) in raw_setsockopt() argument 507 if (optlen % sizeof(struct can_filter) != 0) in raw_setsockopt() 510 if (optlen > CAN_RAW_FILTER_MAX * sizeof(struct can_filter)) in raw_setsockopt() 513 count = optlen / sizeof(struct can_filter); in raw_setsockopt() 517 filter = memdup_user(optval, optlen); in raw_setsockopt() 571 if (optlen != sizeof(err_mask)) in raw_setsockopt() 574 if (copy_from_user(&err_mask, optval, optlen)) in raw_setsockopt() 610 if (optlen != sizeof(ro->loopback)) in raw_setsockopt() 613 if (copy_from_user(&ro->loopback, optval, optlen)) in raw_setsockopt() 619 if (optlen != sizeof(ro->recv_own_msgs)) in raw_setsockopt() [all …]
|
/net/bridge/ |
D | br_netfilter_ipv6.c | 65 int optlen = nh[off + 1] + 2; in br_nf_check_hbh_len() local 69 optlen = 1; in br_nf_check_hbh_len() 90 if (optlen > len) in br_nf_check_hbh_len() 94 off += optlen; in br_nf_check_hbh_len() 95 len -= optlen; in br_nf_check_hbh_len()
|
/net/core/ |
D | sock.c | 376 static int sock_set_timeout(long *timeo_p, char __user *optval, int optlen) in sock_set_timeout() argument 380 if (optlen < sizeof(tv)) in sock_set_timeout() 562 int optlen) in sock_setbindtodevice() argument 576 if (optlen < 0) in sock_setbindtodevice() 584 if (optlen > IFNAMSIZ - 1) in sock_setbindtodevice() 585 optlen = IFNAMSIZ - 1; in sock_setbindtodevice() 589 if (copy_from_user(devname, optval, optlen)) in sock_setbindtodevice() 620 int __user *optlen, int len) in sock_getbindtodevice() argument 648 if (put_user(len, optlen)) in sock_getbindtodevice() 692 char __user *optval, unsigned int optlen) in sock_setsockopt() argument [all …]
|