/kernel/linux/common_modules/newip/src/common/ |
D | nip_hdr_decap.c | 44 struct nip_hdr_decap *niph) in _get_nip_hdr_ttl() argument 49 if (nbuf->remaining_len < sizeof(niph->ttl)) in _get_nip_hdr_ttl() 52 niph->ttl = *nbuf->data; in _get_nip_hdr_ttl() 53 niph->include_ttl = 1; in _get_nip_hdr_ttl() 54 nip_buff_pull(nbuf, sizeof(niph->ttl)); in _get_nip_hdr_ttl() 65 struct nip_hdr_decap *niph) in _get_nip_hdr_len() argument 70 if (nbuf->remaining_len < sizeof(niph->hdr_len)) in _get_nip_hdr_len() 76 niph->hdr_len = *nbuf->data; in _get_nip_hdr_len() 77 niph->include_hdr_len = 1; in _get_nip_hdr_len() 78 nip_buff_pull(nbuf, sizeof(niph->hdr_len)); in _get_nip_hdr_len() [all …]
|
D | nip_hdr.h | 211 int nip_hdr_parse(unsigned char *rcv_buf, unsigned int buf_len, struct nip_hdr_decap *niph);
|
/kernel/linux/common_modules/newip/third_party/linux-5.10/net/newip/ |
D | nip_input.c | 36 struct nip_hdr_decap *niph) in _nip_update_recv_skb_len() argument 38 if (!niph->include_total_len) in _nip_update_recv_skb_len() 41 if (niph->total_len > skb->len) { in _nip_update_recv_skb_len() 43 niph->total_len, skb->len); in _nip_update_recv_skb_len() 50 skb_trim(skb, niph->total_len); in _nip_update_recv_skb_len() 91 struct nip_hdr_decap niph = {0}; in nip_rcv() local 103 offset = nip_hdr_parse(skb->data, skb->len, &niph); in nip_rcv() 106 offset, niph.nexthdr, niph.hdr_len); in nip_rcv() 110 if (niph.nexthdr != IPPROTO_UDP && niph.nexthdr != IPPROTO_TCP && in nip_rcv() 111 niph.nexthdr != IPPROTO_NIP_ICMP) { in nip_rcv() [all …]
|
/kernel/linux/linux-5.10/net/ipv4/netfilter/ |
D | nf_reject_ipv4.c | 48 struct iphdr *niph, *oiph = ip_hdr(oldskb); in nf_reject_iphdr_put() local 51 niph = skb_put(nskb, sizeof(struct iphdr)); in nf_reject_iphdr_put() 52 niph->version = 4; in nf_reject_iphdr_put() 53 niph->ihl = sizeof(struct iphdr) / 4; in nf_reject_iphdr_put() 54 niph->tos = 0; in nf_reject_iphdr_put() 55 niph->id = 0; in nf_reject_iphdr_put() 56 niph->frag_off = htons(IP_DF); in nf_reject_iphdr_put() 57 niph->protocol = protocol; in nf_reject_iphdr_put() 58 niph->check = 0; in nf_reject_iphdr_put() 59 niph->saddr = oiph->daddr; in nf_reject_iphdr_put() [all …]
|
/kernel/linux/linux-5.10/net/netfilter/ |
D | nf_synproxy_core.c | 444 struct iphdr *niph, struct tcphdr *nth, in synproxy_send_tcp() argument 447 nth->check = ~tcp_v4_check(tcp_hdr_size, niph->saddr, niph->daddr, 0); in synproxy_send_tcp() 475 struct iphdr *iph, *niph; in synproxy_send_client_synack() local 483 nskb = alloc_skb(sizeof(*niph) + tcp_hdr_size + MAX_TCP_HEADER, in synproxy_send_client_synack() 489 niph = synproxy_build_ip(net, nskb, iph->daddr, iph->saddr); in synproxy_send_client_synack() 508 IP_CT_ESTABLISHED_REPLY, niph, nth, tcp_hdr_size); in synproxy_send_client_synack() 519 struct iphdr *iph, *niph; in synproxy_send_server_syn() local 526 nskb = alloc_skb(sizeof(*niph) + tcp_hdr_size + MAX_TCP_HEADER, in synproxy_send_server_syn() 532 niph = synproxy_build_ip(net, nskb, iph->saddr, iph->daddr); in synproxy_send_server_syn() 554 niph, nth, tcp_hdr_size); in synproxy_send_server_syn() [all …]
|
/kernel/linux/linux-5.10/net/bridge/netfilter/ |
D | nft_reject_bridge.c | 75 struct iphdr *niph; in nft_reject_br_send_v4_tcp_reset() local 92 niph = nf_reject_iphdr_put(nskb, oldskb, IPPROTO_TCP, in nft_reject_br_send_v4_tcp_reset() 95 niph->tot_len = htons(nskb->len); in nft_reject_br_send_v4_tcp_reset() 96 ip_send_check(niph); in nft_reject_br_send_v4_tcp_reset() 109 struct iphdr *niph; in nft_reject_br_send_v4_unreach() local 144 niph = nf_reject_iphdr_put(nskb, oldskb, IPPROTO_ICMP, in nft_reject_br_send_v4_unreach() 157 niph->tot_len = htons(nskb->len); in nft_reject_br_send_v4_unreach() 158 ip_send_check(niph); in nft_reject_br_send_v4_unreach()
|
/kernel/linux/linux-5.10/net/ipv4/ |
D | ip_tunnel_core.c | 199 struct iphdr *niph; in iptunnel_pmtud_build_icmp() local 210 err = pskb_trim(skb, 576 - sizeof(*niph) - sizeof(*icmph)); in iptunnel_pmtud_build_icmp() 215 err = skb_cow(skb, sizeof(*niph) + sizeof(*icmph) + ETH_HLEN); in iptunnel_pmtud_build_icmp() 230 niph = skb_push(skb, sizeof(*niph)); in iptunnel_pmtud_build_icmp() 231 *niph = (struct iphdr) { in iptunnel_pmtud_build_icmp() 232 .ihl = sizeof(*niph) / 4u, in iptunnel_pmtud_build_icmp() 235 .tot_len = htons(len + sizeof(*niph)), in iptunnel_pmtud_build_icmp() 243 ip_send_check(niph); in iptunnel_pmtud_build_icmp()
|