/kernel/linux/linux-5.10/net/ipv6/netfilter/ |
H A D | ip6t_srh.c | 27 struct ipv6_sr_hdr *srh; in srh_mt6() local 33 srh = skb_header_pointer(skb, srhoff, sizeof(_srh), &_srh); in srh_mt6() 34 if (!srh) in srh_mt6() 37 hdrlen = ipv6_optlen(srh); in srh_mt6() 41 if (srh->type != IPV6_SRCRT_TYPE_4) in srh_mt6() 44 if (srh->segments_left > srh->first_segment) in srh_mt6() 50 !(srh->nexthdr == srhinfo->next_hdr))) in srh_mt6() 56 !(srh->hdrlen == srhinfo->hdr_len))) in srh_mt6() 61 !(srh in srh_mt6() 122 struct ipv6_sr_hdr *srh; srh1_mt6() local [all...] |
/kernel/linux/linux-6.6/net/ipv6/netfilter/ |
H A D | ip6t_srh.c | 27 struct ipv6_sr_hdr *srh; in srh_mt6() local 33 srh = skb_header_pointer(skb, srhoff, sizeof(_srh), &_srh); in srh_mt6() 34 if (!srh) in srh_mt6() 37 hdrlen = ipv6_optlen(srh); in srh_mt6() 41 if (srh->type != IPV6_SRCRT_TYPE_4) in srh_mt6() 44 if (srh->segments_left > srh->first_segment) in srh_mt6() 50 !(srh->nexthdr == srhinfo->next_hdr))) in srh_mt6() 56 !(srh->hdrlen == srhinfo->hdr_len))) in srh_mt6() 61 !(srh in srh_mt6() 122 struct ipv6_sr_hdr *srh; srh1_mt6() local [all...] |
/kernel/linux/linux-5.10/tools/testing/selftests/bpf/progs/ |
H A D | test_lwt_seg6local.c | 56 struct ip6_srh_t *srh; in get_srh() local 77 srh = cursor_advance(cursor, sizeof(*srh)); in get_srh() 78 if ((void *)srh + sizeof(*srh) > data_end) in get_srh() 81 if (srh->type != 4) in get_srh() 84 return srh; in get_srh() 118 int is_valid_tlv_boundary(struct __sk_buff *skb, struct ip6_srh_t *srh, in is_valid_tlv_boundary() argument 126 srh_off = (char *)srh - (char *)(long)skb->data; in is_valid_tlv_boundary() 128 cur_off = srh_off + sizeof(*srh) in is_valid_tlv_boundary() 177 add_tlv(struct __sk_buff *skb, struct ip6_srh_t *srh, uint32_t tlv_off, struct sr6_tlv_t *itlv, uint8_t tlv_size) add_tlv() argument 221 delete_tlv(struct __sk_buff *skb, struct ip6_srh_t *srh, uint32_t tlv_off) delete_tlv() argument 259 has_egr_tlv(struct __sk_buff *skb, struct ip6_srh_t *srh) has_egr_tlv() argument 290 struct ip6_srh_t *srh; __encap_srh() local 326 struct ip6_srh_t *srh = get_srh(skb); __add_egr_x() local 362 struct ip6_srh_t *srh = get_srh(skb); __pop_egr() local 401 struct ip6_srh_t *srh = get_srh(skb); __inspect_t() local [all...] |
H A D | test_seg6_loop.c | 56 struct ip6_srh_t *srh; in get_srh() local 77 srh = cursor_advance(cursor, sizeof(*srh)); in get_srh() 78 if ((void *)srh + sizeof(*srh) > data_end) in get_srh() 81 if (srh->type != 4) in get_srh() 84 return srh; in get_srh() 118 struct ip6_srh_t *srh, in is_valid_tlv_boundary() 127 srh_off = (char *)srh - (char *)(long)skb->data; in is_valid_tlv_boundary() 129 cur_off = srh_off + sizeof(*srh) in is_valid_tlv_boundary() 117 is_valid_tlv_boundary(struct __sk_buff *skb, struct ip6_srh_t *srh, uint32_t *tlv_off, uint32_t *pad_size, uint32_t *pad_off) is_valid_tlv_boundary() argument 179 add_tlv(struct __sk_buff *skb, struct ip6_srh_t *srh, uint32_t tlv_off, struct sr6_tlv_t *itlv, uint8_t tlv_size) add_tlv() argument 230 struct ip6_srh_t *srh = get_srh(skb); __add_egr_x() local [all...] |
/kernel/linux/linux-6.6/tools/testing/selftests/bpf/progs/ |
H A D | test_lwt_seg6local.c | 56 struct ip6_srh_t *srh; in get_srh() local 77 srh = cursor_advance(cursor, sizeof(*srh)); in get_srh() 78 if ((void *)srh + sizeof(*srh) > data_end) in get_srh() 81 if (srh->type != 4) in get_srh() 84 return srh; in get_srh() 118 int is_valid_tlv_boundary(struct __sk_buff *skb, struct ip6_srh_t *srh, in is_valid_tlv_boundary() argument 126 srh_off = (char *)srh - (char *)(long)skb->data; in is_valid_tlv_boundary() 128 cur_off = srh_off + sizeof(*srh) in is_valid_tlv_boundary() 177 add_tlv(struct __sk_buff *skb, struct ip6_srh_t *srh, uint32_t tlv_off, struct sr6_tlv_t *itlv, uint8_t tlv_size) add_tlv() argument 221 delete_tlv(struct __sk_buff *skb, struct ip6_srh_t *srh, uint32_t tlv_off) delete_tlv() argument 259 has_egr_tlv(struct __sk_buff *skb, struct ip6_srh_t *srh) has_egr_tlv() argument 290 struct ip6_srh_t *srh; __encap_srh() local 326 struct ip6_srh_t *srh = get_srh(skb); __add_egr_x() local 362 struct ip6_srh_t *srh = get_srh(skb); __pop_egr() local 401 struct ip6_srh_t *srh = get_srh(skb); __inspect_t() local [all...] |
H A D | test_seg6_loop.c | 56 struct ip6_srh_t *srh; in get_srh() local 77 srh = cursor_advance(cursor, sizeof(*srh)); in get_srh() 78 if ((void *)srh + sizeof(*srh) > data_end) in get_srh() 81 if (srh->type != 4) in get_srh() 84 return srh; in get_srh() 118 struct ip6_srh_t *srh, in is_valid_tlv_boundary() 127 srh_off = (char *)srh - (char *)(long)skb->data; in is_valid_tlv_boundary() 129 cur_off = srh_off + sizeof(*srh) in is_valid_tlv_boundary() 117 is_valid_tlv_boundary(struct __sk_buff *skb, struct ip6_srh_t *srh, uint32_t *tlv_off, uint32_t *pad_size, uint32_t *pad_off) is_valid_tlv_boundary() argument 179 add_tlv(struct __sk_buff *skb, struct ip6_srh_t *srh, uint32_t tlv_off, struct sr6_tlv_t *itlv, uint8_t tlv_size) add_tlv() argument 230 struct ip6_srh_t *srh = get_srh(skb); __add_egr_x() local [all...] |
/kernel/linux/linux-5.10/net/ipv6/ |
H A D | rpl_iptunnel.c | 16 struct ipv6_rpl_sr_hdr srh[0]; member 39 static bool rpl_validate_srh(struct net *net, struct ipv6_rpl_sr_hdr *srh, in rpl_validate_srh() argument 44 if ((srh->hdrlen << 3) != seglen) in rpl_validate_srh() 48 if (!srh->segments_left || in rpl_validate_srh() 49 (srh->segments_left * sizeof(struct in6_addr)) != seglen) in rpl_validate_srh() 52 if (srh->cmpri || srh->cmpre) in rpl_validate_srh() 55 err = ipv6_chk_rpl_srh_loop(net, srh->rpl_segaddr, in rpl_validate_srh() 56 srh->segments_left); in rpl_validate_srh() 60 if (ipv6_addr_type(&srh in rpl_validate_srh() 74 struct ipv6_rpl_sr_hdr *srh; rpl_build_state() local 127 rpl_do_srh_inline(struct sk_buff *skb, const struct rpl_lwt *rlwt, const struct ipv6_rpl_sr_hdr *srh) rpl_do_srh_inline() argument [all...] |
H A D | seg6_local.c | 50 struct ipv6_sr_hdr *srh; member 69 struct ipv6_sr_hdr *srh; in get_srh() local 75 if (!pskb_may_pull(skb, srhoff + sizeof(*srh))) in get_srh() 78 srh = (struct ipv6_sr_hdr *)(skb->data + srhoff); in get_srh() 80 len = (srh->hdrlen + 1) << 3; in get_srh() 88 srh = (struct ipv6_sr_hdr *)(skb->data + srhoff); in get_srh() 90 if (!seg6_validate_srh(srh, len, true)) in get_srh() 93 return srh; in get_srh() 98 struct ipv6_sr_hdr *srh; in get_and_validate_srh() local 100 srh in get_and_validate_srh() 117 struct ipv6_sr_hdr *srh; decap_and_validate() local 145 advance_nextseg(struct ipv6_sr_hdr *srh, struct in6_addr *daddr) advance_nextseg() argument 221 struct ipv6_sr_hdr *srh; input_action_end() local 241 struct ipv6_sr_hdr *srh; input_action_end_x() local 260 struct ipv6_sr_hdr *srh; input_action_end_t() local 427 struct ipv6_sr_hdr *srh; input_action_end_b6() local 453 struct ipv6_sr_hdr *srh; input_action_end_b6_encap() local 486 struct ipv6_sr_hdr *srh = srh_state->srh; seg6_bpf_has_valid_srh() local 510 struct ipv6_sr_hdr *srh; input_action_end_bpf() local 661 struct ipv6_sr_hdr *srh; parse_nla_srh() local 685 struct ipv6_sr_hdr *srh; put_nla_srh() local [all...] |
H A D | seg6_hmac.c | 85 static struct sr6_tlv_hmac *seg6_get_tlv_hmac(struct ipv6_sr_hdr *srh) in seg6_get_tlv_hmac() argument 89 if (srh->hdrlen < (srh->first_segment + 1) * 2 + 5) in seg6_get_tlv_hmac() 92 if (!sr_has_hmac(srh)) in seg6_get_tlv_hmac() 96 ((char *)srh + ((srh->hdrlen + 1) << 3) - 40); in seg6_get_tlv_hmac() 243 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() 270 if (seg6_hmac_compute(hinfo, srh, in seg6_hmac_validate_skb() 326 seg6_push_hmac(struct net *net, struct in6_addr *saddr, struct ipv6_sr_hdr *srh) seg6_push_hmac() argument [all...] |
H A D | seg6.c | 28 bool seg6_validate_srh(struct ipv6_sr_hdr *srh, int len, bool reduced) in seg6_validate_srh() argument 34 if (srh->type != IPV6_SRCRT_TYPE_4) in seg6_validate_srh() 37 if (((srh->hdrlen + 1) << 3) != len) in seg6_validate_srh() 40 if (!reduced && srh->segments_left > srh->first_segment) { in seg6_validate_srh() 43 max_last_entry = (srh->hdrlen / 2) - 1; in seg6_validate_srh() 45 if (srh->first_segment > max_last_entry) in seg6_validate_srh() 48 if (srh->segments_left > srh->first_segment + 1) in seg6_validate_srh() 52 tlv_offset = sizeof(*srh) in seg6_validate_srh() [all...] |
/kernel/linux/linux-6.6/net/ipv6/ |
H A D | rpl_iptunnel.c | 16 DECLARE_FLEX_ARRAY(struct ipv6_rpl_sr_hdr, srh); 39 static bool rpl_validate_srh(struct net *net, struct ipv6_rpl_sr_hdr *srh, in rpl_validate_srh() argument 44 if ((srh->hdrlen << 3) != seglen) in rpl_validate_srh() 48 if (!srh->segments_left || in rpl_validate_srh() 49 (srh->segments_left * sizeof(struct in6_addr)) != seglen) in rpl_validate_srh() 52 if (srh->cmpri || srh->cmpre) in rpl_validate_srh() 55 err = ipv6_chk_rpl_srh_loop(net, srh->rpl_segaddr, in rpl_validate_srh() 56 srh->segments_left); in rpl_validate_srh() 60 if (ipv6_addr_type(&srh in rpl_validate_srh() 74 struct ipv6_rpl_sr_hdr *srh; rpl_build_state() local 127 rpl_do_srh_inline(struct sk_buff *skb, const struct rpl_lwt *rlwt, const struct ipv6_rpl_sr_hdr *srh) rpl_do_srh_inline() argument [all...] |
H A D | seg6_local.c | 189 struct ipv6_sr_hdr *srh; member 218 struct ipv6_sr_hdr *srh; in get_and_validate_srh() local 220 srh = seg6_get_srh(skb, IP6_FH_F_SKIP_RH); in get_and_validate_srh() 221 if (!srh) in get_and_validate_srh() 229 return srh; in get_and_validate_srh() 234 struct ipv6_sr_hdr *srh; in decap_and_validate() local 237 srh = seg6_get_srh(skb, 0); in decap_and_validate() 238 if (srh && srh->segments_left > 0) in decap_and_validate() 242 if (srh in decap_and_validate() 262 advance_nextseg(struct ipv6_sr_hdr *srh, struct in6_addr *daddr) advance_nextseg() argument 389 struct ipv6_sr_hdr *srh; input_action_end_core() local 429 struct ipv6_sr_hdr *srh; input_action_end_x_core() local 502 seg6_get_srh_pktinfo(struct ipv6_sr_hdr *srh) seg6_get_srh_pktinfo() argument 627 struct ipv6_sr_hdr *srh; seg6_pop_srh() local 744 struct ipv6_sr_hdr *srh; end_flv8986_core() local 828 struct ipv6_sr_hdr *srh; input_action_end_t() local 1330 struct ipv6_sr_hdr *srh; input_action_end_b6() local 1356 struct ipv6_sr_hdr *srh; input_action_end_b6_encap() local 1389 struct ipv6_sr_hdr *srh = srh_state->srh; seg6_bpf_has_valid_srh() local 1413 struct ipv6_sr_hdr *srh; input_action_end_bpf() local 1655 struct ipv6_sr_hdr *srh; parse_nla_srh() local 1679 struct ipv6_sr_hdr *srh; put_nla_srh() local [all...] |
H A D | seg6.c | 28 bool seg6_validate_srh(struct ipv6_sr_hdr *srh, int len, bool reduced) in seg6_validate_srh() argument 34 if (srh->type != IPV6_SRCRT_TYPE_4) in seg6_validate_srh() 37 if (((srh->hdrlen + 1) << 3) != len) in seg6_validate_srh() 40 if (!reduced && srh->segments_left > srh->first_segment) { in seg6_validate_srh() 43 max_last_entry = (srh->hdrlen / 2) - 1; in seg6_validate_srh() 45 if (srh->first_segment > max_last_entry) in seg6_validate_srh() 48 if (srh->segments_left > srh->first_segment + 1) in seg6_validate_srh() 52 tlv_offset = sizeof(*srh) in seg6_validate_srh() 80 struct ipv6_sr_hdr *srh; seg6_get_srh() local 114 struct ipv6_sr_hdr *srh; seg6_icmp_srh() local [all...] |
H A D | seg6_hmac.c | 84 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 247 srh = (struct ipv6_sr_hdr *)skb_transport_header(skb); in seg6_hmac_validate_skb() 249 tlv = seg6_get_tlv_hmac(srh); in seg6_hmac_validate_skb() 269 if (seg6_hmac_compute(hinfo, srh, in seg6_hmac_validate_skb() 325 seg6_push_hmac(struct net *net, struct in6_addr *saddr, struct ipv6_sr_hdr *srh) seg6_push_hmac() argument [all...] |
/kernel/linux/patches/linux-4.19/prebuilts/usr/include/linux/ |
H A D | seg6_iptunnel.h | 17 struct ipv6_sr_hdr srh[0]; member 19 #define SEG6_IPTUN_ENCAP_SIZE(x) ((sizeof(*x)) + (((x)->srh->hdrlen + 1) << 3)) 38 return ((tuninfo->srh->hdrlen + 1) << 3) + head; in seg6_lwt_headroom()
|
/kernel/linux/linux-6.6/include/net/ |
H A D | seg6.h | 60 extern bool seg6_validate_srh(struct ipv6_sr_hdr *srh, int len, bool reduced); 76 struct ipv6_sr_hdr *srh; in seg6_get_daddr() local 79 srh = (struct ipv6_sr_hdr *)(skb->data + opt->srhoff); in seg6_get_daddr() 80 return &srh->segments[0]; in seg6_get_daddr()
|
/kernel/linux/linux-5.10/include/uapi/linux/ |
H A D | rpl_iptunnel.h | 19 #define RPL_IPTUNNEL_SRH_SIZE(srh) (((srh)->hdrlen + 1) << 3)
|
H A 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))
|
/kernel/linux/linux-6.6/include/uapi/linux/ |
H A D | rpl_iptunnel.h | 19 #define RPL_IPTUNNEL_SRH_SIZE(srh) (((srh)->hdrlen + 1) << 3)
|
H A D | seg6_iptunnel.h | 29 struct ipv6_sr_hdr srh[]; member 32 #define SEG6_IPTUN_ENCAP_SIZE(x) ((sizeof(*x)) + (((x)->srh->hdrlen + 1) << 3))
|
/kernel/linux/patches/linux-6.6/prebuilts/usr/include/linux/ |
H A D | rpl_iptunnel.h | 27 #define RPL_IPTUNNEL_SRH_SIZE(srh) (((srh)->hdrlen + 1) << 3)
|
H A D | seg6_iptunnel.h | 30 struct ipv6_sr_hdr srh[0]; member 32 #define SEG6_IPTUN_ENCAP_SIZE(x) ((sizeof(* x)) + (((x)->srh->hdrlen + 1) << 3))
|
/kernel/linux/patches/linux-5.10/prebuilts/usr/include/linux/ |
H A D | rpl_iptunnel.h | 27 #define RPL_IPTUNNEL_SRH_SIZE(srh) (((srh)->hdrlen + 1) << 3)
|
H A D | seg6_iptunnel.h | 30 struct ipv6_sr_hdr srh[0]; member 32 #define SEG6_IPTUN_ENCAP_SIZE(x) ((sizeof(* x)) + (((x)->srh->hdrlen + 1) << 3))
|
/kernel/linux/linux-5.10/tools/include/uapi/linux/ |
H A D | seg6.h | 47 #define sr_has_hmac(srh) ((srh)->flags & SR6_FLAG1_HMAC)
|