/net/sched/ |
D | act_csum.c | 134 unsigned int ihl, unsigned int ipl, in tcf_csum_skb_nextlayer() argument 138 int hl = ihl + jhl; in tcf_csum_skb_nextlayer() 144 return (void *)(skb_network_header(skb) + ihl); in tcf_csum_skb_nextlayer() 147 static int tcf_csum_ipv4_icmp(struct sk_buff *skb, unsigned int ihl, in tcf_csum_ipv4_icmp() argument 152 icmph = tcf_csum_skb_nextlayer(skb, ihl, ipl, sizeof(*icmph)); in tcf_csum_ipv4_icmp() 157 skb->csum = csum_partial(icmph, ipl - ihl, 0); in tcf_csum_ipv4_icmp() 166 unsigned int ihl, unsigned int ipl) in tcf_csum_ipv4_igmp() argument 170 igmph = tcf_csum_skb_nextlayer(skb, ihl, ipl, sizeof(*igmph)); in tcf_csum_ipv4_igmp() 175 skb->csum = csum_partial(igmph, ipl - ihl, 0); in tcf_csum_ipv4_igmp() 183 static int tcf_csum_ipv6_icmp(struct sk_buff *skb, unsigned int ihl, in tcf_csum_ipv6_icmp() argument [all …]
|
D | act_nat.c | 113 int ihl; in tcf_nat_act() local 163 ihl = iph->ihl * 4; in tcf_nat_act() 171 if (!pskb_may_pull(skb, ihl + sizeof(*tcph) + noff) || in tcf_nat_act() 172 skb_try_make_writable(skb, ihl + sizeof(*tcph) + noff)) in tcf_nat_act() 175 tcph = (void *)(skb_network_header(skb) + ihl); in tcf_nat_act() 184 if (!pskb_may_pull(skb, ihl + sizeof(*udph) + noff) || in tcf_nat_act() 185 skb_try_make_writable(skb, ihl + sizeof(*udph) + noff)) in tcf_nat_act() 188 udph = (void *)(skb_network_header(skb) + ihl); in tcf_nat_act() 201 if (!pskb_may_pull(skb, ihl + sizeof(*icmph) + noff)) in tcf_nat_act() 204 icmph = (void *)(skb_network_header(skb) + ihl); in tcf_nat_act() [all …]
|
/net/ipv4/ |
D | ah4.c | 83 int l = iph->ihl*4 - sizeof(struct iphdr); in ip_clear_mutable_options() 129 int ihl = ip_hdrlen(skb); in ah_output_done() local 132 icv = ah_tmp_icv(ahp->ahash, iph, ihl); in ah_output_done() 138 if (top_iph->ihl != 5) { in ah_output_done() 140 memcpy(top_iph+1, iph+1, top_iph->ihl*4 - sizeof(struct iphdr)); in ah_output_done() 151 int ihl; in ah_output() local 174 ihl = ip_hdrlen(skb); in ah_output() 181 iph = ah_alloc_tmp(ahash, nfrags + sglists, ihl + seqhi_len); in ah_output() 184 seqhi = (__be32 *)((char *)iph + ihl); in ah_output() 198 if (top_iph->ihl != 5) { in ah_output() [all …]
|
D | ip_input.c | 277 opt->optlen = iph->ihl*4 - sizeof(struct iphdr); in ip_rcv_options() 385 if (iph->ihl > 5 && ip_rcv_options(skb, dev)) in ip_rcv_finish_core() 493 if (iph->ihl < 5 || iph->version != 4) in ip_rcv_core() 503 if (!pskb_may_pull(skb, iph->ihl*4)) in ip_rcv_core() 508 if (unlikely(ip_fast_csum((u8 *)iph, iph->ihl))) in ip_rcv_core() 516 } else if (len < (iph->ihl*4)) in ip_rcv_core() 529 skb->transport_header = skb->network_header + iph->ihl*4; in ip_rcv_core()
|
D | ip_fragment.c | 276 int ihl, end, flags, offset; in ip_frag_queue() local 298 ihl = ip_hdrlen(skb); in ip_frag_queue() 301 end = offset + skb->len - skb_network_offset(skb) - ihl; in ip_frag_queue() 331 if (!pskb_pull(skb, skb_network_offset(skb) + ihl)) in ip_frag_queue() 358 fragsize = skb->len + ihl; in ip_frag_queue() 518 if (iph.ihl < 5 || iph.version != 4) in ip_check_defrag() 522 if (skb->len < netoff + len || len < (iph.ihl * 4)) in ip_check_defrag() 528 if (!pskb_may_pull(skb, netoff + iph.ihl * 4)) { in ip_check_defrag()
|
D | ip_vti.c | 335 esph = (struct ip_esp_hdr *)(skb->data+(iph->ihl<<2)); in vti4_err() 339 ah = (struct ip_auth_hdr *)(skb->data+(iph->ihl<<2)); in vti4_err() 343 ipch = (struct ip_comp_hdr *)(skb->data+(iph->ihl<<2)); in vti4_err() 382 p->iph.ihl != 5) in vti_tunnel_ctl() 446 iph->ihl = 5; in vti_fb_tunnel_init()
|
D | esp4.c | 759 int ihl; in esp_input_done2() local 772 ihl = iph->ihl * 4; in esp_input_done2() 776 struct tcphdr *th = (void *)(skb_network_header(skb) + ihl); in esp_input_done2() 777 struct udphdr *uh = (void *)(skb_network_header(skb) + ihl); in esp_input_done2() 831 skb_set_transport_header(skb, -ihl); in esp_input_done2() 982 struct ip_esp_hdr *esph = (struct ip_esp_hdr *)(skb->data+(iph->ihl<<2)); in esp4_err()
|
D | af_inet.c | 1352 int ihl; in inet_gso_segment() local 1361 ihl = iph->ihl * 4; in inet_gso_segment() 1362 if (ihl < sizeof(*iph)) in inet_gso_segment() 1369 if (unlikely(!pskb_may_pull(skb, ihl))) in inet_gso_segment() 1371 __skb_pull(skb, ihl); in inet_gso_segment() 1376 SKB_GSO_CB(skb)->encap_level += ihl; in inet_gso_segment() 1410 offset += skb->len - nhoff - ihl; in inet_gso_segment()
|
D | ip_output.c | 95 iph->check = ip_fast_csum((unsigned char *)iph, iph->ihl); in ip_send_check() 159 iph->ihl = 5; in ip_build_and_send_pkt() 181 iph->ihl += opt->opt.optlen>>2; in ip_build_and_send_pkt() 521 iph->ihl += inet_opt->opt.optlen >> 2; in __ip_queue_xmit() 791 hlen = iph->ihl * 4; in ip_do_fragment() 1535 iph->ihl = 5; in __ip_make_skb() 1544 iph->ihl += opt->optlen >> 2; in __ip_make_skb()
|
D | xfrm4_input.c | 146 iphlen = iph->ihl << 2; in xfrm4_udp_encap_rcv()
|
D | ipconfig.c | 833 h->ihl = 5; in ic_bootp_send_if() 839 h->check = ip_fast_csum((unsigned char *) h, h->ihl); in ic_bootp_send_if() 1003 if (h->ihl != 5 || h->version != 4 || h->protocol != IPPROTO_UDP) in ic_bootp_recv() 1015 if (ip_fast_csum((char *) h, h->ihl)) in ic_bootp_recv()
|
D | icmp.c | 662 (iph->ihl << 2) + in __icmp_send() 831 if (!pskb_may_pull(skb, iph->ihl * 4 + 8)) { in icmp_socket_deliver() 879 if (iph->ihl < 5) /* Mangled header, drop. */ in icmp_unreach() 1347 int offset = iph->ihl<<2; in icmp_err()
|
/net/xfrm/ |
D | xfrm_inout.h | 13 XFRM_MODE_SKB_CB(skb)->ihl = sizeof(*iph); in xfrm4_extract_header() 18 XFRM_MODE_SKB_CB(skb)->optlen = iph->ihl * 4 - sizeof(*iph); in xfrm4_extract_header() 28 XFRM_MODE_SKB_CB(skb)->ihl = sizeof(*iph); in xfrm6_extract_header() 59 iph->ihl = 5; in xfrm4_beet_make_header()
|
D | xfrm_output.c | 67 int ihl = iph->ihl * 4; in xfrm4_transport_output() local 74 skb->transport_header = skb->network_header + ihl; in xfrm4_transport_output() 75 __skb_pull(skb, ihl); in xfrm4_transport_output() 76 memmove(skb_network_header(skb), iph, ihl); in xfrm4_transport_output() 237 (XFRM_MODE_SKB_CB(skb)->ihl - sizeof(*top_iph))); in xfrm4_beet_encap_add() 246 ph = __skb_pull(skb, XFRM_MODE_SKB_CB(skb)->ihl - hdrlen); in xfrm4_beet_encap_add() 261 top_iph->ihl = sizeof(struct iphdr) / 4; in xfrm4_beet_encap_add() 290 top_iph->ihl = 5; in xfrm4_tunnel_encap_add() 372 ph = __skb_pull(skb, XFRM_MODE_SKB_CB(skb)->ihl - hdr_len); in xfrm6_beet_encap_add()
|
D | xfrm_input.c | 211 iph->ihl += optlen / 4; in xfrm4_remove_beet_encap() 216 iph->check = ip_fast_csum(skb_network_header(skb), iph->ihl); in xfrm4_remove_beet_encap() 403 int ihl = skb->data - skb_transport_header(skb); in xfrm4_transport_input() local 407 skb_network_header(skb), ihl); in xfrm4_transport_input() 410 ip_hdr(skb)->tot_len = htons(skb->len + ihl); in xfrm4_transport_input() 418 int ihl = skb->data - skb_transport_header(skb); in xfrm6_transport_input() local 422 skb_network_header(skb), ihl); in xfrm6_transport_input() 425 ipv6_hdr(skb)->payload_len = htons(skb->len + ihl - in xfrm6_transport_input()
|
/net/netfilter/ |
D | nf_log_syslog.c | 336 ih->ihl * 4 > sizeof(struct iphdr)) { in dump_ipv4_packet() 341 optsize = ih->ihl * 4 - sizeof(struct iphdr); in dump_ipv4_packet() 360 iphoff + ih->ihl * 4, logflags)) in dump_ipv4_packet() 367 iphoff + ih->ihl * 4)) in dump_ipv4_packet() 393 ich = skb_header_pointer(skb, iphoff + ih->ihl * 4, in dump_ipv4_packet() 397 skb->len - iphoff - ih->ihl * 4); in dump_ipv4_packet() 407 skb->len - iphoff - ih->ihl * 4 < required_len[ich->type]) { in dump_ipv4_packet() 409 skb->len - iphoff - ih->ihl * 4); in dump_ipv4_packet() 438 iphoff + ih->ihl * 4 + sizeof(_icmph)); in dump_ipv4_packet() 463 ah = skb_header_pointer(skb, iphoff + ih->ihl * 4, in dump_ipv4_packet() [all …]
|
D | xt_HMARK.c | 259 if (get_inner_hdr(skb, ip->ihl * 4, &nhoff)) { in hmark_pkt_set_htuple_ipv4() 282 hmark_set_tuple_ports(skb, (ip->ihl * 4) + nhoff, t, info); in hmark_pkt_set_htuple_ipv4()
|
/net/ipv4/netfilter/ |
D | nf_nat_snmp_basic_main.c | 129 struct udphdr *udph = (struct udphdr *)((__be32 *)iph + iph->ihl); in snmp_translate() 167 const struct udphdr *udph = (struct udphdr *)((__be32 *)iph + iph->ihl); in help() 184 if (ntohs(udph->len) != skb->len - (iph->ihl << 2)) { in help()
|
D | nf_reject_ipv4.c | 24 if (iph->ihl < 5 || iph->version != 4) in nf_reject_iphdr_validate() 30 else if (len < (iph->ihl*4)) in nf_reject_iphdr_validate() 33 if (!pskb_may_pull(skb, iph->ihl*4)) in nf_reject_iphdr_validate() 175 niph->ihl = sizeof(struct iphdr) / 4; in nf_reject_iphdr_put()
|
/net/netfilter/ipvs/ |
D | ip_vs_core.c | 752 unsigned int icmp_offset = iph->ihl*4; in ip_vs_nat_icmp() 772 __be16 *ports = (void *)ciph + ciph->ihl*4; in ip_vs_nat_icmp() 860 unsigned int offset, unsigned int ihl, in handle_response_icmp() argument 869 if (!skb_csum_unnecessary(skb) && ip_vs_checksum_complete(skb, ihl)) { in handle_response_icmp() 923 unsigned int offset, ihl; in ip_vs_out_icmp() local 935 offset = ihl = iph->ihl * 4; in ip_vs_out_icmp() 986 pp, ciph.len, ihl, hooknum); in ip_vs_out_icmp() 1640 unsigned int offset, offset2, ihl, verdict; in ip_vs_in_icmp() local 1654 offset = ihl = iph->ihl * 4; in ip_vs_in_icmp() 1698 offset += cih->ihl * 4; in ip_vs_in_icmp() [all …]
|
D | ip_vs_proto_sctp.c | 384 int ihl, cofs; in set_sctp_state() local 387 ihl = cp->af == AF_INET ? ip_hdrlen(skb) : sizeof(struct ipv6hdr); in set_sctp_state() 389 ihl = ip_hdrlen(skb); in set_sctp_state() 392 cofs = ihl + sizeof(struct sctphdr); in set_sctp_state()
|
D | ip_vs_proto_tcp.c | 595 int ihl = cp->af == AF_INET ? ip_hdrlen(skb) : sizeof(struct ipv6hdr); in tcp_state_transition() local 597 int ihl = ip_hdrlen(skb); in tcp_state_transition() local 600 th = skb_header_pointer(skb, ihl, sizeof(_tcph), &_tcph); in tcp_state_transition()
|
/net/core/ |
D | selftests.c | 117 ihdr->ihl = 5; in net_test_get_skb() 212 thdr = (struct tcphdr *)((u8 *)ihdr + 4 * ihdr->ihl); in net_test_loopback_validate() 221 uhdr = (struct udphdr *)((u8 *)ihdr + 4 * ihdr->ihl); in net_test_loopback_validate()
|
/net/bridge/netfilter/ |
D | nf_conntrack_bridge.c | 52 hlen = iph->ihl * 4; in nf_br_ip_fragment() 210 if (iph->ihl < 5 || in nf_ct_br_ip_check() 216 len < (iph->ihl * 4)) in nf_ct_br_ip_check()
|
/net/bridge/ |
D | br_netfilter_hooks.c | 211 if (iph->ihl < 5 || iph->version != 4) in br_validate_ipv4() 214 if (!pskb_may_pull(skb, iph->ihl*4)) in br_validate_ipv4() 218 if (unlikely(ip_fast_csum((u8 *)iph, iph->ihl))) in br_validate_ipv4() 225 } else if (len < (iph->ihl*4)) in br_validate_ipv4() 535 skb->transport_header = skb->network_header + ip_hdr(skb)->ihl * 4; in br_nf_pre_routing()
|