-
- if (v6nexthdr == IP_PROTO_TCP) {
- if (unlikely(l4hdr + sizeof(struct tcphdr) > data_end))
- DO_RETURN(PKT_LEN_DROP, XDP_DROP);
- tcp = (struct tcphdr*) l4hdr;
- } else if (v6nexthdr == IP_PROTO_UDP) {
- if (unlikely(l4hdr + sizeof(struct udphdr) > data_end))
- DO_RETURN(PKT_LEN_DROP, XDP_DROP);
- udp = (struct udphdr*) l4hdr;
- } else if (v6nexthdr == IP6_PROTO_ICMPV6) {
- if (unlikely(l4hdr + sizeof(struct icmp6hdr) > data_end))
- DO_RETURN(PKT_LEN_DROP, XDP_DROP);
- icmpv6 = (struct icmp6hdr*) l4hdr;
+ // TODO: Handle more options?
+
+ if (frag6 == NULL || (frag6->frag_off & BE16(IP6_FRAGOFF)) == 0) {
+ if (v6nexthdr == IP_PROTO_TCP) {
+ if (unlikely(l4hdr + sizeof(struct tcphdr) > data_end))
+ DO_RETURN(PKT_LEN_DROP, XDP_DROP);
+ tcp = (struct tcphdr*) l4hdr;
+ } else if (v6nexthdr == IP_PROTO_UDP) {
+ if (unlikely(l4hdr + sizeof(struct udphdr) > data_end))
+ DO_RETURN(PKT_LEN_DROP, XDP_DROP);
+ udp = (struct udphdr*) l4hdr;
+ } else if (v6nexthdr == IP6_PROTO_ICMPV6) {
+ if (unlikely(l4hdr + sizeof(struct icmp6hdr) > data_end))
+ DO_RETURN(PKT_LEN_DROP, XDP_DROP);
+ icmpv6 = (struct icmp6hdr*) l4hdr;
+ }