/Linux-v4.19/net/ipv6/netfilter/ |
D | ip6t_srh.c | 31 struct ipv6_sr_hdr *srh; in srh_mt6() local 37 srh = skb_header_pointer(skb, srhoff, sizeof(_srh), &_srh); in srh_mt6() 38 if (!srh) in srh_mt6() 41 hdrlen = ipv6_optlen(srh); in srh_mt6() 45 if (srh->type != IPV6_SRCRT_TYPE_4) in srh_mt6() 48 if (srh->segments_left > srh->first_segment) in srh_mt6() 54 !(srh->nexthdr == srhinfo->next_hdr))) in srh_mt6() 60 !(srh->hdrlen == srhinfo->hdr_len))) in srh_mt6() 65 !(srh->hdrlen > srhinfo->hdr_len))) in srh_mt6() 70 !(srh->hdrlen < srhinfo->hdr_len))) in srh_mt6() [all …]
|
D | Kconfig | 225 tristate '"srh" Segment Routing header match support' 228 srh matching allows you to match packets based on the segment
|
/Linux-v4.19/tools/testing/selftests/bpf/ |
D | test_lwt_seg6local.c | 67 struct ip6_srh_t *srh; in get_srh() local 88 srh = cursor_advance(cursor, sizeof(*srh)); in get_srh() 89 if ((void *)srh + sizeof(*srh) > data_end) in get_srh() 92 if (srh->type != 4) in get_srh() 95 return srh; in get_srh() 129 int is_valid_tlv_boundary(struct __sk_buff *skb, struct ip6_srh_t *srh, in is_valid_tlv_boundary() argument 137 srh_off = (char *)srh - (char *)(long)skb->data; in is_valid_tlv_boundary() 139 cur_off = srh_off + sizeof(*srh) + in is_valid_tlv_boundary() 140 sizeof(struct ip6_addr_t) * (srh->first_segment + 1); in is_valid_tlv_boundary() 152 if (cur_off >= srh_off + ((srh->hdrlen + 1) << 3)) in is_valid_tlv_boundary() [all …]
|
/Linux-v4.19/net/ipv6/ |
D | seg6_local.c | 54 struct ipv6_sr_hdr *srh; member 73 struct ipv6_sr_hdr *srh; in get_srh() local 79 if (!pskb_may_pull(skb, srhoff + sizeof(*srh))) in get_srh() 82 srh = (struct ipv6_sr_hdr *)(skb->data + srhoff); in get_srh() 84 len = (srh->hdrlen + 1) << 3; in get_srh() 89 if (!seg6_validate_srh(srh, len)) in get_srh() 92 return srh; in get_srh() 97 struct ipv6_sr_hdr *srh; in get_and_validate_srh() local 99 srh = get_srh(skb); in get_and_validate_srh() 100 if (!srh) in get_and_validate_srh() [all …]
|
D | seg6_hmac.c | 91 static struct sr6_tlv_hmac *seg6_get_tlv_hmac(struct ipv6_sr_hdr *srh) in seg6_get_tlv_hmac() argument 95 if (srh->hdrlen < (srh->first_segment + 1) * 2 + 5) in seg6_get_tlv_hmac() 98 if (!sr_has_hmac(srh)) in seg6_get_tlv_hmac() 102 ((char *)srh + ((srh->hdrlen + 1) << 3) - 40); in seg6_get_tlv_hmac() 249 struct ipv6_sr_hdr *srh; in seg6_hmac_validate_skb() local 254 srh = (struct ipv6_sr_hdr *)skb_transport_header(skb); in seg6_hmac_validate_skb() 256 tlv = seg6_get_tlv_hmac(srh); in seg6_hmac_validate_skb() 276 if (seg6_hmac_compute(hinfo, srh, &ipv6_hdr(skb)->saddr, hmac_output)) in seg6_hmac_validate_skb() 333 struct ipv6_sr_hdr *srh) in seg6_push_hmac() argument 339 tlv = seg6_get_tlv_hmac(srh); in seg6_push_hmac() [all …]
|
D | seg6.c | 33 bool seg6_validate_srh(struct ipv6_sr_hdr *srh, int len) in seg6_validate_srh() argument 38 if (srh->type != IPV6_SRCRT_TYPE_4) in seg6_validate_srh() 41 if (((srh->hdrlen + 1) << 3) != len) in seg6_validate_srh() 44 if (srh->segments_left > srh->first_segment) in seg6_validate_srh() 47 tlv_offset = sizeof(*srh) + ((srh->first_segment + 1) << 4); in seg6_validate_srh() 60 tlv = (struct sr6_tlv *)((unsigned char *)srh + tlv_offset); in seg6_validate_srh()
|
D | seg6_iptunnel.c | 240 err = seg6_do_srh_inline(skb, tinfo->srh); in seg6_do_srh() 256 err = seg6_do_srh_encap(skb, tinfo->srh, proto); in seg6_do_srh() 274 err = seg6_do_srh_encap(skb, tinfo->srh, NEXTHDR_NONE); in seg6_do_srh() 431 if (!seg6_validate_srh(tuninfo->srh, tuninfo_len - sizeof(*tuninfo))) in seg6_build_state()
|
D | exthdrs.c | 1161 struct ipv6_sr_hdr *srh = (struct ipv6_sr_hdr *)opt->srcrt; in fl6_update_dst() local 1163 fl6->daddr = srh->segments[srh->segments_left]; in fl6_update_dst()
|
D | ipv6_sockglue.c | 454 struct ipv6_sr_hdr *srh = (struct ipv6_sr_hdr *) in do_ipv6_setsockopt() local 457 if (!seg6_validate_srh(srh, optlen)) in do_ipv6_setsockopt()
|
/Linux-v4.19/include/uapi/linux/ |
D | seg6_iptunnel.h | 29 struct ipv6_sr_hdr srh[0]; member 32 #define SEG6_IPTUN_ENCAP_SIZE(x) ((sizeof(*x)) + (((x)->srh->hdrlen + 1) << 3)) 56 return ((tuninfo->srh->hdrlen + 1) << 3) + head; in seg6_lwt_headroom()
|
D | seg6.h | 47 #define sr_has_hmac(srh) ((srh)->flags & SR6_FLAG1_HMAC) argument
|
/Linux-v4.19/tools/include/uapi/linux/ |
D | seg6.h | 47 #define sr_has_hmac(srh) ((srh)->flags & SR6_FLAG1_HMAC) argument
|
/Linux-v4.19/include/net/ |
D | seg6_local.h | 27 struct ipv6_sr_hdr *srh; member
|
D | seg6_hmac.h | 55 struct ipv6_sr_hdr *srh);
|
D | seg6.h | 66 extern bool seg6_validate_srh(struct ipv6_sr_hdr *srh, int len);
|
/Linux-v4.19/net/core/ |
D | filter.c | 4543 struct ipv6_sr_hdr *srh = (struct ipv6_sr_hdr *)hdr; in bpf_push_seg6_encap() local 4545 if (!seg6_validate_srh(srh, len)) in bpf_push_seg6_encap() 4553 err = seg6_do_srh_inline(skb, srh); in bpf_push_seg6_encap() 4558 err = seg6_do_srh_encap(skb, srh, IPPROTO_IPV6); in bpf_push_seg6_encap() 4605 struct ipv6_sr_hdr *srh = srh_state->srh; in BPF_CALL_4() local 4609 if (srh == NULL) in BPF_CALL_4() 4612 srh_tlvs = (void *)((char *)srh + ((srh->first_segment + 1) << 4)); in BPF_CALL_4() 4613 srh_end = (void *)((char *)srh + sizeof(*srh) + srh_state->hdrlen); in BPF_CALL_4() 4618 else if (ptr < (void *)&srh->flags || in BPF_CALL_4() 4619 ptr + len > (void *)&srh->segments) in BPF_CALL_4() [all …]
|
/Linux-v4.19/Documentation/ide/ |
D | ChangeLog.ide-cd.1994-2004 | 36 * Richard Hirst <srh@gpt.co.uk> for diagnosing this.
|