Home
last modified time | relevance | path

Searched refs:thoff (Results 1 – 25 of 45) sorted by relevance

12

/Linux-v4.19/net/netfilter/
Dnf_flow_table_ip.c19 struct sk_buff *skb, unsigned int thoff) in nf_flow_state_check() argument
26 if (!pskb_may_pull(skb, thoff + sizeof(*tcph))) in nf_flow_state_check()
29 tcph = (void *)(skb_network_header(skb) + thoff); in nf_flow_state_check()
38 static int nf_flow_nat_ip_tcp(struct sk_buff *skb, unsigned int thoff, in nf_flow_nat_ip_tcp() argument
43 if (!pskb_may_pull(skb, thoff + sizeof(*tcph)) || in nf_flow_nat_ip_tcp()
44 skb_try_make_writable(skb, thoff + sizeof(*tcph))) in nf_flow_nat_ip_tcp()
47 tcph = (void *)(skb_network_header(skb) + thoff); in nf_flow_nat_ip_tcp()
53 static int nf_flow_nat_ip_udp(struct sk_buff *skb, unsigned int thoff, in nf_flow_nat_ip_udp() argument
58 if (!pskb_may_pull(skb, thoff + sizeof(*udph)) || in nf_flow_nat_ip_udp()
59 skb_try_make_writable(skb, thoff + sizeof(*udph))) in nf_flow_nat_ip_udp()
[all …]
Dnf_flow_table_core.c340 static int nf_flow_nat_port_tcp(struct sk_buff *skb, unsigned int thoff, in nf_flow_nat_port_tcp() argument
345 if (!pskb_may_pull(skb, thoff + sizeof(*tcph)) || in nf_flow_nat_port_tcp()
346 skb_try_make_writable(skb, thoff + sizeof(*tcph))) in nf_flow_nat_port_tcp()
349 tcph = (void *)(skb_network_header(skb) + thoff); in nf_flow_nat_port_tcp()
355 static int nf_flow_nat_port_udp(struct sk_buff *skb, unsigned int thoff, in nf_flow_nat_port_udp() argument
360 if (!pskb_may_pull(skb, thoff + sizeof(*udph)) || in nf_flow_nat_port_udp()
361 skb_try_make_writable(skb, thoff + sizeof(*udph))) in nf_flow_nat_port_udp()
364 udph = (void *)(skb_network_header(skb) + thoff); in nf_flow_nat_port_udp()
375 static int nf_flow_nat_port(struct sk_buff *skb, unsigned int thoff, in nf_flow_nat_port() argument
380 if (nf_flow_nat_port_tcp(skb, thoff, port, new_port) < 0) in nf_flow_nat_port()
[all …]
Dxt_l2tp.c82 static bool l2tp_udp_mt(const struct sk_buff *skb, struct xt_action_param *par, u16 thoff) in l2tp_udp_mt() argument
86 int offs = thoff + uhlen; in l2tp_udp_mt()
142 static bool l2tp_ip_mt(const struct sk_buff *skb, struct xt_action_param *par, u16 thoff) in l2tp_ip_mt() argument
150 lh = skb_header_pointer(skb, thoff, sizeof(lhbuf), &lhbuf); in l2tp_ip_mt()
158 lh = skb_header_pointer(skb, thoff + 8, sizeof(lhbuf), in l2tp_ip_mt()
181 return l2tp_udp_mt(skb, par, par->thoff); in l2tp_mt4()
183 return l2tp_ip_mt(skb, par, par->thoff); in l2tp_mt4()
192 unsigned int thoff = 0; in l2tp_mt6() local
196 ipproto = ipv6_find_hdr(skb, &thoff, -1, &fragoff, NULL); in l2tp_mt6()
203 return l2tp_udp_mt(skb, par, thoff); in l2tp_mt6()
[all …]
Dxt_TPROXY.c125 int thoff = 0; in tproxy_tg6_v1() local
128 tproto = ipv6_find_hdr(skb, &thoff, -1, NULL, NULL); in tproxy_tg6_v1()
134 hp = skb_header_pointer(skb, thoff, sizeof(_hdr), &_hdr); in tproxy_tg6_v1()
144 sk = nf_tproxy_get_sock_v6(xt_net(par), skb, thoff, tproto, in tproxy_tg6_v1()
156 sk = nf_tproxy_handle_time_wait6(skb, tproto, thoff, in tproxy_tg6_v1()
165 sk = nf_tproxy_get_sock_v6(xt_net(par), skb, thoff, in tproxy_tg6_v1()
Dnft_tproxy.c86 int thoff = pkt->xt.thoff; in nft_tproxy_eval_v6() local
100 hp = skb_header_pointer(skb, thoff, sizeof(_hdr), &_hdr); in nft_tproxy_eval_v6()
110 sk = nf_tproxy_get_sock_v6(nft_net(pkt), skb, thoff, l4proto, in nft_tproxy_eval_v6()
127 sk = nf_tproxy_handle_time_wait6(skb, l4proto, thoff, in nft_tproxy_eval_v6()
136 sk = nf_tproxy_get_sock_v6(nft_net(pkt), skb, thoff, in nft_tproxy_eval_v6()
Dnft_payload.c102 offset = pkt->xt.thoff; in nft_payload_eval()
179 static bool nft_payload_udp_checksum(struct sk_buff *skb, unsigned int thoff) in nft_payload_udp_checksum() argument
183 uh = skb_header_pointer(skb, thoff, sizeof(_uh), &_uh); in nft_payload_udp_checksum()
199 if (!nft_payload_udp_checksum(skb, pkt->xt.thoff)) in nft_payload_l4csum_offset()
212 *l4csum_offset += pkt->xt.thoff; in nft_payload_l4csum_offset()
291 offset = pkt->xt.thoff; in nft_payload_set_eval()
Dxt_tcpmss.c39 th = skb_header_pointer(skb, par->thoff, sizeof(_tcph), &_tcph); in tcpmss_mt()
52 op = skb_header_pointer(skb, par->thoff + sizeof(*th), optlen, _opt); in tcpmss_mt()
Dxt_tcpudp.c86 th = skb_header_pointer(skb, par->thoff, sizeof(_tcph), &_tcph); in tcp_mt()
111 if (!tcp_find_option(tcpinfo->option, skb, par->thoff, in tcp_mt()
138 uh = skb_header_pointer(skb, par->thoff, sizeof(_udph), &_udph); in udp_mt()
Dnf_tables_trace.c119 nh_end = pkt->tprot_set ? pkt->xt.thoff : skb->len; in nf_trace_fill_pkt_info()
126 len = min_t(unsigned int, skb->len - pkt->xt.thoff, in nf_trace_fill_pkt_info()
129 pkt->xt.thoff, len)) in nf_trace_fill_pkt_info()
Dxt_dccp.c108 dh = skb_header_pointer(skb, par->thoff, sizeof(_dh), &_dh); in dccp_mt()
122 && DCCHECK(match_option(info->option, skb, par->thoff, dh, in dccp_mt()
Dxt_sctp.c129 sh = skb_header_pointer(skb, par->thoff, sizeof(_sh), &_sh); in sctp_mt()
143 SCCHECK(match_packet(skb, par->thoff + sizeof(_sh), in sctp_mt()
/Linux-v4.19/include/net/netfilter/
Dnf_tables_ipv6.h12 int protohdr, thoff = 0; in nft_set_pktinfo_ipv6() local
15 protohdr = ipv6_find_hdr(pkt->skb, &thoff, -1, &frag_off, &flags); in nft_set_pktinfo_ipv6()
23 pkt->xt.thoff = thoff; in nft_set_pktinfo_ipv6()
33 unsigned int thoff = 0; in __nft_set_pktinfo_ipv6_validate() local
50 protohdr = ipv6_find_hdr(pkt->skb, &thoff, -1, &frag_off, &flags); in __nft_set_pktinfo_ipv6_validate()
56 pkt->xt.thoff = thoff; in __nft_set_pktinfo_ipv6_validate()
Dnf_tables_ipv4.h16 pkt->xt.thoff = ip_hdrlen(pkt->skb); in nft_set_pktinfo_ipv4()
24 u32 len, thoff; in __nft_set_pktinfo_ipv4_validate() local
35 thoff = iph->ihl * 4; in __nft_set_pktinfo_ipv4_validate()
38 else if (len < thoff) in __nft_set_pktinfo_ipv4_validate()
43 pkt->xt.thoff = thoff; in __nft_set_pktinfo_ipv4_validate()
Dnf_tproxy.h107 nf_tproxy_handle_time_wait6(struct sk_buff *skb, int tproto, int thoff,
114 nf_tproxy_get_sock_v6(struct net *net, struct sk_buff *skb, int thoff,
Dnf_flow_table.h114 struct sk_buff *skb, unsigned int thoff,
117 struct sk_buff *skb, unsigned int thoff,
/Linux-v4.19/net/ipv6/netfilter/
Dnf_socket_ipv6.c110 int thoff = 0, tproto; in nf_sk_lookup_slow_v6() local
112 tproto = ipv6_find_hdr(skb, &thoff, -1, NULL, NULL); in nf_sk_lookup_slow_v6()
122 hp = skb_header_pointer(skb, thoff, tproto == IPPROTO_UDP ? in nf_sk_lookup_slow_v6()
133 thoff + __tcp_hdrlen((struct tcphdr *)hp) : in nf_sk_lookup_slow_v6()
134 thoff + sizeof(*hp); in nf_sk_lookup_slow_v6()
139 if (extract_icmp6_fields(skb, thoff, &tproto, &saddr, &daddr, in nf_sk_lookup_slow_v6()
Dnf_tproxy_ipv6.c38 nf_tproxy_handle_time_wait6(struct sk_buff *skb, int tproto, int thoff, in nf_tproxy_handle_time_wait6() argument
47 hp = skb_header_pointer(skb, thoff, sizeof(_hdr), &_hdr); in nf_tproxy_handle_time_wait6()
58 sk2 = nf_tproxy_get_sock_v6(net, skb, thoff, tproto, in nf_tproxy_handle_time_wait6()
75 nf_tproxy_get_sock_v6(struct net *net, struct sk_buff *skb, int thoff, in nf_tproxy_get_sock_v6() argument
88 hp = skb_header_pointer(skb, thoff, in nf_tproxy_get_sock_v6()
96 thoff + __tcp_hdrlen(hp), in nf_tproxy_get_sock_v6()
Dip6t_SYNPROXY.c285 if (nf_ip6_checksum(skb, xt_hooknum(par), par->thoff, IPPROTO_TCP)) in synproxy_tg6()
288 th = skb_header_pointer(skb, par->thoff, sizeof(_th), &_th); in synproxy_tg6()
292 if (!synproxy_parse_options(skb, par->thoff, th, &opts)) in synproxy_tg6()
341 int thoff; in ipv6_synproxy_hook() local
355 thoff = ipv6_skip_exthdr(skb, sizeof(struct ipv6hdr), &nexthdr, in ipv6_synproxy_hook()
357 if (thoff < 0 || nexthdr != IPPROTO_TCP) in ipv6_synproxy_hook()
360 th = skb_header_pointer(skb, thoff, sizeof(_th), &_th); in ipv6_synproxy_hook()
387 if (!synproxy_parse_options(skb, thoff, th, &opts)) in ipv6_synproxy_hook()
416 if (!synproxy_parse_options(skb, thoff, th, &opts)) in ipv6_synproxy_hook()
443 synproxy_tstamp_adjust(skb, thoff, th, ct, ctinfo, synproxy); in ipv6_synproxy_hook()
Dnf_reject_ipv6.c219 int thoff; in reject6_csum_ok() local
227 thoff = ipv6_skip_exthdr(skb, ((u8 *)(ip6h + 1) - skb->data), &proto, &fo); in reject6_csum_ok()
229 if (thoff < 0 || thoff >= skb->len || (fo & htons(~0x7)) != 0) in reject6_csum_ok()
232 return nf_ip6_checksum(skb, hook, thoff, proto) == 0; in reject6_csum_ok()
Dip6t_mh.c45 mh = skb_header_pointer(skb, par->thoff, sizeof(_mh), &_mh); in mh_mt6()
/Linux-v4.19/net/ipv4/netfilter/
Dipt_SYNPROXY.c271 if (nf_ip_checksum(skb, xt_hooknum(par), par->thoff, IPPROTO_TCP)) in synproxy_tg4()
274 th = skb_header_pointer(skb, par->thoff, sizeof(_th), &_th); in synproxy_tg4()
278 if (!synproxy_parse_options(skb, par->thoff, th, &opts)) in synproxy_tg4()
324 unsigned int thoff; in ipv4_synproxy_hook() local
338 thoff = ip_hdrlen(skb); in ipv4_synproxy_hook()
339 th = skb_header_pointer(skb, thoff, sizeof(_th), &_th); in ipv4_synproxy_hook()
366 if (!synproxy_parse_options(skb, thoff, th, &opts)) in ipv4_synproxy_hook()
395 if (!synproxy_parse_options(skb, thoff, th, &opts)) in ipv4_synproxy_hook()
422 synproxy_tstamp_adjust(skb, thoff, th, ct, ctinfo, synproxy); in ipv4_synproxy_hook()
/Linux-v4.19/net/ipv6/
Dtcpv6_offload.c32 static int tcp6_gro_complete(struct sk_buff *skb, int thoff) in tcp6_gro_complete() argument
37 th->check = ~tcp_v6_check(skb->len - thoff, &iph->saddr, in tcp6_gro_complete()
/Linux-v4.19/net/bridge/netfilter/
Dnft_reject_bridge.c221 int thoff; in reject6_br_csum_ok() local
232 thoff = ipv6_skip_exthdr(skb, ((u8*)(ip6h+1) - skb->data), &proto, &fo); in reject6_br_csum_ok()
233 if (thoff < 0 || thoff >= skb->len || (fo & htons(~0x7)) != 0) in reject6_br_csum_ok()
236 return nf_ip6_checksum(skb, hook, thoff, proto) == 0; in reject6_br_csum_ok()
/Linux-v4.19/net/sched/
Dem_ipset.c70 acpar.thoff = ip_hdrlen(skb); in em_ipset_match()
77 acpar.thoff = sizeof(struct ipv6hdr); in em_ipset_match()
/Linux-v4.19/samples/bpf/
Dsockex2_kern.c24 __u16 thoff; member
181 flow->thoff = (__u16) nhoff; in flow_dissector()

12