/net/netfilter/ |
D | nf_flow_table_ip.c | 20 struct sk_buff *skb, unsigned int thoff) in nf_flow_state_check() argument 27 if (!pskb_may_pull(skb, thoff + sizeof(*tcph))) in nf_flow_state_check() 30 tcph = (void *)(skb_network_header(skb) + thoff); in nf_flow_state_check() 39 static int nf_flow_nat_ip_tcp(struct sk_buff *skb, unsigned int thoff, in nf_flow_nat_ip_tcp() argument 44 if (!pskb_may_pull(skb, thoff + sizeof(*tcph)) || in nf_flow_nat_ip_tcp() 45 skb_try_make_writable(skb, thoff + sizeof(*tcph))) in nf_flow_nat_ip_tcp() 48 tcph = (void *)(skb_network_header(skb) + thoff); in nf_flow_nat_ip_tcp() 54 static int nf_flow_nat_ip_udp(struct sk_buff *skb, unsigned int thoff, in nf_flow_nat_ip_udp() argument 59 if (!pskb_may_pull(skb, thoff + sizeof(*udph)) || in nf_flow_nat_ip_udp() 60 skb_try_make_writable(skb, thoff + sizeof(*udph))) in nf_flow_nat_ip_udp() [all …]
|
D | nf_flow_table_core.c | 347 static int nf_flow_nat_port_tcp(struct sk_buff *skb, unsigned int thoff, in nf_flow_nat_port_tcp() argument 352 if (!pskb_may_pull(skb, thoff + sizeof(*tcph)) || in nf_flow_nat_port_tcp() 353 skb_try_make_writable(skb, thoff + sizeof(*tcph))) in nf_flow_nat_port_tcp() 356 tcph = (void *)(skb_network_header(skb) + thoff); in nf_flow_nat_port_tcp() 362 static int nf_flow_nat_port_udp(struct sk_buff *skb, unsigned int thoff, in nf_flow_nat_port_udp() argument 367 if (!pskb_may_pull(skb, thoff + sizeof(*udph)) || in nf_flow_nat_port_udp() 368 skb_try_make_writable(skb, thoff + sizeof(*udph))) in nf_flow_nat_port_udp() 371 udph = (void *)(skb_network_header(skb) + thoff); in nf_flow_nat_port_udp() 382 static int nf_flow_nat_port(struct sk_buff *skb, unsigned int thoff, in nf_flow_nat_port() argument 387 if (nf_flow_nat_port_tcp(skb, thoff, port, new_port) < 0) in nf_flow_nat_port() [all …]
|
D | xt_l2tp.c | 79 static bool l2tp_udp_mt(const struct sk_buff *skb, struct xt_action_param *par, u16 thoff) in l2tp_udp_mt() argument 83 int offs = thoff + uhlen; in l2tp_udp_mt() 139 static bool l2tp_ip_mt(const struct sk_buff *skb, struct xt_action_param *par, u16 thoff) in l2tp_ip_mt() argument 147 lh = skb_header_pointer(skb, thoff, sizeof(lhbuf), &lhbuf); in l2tp_ip_mt() 155 lh = skb_header_pointer(skb, thoff + 8, sizeof(lhbuf), in l2tp_ip_mt() 178 return l2tp_udp_mt(skb, par, par->thoff); in l2tp_mt4() 180 return l2tp_ip_mt(skb, par, par->thoff); in l2tp_mt4() 189 unsigned int thoff = 0; in l2tp_mt6() local 193 ipproto = ipv6_find_hdr(skb, &thoff, -1, &fragoff, NULL); in l2tp_mt6() 200 return l2tp_udp_mt(skb, par, thoff); in l2tp_mt6() [all …]
|
D | xt_TPROXY.c | 121 int thoff = 0; in tproxy_tg6_v1() local 124 tproto = ipv6_find_hdr(skb, &thoff, -1, NULL, NULL); in tproxy_tg6_v1() 130 hp = skb_header_pointer(skb, thoff, sizeof(_hdr), &_hdr); in tproxy_tg6_v1() 140 sk = nf_tproxy_get_sock_v6(xt_net(par), skb, thoff, tproto, in tproxy_tg6_v1() 152 sk = nf_tproxy_handle_time_wait6(skb, tproto, thoff, in tproxy_tg6_v1() 161 sk = nf_tproxy_get_sock_v6(xt_net(par), skb, thoff, in tproxy_tg6_v1()
|
D | nft_tproxy.c | 92 int thoff = pkt->xt.thoff; in nft_tproxy_eval_v6() local 107 hp = skb_header_pointer(skb, thoff, sizeof(_hdr), &_hdr); in nft_tproxy_eval_v6() 117 sk = nf_tproxy_get_sock_v6(nft_net(pkt), skb, thoff, l4proto, in nft_tproxy_eval_v6() 134 sk = nf_tproxy_handle_time_wait6(skb, l4proto, thoff, in nft_tproxy_eval_v6() 143 sk = nf_tproxy_get_sock_v6(nft_net(pkt), skb, thoff, in nft_tproxy_eval_v6()
|
D | nf_synproxy_core.c | 673 unsigned int thoff; in ipv4_synproxy_hook() local 687 thoff = ip_hdrlen(skb); in ipv4_synproxy_hook() 688 th = skb_header_pointer(skb, thoff, sizeof(_th), &_th); in ipv4_synproxy_hook() 715 if (!synproxy_parse_options(skb, thoff, th, &opts)) in ipv4_synproxy_hook() 744 if (!synproxy_parse_options(skb, thoff, th, &opts)) in ipv4_synproxy_hook() 771 synproxy_tstamp_adjust(skb, thoff, th, ct, ctinfo, synproxy); in ipv4_synproxy_hook() 1093 int thoff; in ipv6_synproxy_hook() local 1107 thoff = ipv6_skip_exthdr(skb, sizeof(struct ipv6hdr), &nexthdr, in ipv6_synproxy_hook() 1109 if (thoff < 0 || nexthdr != IPPROTO_TCP) in ipv6_synproxy_hook() 1112 th = skb_header_pointer(skb, thoff, sizeof(_th), &_th); in ipv6_synproxy_hook() [all …]
|
D | nft_synproxy.c | 112 int thoff = pkt->xt.thoff; in nft_synproxy_do_eval() local 121 if (nf_ip_checksum(skb, nft_hook(pkt), thoff, IPPROTO_TCP)) { in nft_synproxy_do_eval() 126 tcp = skb_header_pointer(skb, pkt->xt.thoff, in nft_synproxy_do_eval() 134 if (!synproxy_parse_options(skb, thoff, tcp, &opts)) { in nft_synproxy_do_eval()
|
D | xt_tcpudp.c | 87 th = skb_header_pointer(skb, par->thoff, sizeof(_tcph), &_tcph); in tcp_mt() 112 if (!tcp_find_option(tcpinfo->option, skb, par->thoff, in tcp_mt() 139 uh = skb_header_pointer(skb, par->thoff, sizeof(_udph), &_udph); in udp_mt()
|
D | nft_payload.c | 104 offset = pkt->xt.thoff; in nft_payload_eval() 408 static bool nft_payload_udp_checksum(struct sk_buff *skb, unsigned int thoff) in nft_payload_udp_checksum() argument 412 uh = skb_header_pointer(skb, thoff, sizeof(_uh), &_uh); in nft_payload_udp_checksum() 431 if (!nft_payload_udp_checksum(skb, pkt->xt.thoff)) in nft_payload_l4csum_offset() 444 *l4csum_offset += pkt->xt.thoff; in nft_payload_l4csum_offset() 523 offset = pkt->xt.thoff; in nft_payload_set_eval()
|
D | xt_tcpmss.c | 36 th = skb_header_pointer(skb, par->thoff, sizeof(_tcph), &_tcph); in tcpmss_mt() 49 op = skb_header_pointer(skb, par->thoff + sizeof(*th), optlen, _opt); in tcpmss_mt()
|
D | nf_tables_trace.c | 116 nh_end = pkt->tprot_set ? pkt->xt.thoff : skb->len; in nf_trace_fill_pkt_info() 123 len = min_t(unsigned int, skb->len - pkt->xt.thoff, in nf_trace_fill_pkt_info() 126 pkt->xt.thoff, len)) in nf_trace_fill_pkt_info()
|
D | xt_dccp.c | 105 dh = skb_header_pointer(skb, par->thoff, sizeof(_dh), &_dh); in dccp_mt() 119 && DCCHECK(match_option(info->option, skb, par->thoff, dh, in dccp_mt()
|
D | xt_sctp.c | 130 sh = skb_header_pointer(skb, par->thoff, sizeof(_sh), &_sh); in sctp_mt() 144 SCCHECK(match_packet(skb, par->thoff + sizeof(_sh), in sctp_mt()
|
D | nft_exthdr.c | 171 tcph = skb_header_pointer(pkt->skb, pkt->xt.thoff, sizeof(*tcph), buffer); in nft_tcp_header_pointer() 179 return skb_header_pointer(pkt->skb, pkt->xt.thoff, *tcphdr_len, buffer); in nft_tcp_header_pointer() 255 pkt->xt.thoff + i + priv->len)) in nft_exthdr_tcp_set_eval()
|
/net/ipv6/netfilter/ |
D | nf_socket_ipv6.c | 105 int thoff = 0, tproto; in nf_sk_lookup_slow_v6() local 107 tproto = ipv6_find_hdr(skb, &thoff, -1, NULL, NULL); in nf_sk_lookup_slow_v6() 117 hp = skb_header_pointer(skb, thoff, tproto == IPPROTO_UDP ? in nf_sk_lookup_slow_v6() 128 thoff + __tcp_hdrlen((struct tcphdr *)hp) : in nf_sk_lookup_slow_v6() 129 thoff + sizeof(*hp); in nf_sk_lookup_slow_v6() 132 if (extract_icmp6_fields(skb, thoff, &tproto, &saddr, &daddr, in nf_sk_lookup_slow_v6()
|
D | nf_tproxy_ipv6.c | 39 nf_tproxy_handle_time_wait6(struct sk_buff *skb, int tproto, int thoff, in nf_tproxy_handle_time_wait6() argument 48 hp = skb_header_pointer(skb, thoff, sizeof(_hdr), &_hdr); in nf_tproxy_handle_time_wait6() 59 sk2 = nf_tproxy_get_sock_v6(net, skb, thoff, tproto, in nf_tproxy_handle_time_wait6() 76 nf_tproxy_get_sock_v6(struct net *net, struct sk_buff *skb, int thoff, in nf_tproxy_get_sock_v6() argument 89 hp = skb_header_pointer(skb, thoff, in nf_tproxy_get_sock_v6() 97 thoff + __tcp_hdrlen(hp), in nf_tproxy_get_sock_v6()
|
D | nf_reject_ipv6.c | 220 int thoff; in reject6_csum_ok() local 228 thoff = ipv6_skip_exthdr(skb, ((u8 *)(ip6h + 1) - skb->data), &proto, &fo); in reject6_csum_ok() 230 if (thoff < 0 || thoff >= skb->len || (fo & htons(~0x7)) != 0) in reject6_csum_ok() 236 return nf_ip6_checksum(skb, hook, thoff, proto) == 0; in reject6_csum_ok()
|
D | ip6t_SYNPROXY.c | 21 if (nf_ip6_checksum(skb, xt_hooknum(par), par->thoff, IPPROTO_TCP)) in synproxy_tg6() 24 th = skb_header_pointer(skb, par->thoff, sizeof(_th), &_th); in synproxy_tg6() 28 if (!synproxy_parse_options(skb, par->thoff, th, &opts)) in synproxy_tg6()
|
D | ip6t_mh.c | 41 mh = skb_header_pointer(skb, par->thoff, sizeof(_mh), &_mh); in mh_mt6()
|
/net/ipv4/netfilter/ |
D | ipt_SYNPROXY.c | 21 if (nf_ip_checksum(skb, xt_hooknum(par), par->thoff, IPPROTO_TCP)) in synproxy_tg4() 24 th = skb_header_pointer(skb, par->thoff, sizeof(_th), &_th); in synproxy_tg4() 28 if (!synproxy_parse_options(skb, par->thoff, th, &opts)) in synproxy_tg4()
|
D | ipt_ah.c | 40 ah = skb_header_pointer(skb, par->thoff, sizeof(_ahdr), &_ahdr); in ah_mt()
|
/net/bridge/netfilter/ |
D | nft_reject_bridge.c | 221 int thoff; in reject6_br_csum_ok() local 233 thoff = ipv6_skip_exthdr(skb, ((u8*)(ip6h+1) - skb->data), &proto, &fo); in reject6_br_csum_ok() 234 if (thoff < 0 || thoff >= skb->len || (fo & htons(~0x7)) != 0) in reject6_br_csum_ok() 240 return nf_ip6_checksum(skb, hook, thoff, proto) == 0; in reject6_br_csum_ok()
|
/net/ipv6/ |
D | tcpv6_offload.c | 29 INDIRECT_CALLABLE_SCOPE int tcp6_gro_complete(struct sk_buff *skb, int thoff) in tcp6_gro_complete() argument 34 th->check = ~tcp_v6_check(skb->len - thoff, &iph->saddr, in tcp6_gro_complete()
|
/net/sched/ |
D | em_ipset.c | 67 acpar.thoff = ip_hdrlen(skb); in em_ipset_match() 74 acpar.thoff = sizeof(struct ipv6hdr); in em_ipset_match()
|
/net/core/ |
D | flow_dissector.c | 199 __be32 __skb_flow_get_ports(const struct sk_buff *skb, int thoff, u8 ip_proto, in __skb_flow_get_ports() argument 212 ports = __skb_header_pointer(skb, thoff + poff, in __skb_flow_get_ports() 681 void *target_container, void *data, int thoff, int hlen) in __skb_flow_dissect_tcp() argument 689 th = __skb_header_pointer(skb, thoff, sizeof(_th), data, hlen, &_th); in __skb_flow_dissect_tcp() 786 key_control->thoff = flow_keys->thoff; in __skb_flow_bpf_to_target() 855 flow_keys->thoff = flow_keys->nhoff; in bpf_flow_dissect() 870 flow_keys->thoff = clamp_t(u16, flow_keys->thoff, in bpf_flow_dissect() 1391 key_control->thoff = min_t(u16, nhoff, skb ? skb->len : hlen); in __skb_flow_dissect() 1607 u32 poff = keys->control.thoff; in __skb_get_poff()
|