Home
last modified time | relevance | path

Searched refs:srh (Results 1 – 19 of 19) sorted by relevance

/linux/net/ipv6/netfilter/
A Dip6t_srh.c27 struct ipv6_sr_hdr *srh; in srh_mt6() local
34 if (!srh) in srh_mt6()
37 hdrlen = ipv6_optlen(srh); in srh_mt6()
44 if (srh->segments_left > srh->first_segment) in srh_mt6()
111 !(srh->tag == srhinfo->tag))) in srh_mt6()
122 struct ipv6_sr_hdr *srh; in srh1_mt6() local
128 if (!srh) in srh1_mt6()
131 hdrlen = ipv6_optlen(srh); in srh1_mt6()
138 if (srh->segments_left > srh->first_segment) in srh1_mt6()
204 if (srh->segments_left == srh->first_segment) in srh1_mt6()
[all …]
A DKconfig172 tristate '"srh" Segment Routing header match support'
175 srh matching allows you to match packets based on the segment
/linux/tools/testing/selftests/bpf/progs/
A Dtest_lwt_seg6local.c79 srh = cursor_advance(cursor, sizeof(*srh)); in get_srh()
80 if ((void *)srh + sizeof(*srh) > data_end) in get_srh()
86 return srh; in get_srh()
298 srh->hdrlen = 8; in __encap_srh()
299 srh->type = 4; in __encap_srh()
302 srh->flags = 0; in __encap_srh()
303 srh->tag = 0; in __encap_srh()
305 seg = (struct ip6_addr_t *)((char *)srh + sizeof(*srh)); in __encap_srh()
333 if (srh == NULL) in __add_egr_x()
339 err = add_tlv(skb, srh, (srh->hdrlen+1) << 3, in __add_egr_x()
[all …]
A Dtest_seg6_loop.c58 struct ip6_srh_t *srh; in get_srh() local
79 srh = cursor_advance(cursor, sizeof(*srh)); in get_srh()
80 if ((void *)srh + sizeof(*srh) > data_end) in get_srh()
83 if (srh->type != 4) in get_srh()
86 return srh; in get_srh()
120 struct ip6_srh_t *srh, in is_valid_tlv_boundary() argument
131 cur_off = srh_off + sizeof(*srh) + in is_valid_tlv_boundary()
182 struct ip6_srh_t *srh, uint32_t tlv_off, in add_tlv() argument
232 struct ip6_srh_t *srh = get_srh(skb); in __add_egr_x() local
237 if (srh == NULL) in __add_egr_x()
[all …]
/linux/net/ipv6/
A Drpl_iptunnel.c44 if ((srh->hdrlen << 3) != seglen) in rpl_validate_srh()
48 if (!srh->segments_left || in rpl_validate_srh()
52 if (srh->cmpri || srh->cmpre) in rpl_validate_srh()
56 srh->segments_left); in rpl_validate_srh()
60 if (ipv6_addr_type(&srh->rpl_segaddr[srh->segments_left - 1]) & in rpl_validate_srh()
74 struct ipv6_rpl_sr_hdr *srh; in rpl_build_state() local
92 if (srh_len < sizeof(*srh)) in rpl_build_state()
96 if (!rpl_validate_srh(net, srh, srh_len - sizeof(*srh))) in rpl_build_state()
111 memcpy(&rlwt->tuninfo.srh, srh, srh_len); in rpl_build_state()
139 buf = kcalloc(struct_size(srh, segments.addr, srh->segments_left), 2, GFP_ATOMIC); in rpl_do_srh_inline()
[all …]
A Dseg6.c32 if (srh->type != IPV6_SRCRT_TYPE_4) in seg6_validate_srh()
35 if (((srh->hdrlen + 1) << 3) != len) in seg6_validate_srh()
38 if (!reduced && srh->segments_left > srh->first_segment) { in seg6_validate_srh()
46 if (srh->segments_left > srh->first_segment + 1) in seg6_validate_srh()
50 tlv_offset = sizeof(*srh) + ((srh->first_segment + 1) << 4); in seg6_validate_srh()
78 struct ipv6_sr_hdr *srh; in seg6_get_srh() local
89 len = (srh->hdrlen + 1) << 3; in seg6_get_srh()
102 return srh; in seg6_get_srh()
112 struct ipv6_sr_hdr *srh; in seg6_icmp_srh() local
120 srh = seg6_get_srh(skb, 0); in seg6_icmp_srh()
[all …]
A Dseg6_local.c221 if (!srh) in get_and_validate_srh()
238 if (srh && srh->segments_left > 0) in decap_and_validate()
267 addr = srh->segments + srh->segments_left; in advance_nextseg()
392 if (!srh) in input_action_end_core()
432 if (!srh) in input_action_end_x_core()
506 if (!srh) in seg6_get_srh_pktinfo()
1391 struct ipv6_sr_hdr *srh = srh_state->srh; in seg6_bpf_has_valid_srh() local
1433 srh_state->srh = srh; in input_action_end_bpf()
1674 slwt->srh = kmemdup(srh, len, GFP_KERNEL); in parse_nla_srh()
1689 srh = slwt->srh; in put_nla_srh()
[all …]
A Dseg6_hmac.c84 static struct sr6_tlv_hmac *seg6_get_tlv_hmac(struct ipv6_sr_hdr *srh) in seg6_get_tlv_hmac() argument
88 if (srh->hdrlen < (srh->first_segment + 1) * 2 + 5) in seg6_get_tlv_hmac()
91 if (!sr_has_hmac(srh)) in seg6_get_tlv_hmac()
95 ((char *)srh + ((srh->hdrlen + 1) << 3) - 40); in seg6_get_tlv_hmac()
242 struct ipv6_sr_hdr *srh; in seg6_hmac_validate_skb() local
248 srh = (struct ipv6_sr_hdr *)skb_transport_header(skb); in seg6_hmac_validate_skb()
250 tlv = seg6_get_tlv_hmac(srh); in seg6_hmac_validate_skb()
271 if (seg6_hmac_compute(hinfo, srh, &ipv6_hdr(skb)->saddr, hmac_output)) in seg6_hmac_validate_skb()
328 struct ipv6_sr_hdr *srh) in seg6_push_hmac() argument
334 tlv = seg6_get_tlv_hmac(srh); in seg6_push_hmac()
[all …]
A Dseg6_iptunnel.c47 return ((tuninfo->srh->hdrlen + 1) << 3) + head; in seg6_lwt_headroom()
387 err = seg6_do_srh_inline(skb, tinfo->srh); in seg6_do_srh()
405 err = seg6_do_srh_encap(skb, tinfo->srh, proto); in seg6_do_srh()
407 err = seg6_do_srh_encap_red(skb, tinfo->srh, proto); in seg6_do_srh()
428 err = seg6_do_srh_encap(skb, tinfo->srh, in seg6_do_srh()
431 err = seg6_do_srh_encap_red(skb, tinfo->srh, in seg6_do_srh()
659 if (!seg6_validate_srh(tuninfo->srh, tuninfo_len - sizeof(*tuninfo), false)) in seg6_build_state()
A Dexthdrs.c1367 struct ipv6_sr_hdr *srh = (struct ipv6_sr_hdr *)opt->srcrt; in fl6_update_dst() local
1369 fl6->daddr = srh->segments[srh->segments_left]; in fl6_update_dst()
A Dipv6_sockglue.c371 struct ipv6_sr_hdr *srh = in ipv6_set_opt_hdr() local
374 if (!seg6_validate_srh(srh, optlen, false)) in ipv6_set_opt_hdr()
/linux/include/net/
A Dseg6.h67 extern bool seg6_validate_srh(struct ipv6_sr_hdr *srh, int len, bool reduced);
83 struct ipv6_sr_hdr *srh; in seg6_get_daddr() local
86 srh = (struct ipv6_sr_hdr *)(skb->data + opt->srhoff); in seg6_get_daddr()
87 return &srh->segments[0]; in seg6_get_daddr()
A Dseg6_local.h23 struct ipv6_sr_hdr *srh; member
A Dseg6_hmac.h50 struct ipv6_sr_hdr *srh);
/linux/include/uapi/linux/
A Drpl_iptunnel.h19 #define RPL_IPTUNNEL_SRH_SIZE(srh) (((srh)->hdrlen + 1) << 3) argument
A Dseg6_iptunnel.h29 struct ipv6_sr_hdr srh[]; member
32 #define SEG6_IPTUN_ENCAP_SIZE(x) ((sizeof(*x)) + (((x)->srh->hdrlen + 1) << 3))
A Dseg6.h47 #define sr_has_hmac(srh) ((srh)->flags & SR6_FLAG1_HMAC) argument
/linux/tools/include/uapi/linux/
A Dseg6.h47 #define sr_has_hmac(srh) ((srh)->flags & SR6_FLAG1_HMAC) argument
/linux/net/core/
A Dfilter.c6391 err = seg6_do_srh_inline(skb, srh); in bpf_push_seg6_encap()
6477 struct ipv6_sr_hdr *srh = srh_state->srh; in BPF_CALL_4() local
6482 if (srh == NULL) in BPF_CALL_4()
6485 srh_tlvs = (void *)((char *)srh + ((srh->first_segment + 1) << 4)); in BPF_CALL_4()
6486 srh_end = (void *)((char *)srh + sizeof(*srh) + srh_state->hdrlen); in BPF_CALL_4()
6522 srh_state->srh = NULL; in bpf_update_srh_state()
6609 struct ipv6_sr_hdr *srh = srh_state->srh; in BPF_CALL_3() local
6616 if (unlikely(srh == NULL)) in BPF_CALL_3()
6619 srh_tlvs = (void *)((unsigned char *)srh + sizeof(*srh) + in BPF_CALL_3()
6620 ((srh->first_segment + 1) << 4)); in BPF_CALL_3()
[all …]

Completed in 57 milliseconds