/net/ipv4/ |
D | ip_options.c | 49 memcpy(iph+sizeof(struct iphdr), opt->__data, opt->optlen); in ip_options_build() 94 int optlen; in __ip_options_echo() local 98 if (sopt->optlen == 0) in __ip_options_echo() 105 optlen = sptr[sopt->rr+1]; in __ip_options_echo() 107 dopt->rr = dopt->optlen + sizeof(struct iphdr); in __ip_options_echo() 108 memcpy(dptr, sptr+sopt->rr, optlen); in __ip_options_echo() 109 if (sopt->rr_needaddr && soffset <= optlen) { in __ip_options_echo() 110 if (soffset + 3 > optlen) in __ip_options_echo() 115 dptr += optlen; in __ip_options_echo() 116 dopt->optlen += optlen; in __ip_options_echo() [all …]
|
D | ip_sockglue.c | 82 if (IPCB(skb)->opt.optlen == 0) in ip_cmsg_recv_opts() 85 put_cmsg(msg, SOL_IP, IP_RECVOPTS, IPCB(skb)->opt.optlen, in ip_cmsg_recv_opts() 95 if (IPCB(skb)->opt.optlen == 0) in ip_cmsg_recv_retopts() 104 put_cmsg(msg, SOL_IP, IP_RETOPTS, opt->optlen, opt->__data); in ip_cmsg_recv_retopts() 474 int optname, char __user *optval, unsigned int optlen) in do_ip_setsockopt() argument 501 if (optlen >= sizeof(int)) { in do_ip_setsockopt() 504 } else if (optlen >= sizeof(char)) { in do_ip_setsockopt() 516 return ip_mroute_setsockopt(sk, optname, optval, optlen); in do_ip_setsockopt() 526 if (optlen > 40) in do_ip_setsockopt() 529 optval, optlen); in do_ip_setsockopt() [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() 65 if (unlikely(optlen)) { in xfrm4_beet_output() 66 BUG_ON(optlen < 0); in xfrm4_beet_output() 68 ph->padlen = 4 - (optlen & 4); in xfrm4_beet_output() 69 ph->hdrlen = optlen / 8; in xfrm4_beet_output() 87 int optlen = 0; in xfrm4_beet_input() local 100 optlen = ph->hdrlen * 8 + (IPV4_BEET_PHMAXLEN - phlen); in xfrm4_beet_input() [all …]
|
D | raw.c | 557 sizeof(*inet_opt) + inet_opt->opt.optlen); in raw_sendmsg() 764 static int raw_seticmpfilter(struct sock *sk, char __user *optval, int optlen) in raw_seticmpfilter() argument 766 if (optlen > sizeof(struct icmp_filter)) in raw_seticmpfilter() 767 optlen = sizeof(struct icmp_filter); in raw_seticmpfilter() 768 if (copy_from_user(&raw_sk(sk)->filter, optval, optlen)) in raw_seticmpfilter() 773 static int raw_geticmpfilter(struct sock *sk, char __user *optval, int __user *optlen) in raw_geticmpfilter() argument 777 if (get_user(len, optlen)) in raw_geticmpfilter() 785 if (put_user(len, optlen) || in raw_geticmpfilter() 793 char __user *optval, unsigned int optlen) in do_raw_setsockopt() argument 799 return raw_seticmpfilter(sk, optval, optlen); in do_raw_setsockopt() [all …]
|
D | udp_impl.h | 14 char __user *optval, unsigned int optlen); 16 char __user *optval, int __user *optlen); 20 char __user *optval, unsigned int optlen); 22 char __user *optval, int __user *optlen);
|
D | cipso_ipv4.c | 1590 int optlen; in cipso_v4_optptr() local 1593 for (optlen = iph->ihl*4 - sizeof(struct iphdr); optlen > 0; ) { in cipso_v4_optptr() 1597 optlen -= taglen; in cipso_v4_optptr() 1931 opt->opt.optlen = opt_len; in cipso_v4_sock_setattr() 1942 sk_conn->icsk_ext_hdr_len -= old->opt.optlen; in cipso_v4_sock_setattr() 1943 sk_conn->icsk_ext_hdr_len += opt->opt.optlen; in cipso_v4_sock_setattr() 2007 opt->opt.optlen = opt_len; in cipso_v4_req_setattr() 2062 opt->opt.optlen - cipso_off - cipso_len); in cipso_v4_delopt() 2071 while (iter < opt->opt.optlen) in cipso_v4_delopt() 2077 hdr_delta = opt->opt.optlen; in cipso_v4_delopt() [all …]
|
/net/ipv6/ |
D | ipv6_sockglue.c | 127 char __user *optval, unsigned int optlen) in do_ipv6_setsockopt() argument 137 if (optlen >= sizeof(int)) { in do_ipv6_setsockopt() 147 return ip6_mroute_setsockopt(sk, optname, optval, optlen); in do_ipv6_setsockopt() 154 if (optlen < sizeof(int)) in do_ipv6_setsockopt() 240 if (optlen < sizeof(int) || in do_ipv6_setsockopt() 248 if (optlen < sizeof(int)) in do_ipv6_setsockopt() 255 if (optlen < sizeof(int)) in do_ipv6_setsockopt() 262 if (optlen < sizeof(int)) in do_ipv6_setsockopt() 269 if (optlen < sizeof(int)) in do_ipv6_setsockopt() 276 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 | 922 char __user *optval, int optlen) in rawv6_seticmpfilter() argument 926 if (optlen > sizeof(struct icmp6_filter)) in rawv6_seticmpfilter() 927 optlen = sizeof(struct icmp6_filter); in rawv6_seticmpfilter() 928 if (copy_from_user(&raw6_sk(sk)->filter, optval, optlen)) in rawv6_seticmpfilter() 939 char __user *optval, int __user *optlen) in rawv6_geticmpfilter() argument 945 if (get_user(len, optlen)) in rawv6_geticmpfilter() 951 if (put_user(len, optlen)) in rawv6_geticmpfilter() 965 char __user *optval, unsigned int optlen) in do_rawv6_setsockopt() argument 1007 char __user *optval, unsigned int optlen) in rawv6_setsockopt() argument 1016 return rawv6_seticmpfilter(sk, level, optname, optval, optlen); in rawv6_setsockopt() [all …]
|
D | udp_impl.h | 17 char __user *optval, int __user *optlen); 19 char __user *optval, unsigned int optlen); 22 char __user *optval, unsigned int optlen); 24 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 | 121 int optlen = 0; in zero_out_mutable_opts() local 131 optlen = 1; in zero_out_mutable_opts() 136 optlen = opt[off+1]+2; in zero_out_mutable_opts() 137 if (len < optlen) in zero_out_mutable_opts() 144 off += optlen; in zero_out_mutable_opts() 145 len -= optlen; in zero_out_mutable_opts() 165 int optlen = 0; in ipv6_rearrange_destopt() local 175 optlen = 1; in ipv6_rearrange_destopt() 180 optlen = opt[off+1]+2; in ipv6_rearrange_destopt() 181 if (len < optlen) in ipv6_rearrange_destopt() [all …]
|
/net/sctp/ |
D | socket.c | 1416 int __user *optlen) in sctp_getsockopt_connectx3() argument 1449 if (put_user(sizeof(assoc_id), optlen)) in sctp_getsockopt_connectx3() 2224 unsigned int optlen) in sctp_setsockopt_disable_fragments() argument 2228 if (optlen < sizeof(int)) in sctp_setsockopt_disable_fragments() 2240 unsigned int optlen) in sctp_setsockopt_events() argument 2245 if (optlen > sizeof(struct sctp_event_subscribe)) in sctp_setsockopt_events() 2247 if (copy_from_user(&sctp_sk(sk)->subscribe, optval, optlen)) in sctp_setsockopt_events() 2289 unsigned int optlen) in sctp_setsockopt_autoclose() argument 2297 if (optlen != sizeof(int)) in sctp_setsockopt_autoclose() 2299 if (copy_from_user(&sp->autoclose, optval, optlen)) in sctp_setsockopt_autoclose() [all …]
|
/net/dccp/ |
D | proto.c | 404 char __user *optval, unsigned int optlen) in dccp_setsockopt_service() argument 410 optlen > DCCP_SERVICE_LIST_MAX_LEN * sizeof(u32)) in dccp_setsockopt_service() 413 if (optlen > sizeof(service)) { in dccp_setsockopt_service() 414 sl = kmalloc(optlen, GFP_KERNEL); in dccp_setsockopt_service() 418 sl->dccpsl_nr = optlen / sizeof(u32) - 1; in dccp_setsockopt_service() 421 optlen - sizeof(service)) || in dccp_setsockopt_service() 475 char __user *optval, unsigned int optlen) in dccp_setsockopt_ccid() argument 480 if (optlen < 1 || optlen > DCCP_FEAT_MAX_SP_VALS) in dccp_setsockopt_ccid() 483 val = memdup_user(optval, optlen); in dccp_setsockopt_ccid() 489 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 | 343 char __user *optval, unsigned int optlen) in do_set_attach_filter() argument 363 int optname, char __user *optval, unsigned int optlen) in do_set_sock_timeout() argument 370 if (optlen < sizeof(*up)) in do_set_sock_timeout() 385 char __user *optval, unsigned int optlen) in compat_sock_setsockopt() argument 389 optval, optlen); in compat_sock_setsockopt() 391 return do_set_sock_timeout(sock, level, optname, optval, optlen); in compat_sock_setsockopt() 393 return sock_setsockopt(sock, level, optname, optval, optlen); in compat_sock_setsockopt() 397 char __user *, optval, unsigned int, optlen) in COMPAT_SYSCALL_DEFINE5() argument 411 optname, optval, optlen); in COMPAT_SYSCALL_DEFINE5() 414 optname, optval, optlen); in COMPAT_SYSCALL_DEFINE5() [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()
|
D | xt_dccp.c | 46 unsigned int optlen = dh->dccph_doff*4 - __dccp_hdr_len(dh); in dccp_find_option() local 52 if (!optlen) in dccp_find_option() 56 op = skb_header_pointer(skb, protoff + optoff, optlen, dccp_optbuf); in dccp_find_option() 62 for (i = 0; i < optlen; ) { in dccp_find_option()
|
/net/rds/ |
D | af_rds.c | 243 int optlen) in rds_set_bool_option() argument 247 if (optlen < sizeof(int)) in rds_set_bool_option() 256 int optlen) in rds_cong_monitor() argument 260 ret = rds_set_bool_option(&rs->rs_cong_monitor, optval, optlen); in rds_cong_monitor() 274 char __user *optval, unsigned int optlen) in rds_setsockopt() argument 286 ret = rds_cancel_sent_to(rs, optval, optlen); in rds_setsockopt() 289 ret = rds_get_mr(rs, optval, optlen); in rds_setsockopt() 292 ret = rds_get_mr_for_dest(rs, optval, optlen); in rds_setsockopt() 295 ret = rds_free_mr(rs, optval, optlen); in rds_setsockopt() 298 ret = rds_set_bool_option(&rs->rs_recverr, optval, optlen); in rds_setsockopt() [all …]
|
/net/can/ |
D | raw.c | 449 char __user *optval, unsigned int optlen) in raw_setsockopt() argument 466 if (optlen % sizeof(struct can_filter) != 0) in raw_setsockopt() 469 count = optlen / sizeof(struct can_filter); in raw_setsockopt() 473 filter = memdup_user(optval, optlen); in raw_setsockopt() 525 if (optlen != sizeof(err_mask)) in raw_setsockopt() 528 if (copy_from_user(&err_mask, optval, optlen)) in raw_setsockopt() 562 if (optlen != sizeof(ro->loopback)) in raw_setsockopt() 565 if (copy_from_user(&ro->loopback, optval, optlen)) in raw_setsockopt() 571 if (optlen != sizeof(ro->recv_own_msgs)) in raw_setsockopt() 574 if (copy_from_user(&ro->recv_own_msgs, optval, optlen)) in raw_setsockopt() [all …]
|
/net/decnet/ |
D | af_decnet.c | 160 …(struct socket *sock, int level, int optname, char __user *optval, unsigned int optlen, int flags); 161 …t(struct socket *sock, int level, int optname, char __user *optval, int __user *optlen, int flags); 1332 …n_setsockopt(struct socket *sock, int level, int optname, char __user *optval, unsigned int optlen) in dn_setsockopt() argument 1338 err = __dn_setsockopt(sock, level, optname, optval, optlen, 0); in dn_setsockopt() 1344 …pt(struct socket *sock, int level,int optname, char __user *optval, unsigned int optlen, int flags) in __dn_setsockopt() argument 1360 if (optlen && !optval) in __dn_setsockopt() 1363 if (optlen > sizeof(u)) in __dn_setsockopt() 1366 if (copy_from_user(&u, optval, optlen)) in __dn_setsockopt() 1376 if (optlen != sizeof(struct optdata_dn)) in __dn_setsockopt() 1382 memcpy(&scp->conndata_out, &u.opt, optlen); in __dn_setsockopt() [all …]
|
/net/core/ |
D | sock.c | 383 static int sock_set_timeout(long *timeo_p, char __user *optval, int optlen) in sock_set_timeout() argument 387 if (optlen < sizeof(tv)) in sock_set_timeout() 547 int optlen) in sock_setbindtodevice() argument 561 if (optlen < 0) in sock_setbindtodevice() 569 if (optlen > IFNAMSIZ - 1) in sock_setbindtodevice() 570 optlen = IFNAMSIZ - 1; in sock_setbindtodevice() 574 if (copy_from_user(devname, optval, optlen)) in sock_setbindtodevice() 605 int __user *optlen, int len) in sock_getbindtodevice() argument 633 if (put_user(len, optlen)) in sock_getbindtodevice() 677 char __user *optval, unsigned int optlen) in sock_setsockopt() argument [all …]
|
/net/atm/ |
D | pvc.c | 65 char __user *optval, unsigned int optlen) in pvc_setsockopt() argument 71 error = vcc_setsockopt(sock, level, optname, optval, optlen); in pvc_setsockopt() 77 char __user *optval, int __user *optlen) in pvc_getsockopt() argument 83 error = vcc_getsockopt(sock, level, optname, optval, optlen); in pvc_getsockopt()
|
/net/sched/ |
D | act_csum.c | 384 int off, len, optlen; in tcf_csum_ipv6_hopopts() local 393 optlen = 1; in tcf_csum_ipv6_hopopts() 396 optlen = xh[off + 1] + 2; in tcf_csum_ipv6_hopopts() 397 if (optlen != 6 || len < 6 || (off & 3) != 2) in tcf_csum_ipv6_hopopts() 403 optlen = xh[off + 1] + 2; in tcf_csum_ipv6_hopopts() 404 if (optlen > len) in tcf_csum_ipv6_hopopts() 409 off += optlen; in tcf_csum_ipv6_hopopts() 410 len -= optlen; in tcf_csum_ipv6_hopopts()
|