# 1 "/var/lib/cilium/bpf/bpf_host.c"
# 1 "<built-in>" 1
# 1 "<built-in>" 3
# 354 "<built-in>" 3
# 1 "<command line>" 1
# 1 "<built-in>" 2
# 1 "/var/lib/cilium/bpf/bpf_host.c" 2



# 1 "/var/lib/cilium/bpf/include/bpf/ctx/skb.h" 1
# 11 "/var/lib/cilium/bpf/include/bpf/ctx/skb.h"
# 1 "/var/lib/cilium/bpf/include/bpf/ctx/common.h" 1





# 1 "/var/lib/cilium/bpf/include/linux/types.h" 1





# 1 "/var/lib/cilium/bpf/include/linux/../bpf/types_mapper.h" 1





typedef __signed__ char __s8;
typedef unsigned char __u8;

typedef __signed__ short __s16;
typedef unsigned short __u16;

typedef __signed__ int __s32;
typedef unsigned int __u32;

typedef __signed__ long long __s64;
typedef unsigned long long __u64;

typedef __u16 __le16;
typedef __u16 __be16;

typedef __u32 __le32;
typedef __u32 __be32;

typedef __u64 __le64;
typedef __u64 __be64;

typedef __u16 __sum16;
typedef __u32 __wsum;

typedef __u64 __aligned_u64;

typedef __u64 __net_cookie;
typedef __u64 __sock_cookie;
# 7 "/var/lib/cilium/bpf/include/linux/types.h" 2
# 7 "/var/lib/cilium/bpf/include/bpf/ctx/common.h" 2
# 1 "/var/lib/cilium/bpf/include/linux/bpf.h" 1
# 13 "/var/lib/cilium/bpf/include/linux/bpf.h"
# 1 "/var/lib/cilium/bpf/include/linux/bpf_common.h" 1
# 14 "/var/lib/cilium/bpf/include/linux/bpf.h" 2
# 55 "/var/lib/cilium/bpf/include/linux/bpf.h"
enum {
 BPF_REG_0 = 0,
 BPF_REG_1,
 BPF_REG_2,
 BPF_REG_3,
 BPF_REG_4,
 BPF_REG_5,
 BPF_REG_6,
 BPF_REG_7,
 BPF_REG_8,
 BPF_REG_9,
 BPF_REG_10,
 __MAX_BPF_REG,
};




struct bpf_insn {
 __u8 code;
 __u8 dst_reg:4;
 __u8 src_reg:4;
 __s16 off;
 __s32 imm;
};


struct bpf_lpm_trie_key {
 __u32 prefixlen;
 __u8 data[0];
};

struct bpf_cgroup_storage_key {
 __u64 cgroup_inode_id;
 __u32 attach_type;
};

enum bpf_cgroup_iter_order {
 BPF_CGROUP_ITER_ORDER_UNSPEC = 0,
 BPF_CGROUP_ITER_SELF_ONLY,
 BPF_CGROUP_ITER_DESCENDANTS_PRE,
 BPF_CGROUP_ITER_DESCENDANTS_POST,
 BPF_CGROUP_ITER_ANCESTORS_UP,
};

union bpf_iter_link_info {
 struct {
  __u32 map_fd;
 } map;
 struct {
  enum bpf_cgroup_iter_order order;






  __u32 cgroup_fd;
  __u64 cgroup_id;
 } cgroup;

 struct {
  __u32 tid;
  __u32 pid;
  __u32 pid_fd;
 } task;
};
# 867 "/var/lib/cilium/bpf/include/linux/bpf.h"
enum bpf_cmd {
 BPF_MAP_CREATE,
 BPF_MAP_LOOKUP_ELEM,
 BPF_MAP_UPDATE_ELEM,
 BPF_MAP_DELETE_ELEM,
 BPF_MAP_GET_NEXT_KEY,
 BPF_PROG_LOAD,
 BPF_OBJ_PIN,
 BPF_OBJ_GET,
 BPF_PROG_ATTACH,
 BPF_PROG_DETACH,
 BPF_PROG_TEST_RUN,
 BPF_PROG_RUN = BPF_PROG_TEST_RUN,
 BPF_PROG_GET_NEXT_ID,
 BPF_MAP_GET_NEXT_ID,
 BPF_PROG_GET_FD_BY_ID,
 BPF_MAP_GET_FD_BY_ID,
 BPF_OBJ_GET_INFO_BY_FD,
 BPF_PROG_QUERY,
 BPF_RAW_TRACEPOINT_OPEN,
 BPF_BTF_LOAD,
 BPF_BTF_GET_FD_BY_ID,
 BPF_TASK_FD_QUERY,
 BPF_MAP_LOOKUP_AND_DELETE_ELEM,
 BPF_MAP_FREEZE,
 BPF_BTF_GET_NEXT_ID,
 BPF_MAP_LOOKUP_BATCH,
 BPF_MAP_LOOKUP_AND_DELETE_BATCH,
 BPF_MAP_UPDATE_BATCH,
 BPF_MAP_DELETE_BATCH,
 BPF_LINK_CREATE,
 BPF_LINK_UPDATE,
 BPF_LINK_GET_FD_BY_ID,
 BPF_LINK_GET_NEXT_ID,
 BPF_ENABLE_STATS,
 BPF_ITER_CREATE,
 BPF_LINK_DETACH,
 BPF_PROG_BIND_MAP,
};

enum bpf_map_type {
 BPF_MAP_TYPE_UNSPEC,
 BPF_MAP_TYPE_HASH,
 BPF_MAP_TYPE_ARRAY,
 BPF_MAP_TYPE_PROG_ARRAY,
 BPF_MAP_TYPE_PERF_EVENT_ARRAY,
 BPF_MAP_TYPE_PERCPU_HASH,
 BPF_MAP_TYPE_PERCPU_ARRAY,
 BPF_MAP_TYPE_STACK_TRACE,
 BPF_MAP_TYPE_CGROUP_ARRAY,
 BPF_MAP_TYPE_LRU_HASH,
 BPF_MAP_TYPE_LRU_PERCPU_HASH,
 BPF_MAP_TYPE_LPM_TRIE,
 BPF_MAP_TYPE_ARRAY_OF_MAPS,
 BPF_MAP_TYPE_HASH_OF_MAPS,
 BPF_MAP_TYPE_DEVMAP,
 BPF_MAP_TYPE_SOCKMAP,
 BPF_MAP_TYPE_CPUMAP,
 BPF_MAP_TYPE_XSKMAP,
 BPF_MAP_TYPE_SOCKHASH,
 BPF_MAP_TYPE_CGROUP_STORAGE_DEPRECATED,






 BPF_MAP_TYPE_CGROUP_STORAGE = BPF_MAP_TYPE_CGROUP_STORAGE_DEPRECATED,
 BPF_MAP_TYPE_REUSEPORT_SOCKARRAY,
 BPF_MAP_TYPE_PERCPU_CGROUP_STORAGE,
 BPF_MAP_TYPE_QUEUE,
 BPF_MAP_TYPE_STACK,
 BPF_MAP_TYPE_SK_STORAGE,
 BPF_MAP_TYPE_DEVMAP_HASH,
 BPF_MAP_TYPE_STRUCT_OPS,
 BPF_MAP_TYPE_RINGBUF,
 BPF_MAP_TYPE_INODE_STORAGE,
 BPF_MAP_TYPE_TASK_STORAGE,
 BPF_MAP_TYPE_BLOOM_FILTER,
 BPF_MAP_TYPE_USER_RINGBUF,
 BPF_MAP_TYPE_CGRP_STORAGE,
};
# 958 "/var/lib/cilium/bpf/include/linux/bpf.h"
enum bpf_prog_type {
 BPF_PROG_TYPE_UNSPEC,
 BPF_PROG_TYPE_SOCKET_FILTER,
 BPF_PROG_TYPE_KPROBE,
 BPF_PROG_TYPE_SCHED_CLS,
 BPF_PROG_TYPE_SCHED_ACT,
 BPF_PROG_TYPE_TRACEPOINT,
 BPF_PROG_TYPE_XDP,
 BPF_PROG_TYPE_PERF_EVENT,
 BPF_PROG_TYPE_CGROUP_SKB,
 BPF_PROG_TYPE_CGROUP_SOCK,
 BPF_PROG_TYPE_LWT_IN,
 BPF_PROG_TYPE_LWT_OUT,
 BPF_PROG_TYPE_LWT_XMIT,
 BPF_PROG_TYPE_SOCK_OPS,
 BPF_PROG_TYPE_SK_SKB,
 BPF_PROG_TYPE_CGROUP_DEVICE,
 BPF_PROG_TYPE_SK_MSG,
 BPF_PROG_TYPE_RAW_TRACEPOINT,
 BPF_PROG_TYPE_CGROUP_SOCK_ADDR,
 BPF_PROG_TYPE_LWT_SEG6LOCAL,
 BPF_PROG_TYPE_LIRC_MODE2,
 BPF_PROG_TYPE_SK_REUSEPORT,
 BPF_PROG_TYPE_FLOW_DISSECTOR,
 BPF_PROG_TYPE_CGROUP_SYSCTL,
 BPF_PROG_TYPE_RAW_TRACEPOINT_WRITABLE,
 BPF_PROG_TYPE_CGROUP_SOCKOPT,
 BPF_PROG_TYPE_TRACING,
 BPF_PROG_TYPE_STRUCT_OPS,
 BPF_PROG_TYPE_EXT,
 BPF_PROG_TYPE_LSM,
 BPF_PROG_TYPE_SK_LOOKUP,
 BPF_PROG_TYPE_SYSCALL,
 BPF_PROG_TYPE_NETFILTER,
};

enum bpf_attach_type {
 BPF_CGROUP_INET_INGRESS,
 BPF_CGROUP_INET_EGRESS,
 BPF_CGROUP_INET_SOCK_CREATE,
 BPF_CGROUP_SOCK_OPS,
 BPF_SK_SKB_STREAM_PARSER,
 BPF_SK_SKB_STREAM_VERDICT,
 BPF_CGROUP_DEVICE,
 BPF_SK_MSG_VERDICT,
 BPF_CGROUP_INET4_BIND,
 BPF_CGROUP_INET6_BIND,
 BPF_CGROUP_INET4_CONNECT,
 BPF_CGROUP_INET6_CONNECT,
 BPF_CGROUP_INET4_POST_BIND,
 BPF_CGROUP_INET6_POST_BIND,
 BPF_CGROUP_UDP4_SENDMSG,
 BPF_CGROUP_UDP6_SENDMSG,
 BPF_LIRC_MODE2,
 BPF_FLOW_DISSECTOR,
 BPF_CGROUP_SYSCTL,
 BPF_CGROUP_UDP4_RECVMSG,
 BPF_CGROUP_UDP6_RECVMSG,
 BPF_CGROUP_GETSOCKOPT,
 BPF_CGROUP_SETSOCKOPT,
 BPF_TRACE_RAW_TP,
 BPF_TRACE_FENTRY,
 BPF_TRACE_FEXIT,
 BPF_MODIFY_RETURN,
 BPF_LSM_MAC,
 BPF_TRACE_ITER,
 BPF_CGROUP_INET4_GETPEERNAME,
 BPF_CGROUP_INET6_GETPEERNAME,
 BPF_CGROUP_INET4_GETSOCKNAME,
 BPF_CGROUP_INET6_GETSOCKNAME,
 BPF_XDP_DEVMAP,
 BPF_CGROUP_INET_SOCK_RELEASE,
 BPF_XDP_CPUMAP,
 BPF_SK_LOOKUP,
 BPF_XDP,
 BPF_SK_SKB_VERDICT,
 BPF_SK_REUSEPORT_SELECT,
 BPF_SK_REUSEPORT_SELECT_OR_MIGRATE,
 BPF_PERF_EVENT,
 BPF_TRACE_KPROBE_MULTI,
 BPF_LSM_CGROUP,
 BPF_STRUCT_OPS,
 BPF_NETFILTER,
 BPF_TCX_INGRESS,
 BPF_TCX_EGRESS,
 BPF_TRACE_UPROBE_MULTI,
 __MAX_BPF_ATTACH_TYPE
};



enum bpf_link_type {
 BPF_LINK_TYPE_UNSPEC = 0,
 BPF_LINK_TYPE_RAW_TRACEPOINT = 1,
 BPF_LINK_TYPE_TRACING = 2,
 BPF_LINK_TYPE_CGROUP = 3,
 BPF_LINK_TYPE_ITER = 4,
 BPF_LINK_TYPE_NETNS = 5,
 BPF_LINK_TYPE_XDP = 6,
 BPF_LINK_TYPE_PERF_EVENT = 7,
 BPF_LINK_TYPE_KPROBE_MULTI = 8,
 BPF_LINK_TYPE_STRUCT_OPS = 9,
 BPF_LINK_TYPE_NETFILTER = 10,
 BPF_LINK_TYPE_TCX = 11,
 BPF_LINK_TYPE_UPROBE_MULTI = 12,
 MAX_BPF_LINK_TYPE,
};

enum bpf_perf_event_type {
 BPF_PERF_EVENT_UNSPEC = 0,
 BPF_PERF_EVENT_UPROBE = 1,
 BPF_PERF_EVENT_URETPROBE = 2,
 BPF_PERF_EVENT_KPROBE = 3,
 BPF_PERF_EVENT_KRETPROBE = 4,
 BPF_PERF_EVENT_TRACEPOINT = 5,
 BPF_PERF_EVENT_EVENT = 6,
};
# 1192 "/var/lib/cilium/bpf/include/linux/bpf.h"
enum {
 BPF_F_KPROBE_MULTI_RETURN = (1U << 0)
};




enum {
 BPF_F_UPROBE_MULTI_RETURN = (1U << 0)
};
# 1263 "/var/lib/cilium/bpf/include/linux/bpf.h"
enum {
 BPF_ANY = 0,
 BPF_NOEXIST = 1,
 BPF_EXIST = 2,
 BPF_F_LOCK = 4,
};


enum {
 BPF_F_NO_PREALLOC = (1U << 0),






 BPF_F_NO_COMMON_LRU = (1U << 1),

 BPF_F_NUMA_NODE = (1U << 2),


 BPF_F_RDONLY = (1U << 3),
 BPF_F_WRONLY = (1U << 4),


 BPF_F_STACK_BUILD_ID = (1U << 5),


 BPF_F_ZERO_SEED = (1U << 6),


 BPF_F_RDONLY_PROG = (1U << 7),
 BPF_F_WRONLY_PROG = (1U << 8),


 BPF_F_CLONE = (1U << 9),


 BPF_F_MMAPABLE = (1U << 10),


 BPF_F_PRESERVE_ELEMS = (1U << 11),


 BPF_F_INNER_MAP = (1U << 12),


 BPF_F_LINK = (1U << 13),


 BPF_F_PATH_FD = (1U << 14),
};
# 1332 "/var/lib/cilium/bpf/include/linux/bpf.h"
enum bpf_stats_type {

 BPF_STATS_RUN_TIME = 0,
};

enum bpf_stack_build_id_status {

 BPF_STACK_BUILD_ID_EMPTY = 0,

 BPF_STACK_BUILD_ID_VALID = 1,

 BPF_STACK_BUILD_ID_IP = 2,
};


struct bpf_stack_build_id {
 __s32 status;
 unsigned char build_id[20];
 union {
  __u64 offset;
  __u64 ip;
 };
};



union bpf_attr {
 struct {
  __u32 map_type;
  __u32 key_size;
  __u32 value_size;
  __u32 max_entries;
  __u32 map_flags;


  __u32 inner_map_fd;
  __u32 numa_node;


  char map_name[16U];
  __u32 map_ifindex;
  __u32 btf_fd;
  __u32 btf_key_type_id;
  __u32 btf_value_type_id;
  __u32 btf_vmlinux_value_type_id;
# 1386 "/var/lib/cilium/bpf/include/linux/bpf.h"
  __u64 map_extra;
 };

 struct {
  __u32 map_fd;
  __aligned_u64 key;
  union {
   __aligned_u64 value;
   __aligned_u64 next_key;
  };
  __u64 flags;
 };

 struct {
  __aligned_u64 in_batch;


  __aligned_u64 out_batch;
  __aligned_u64 keys;
  __aligned_u64 values;
  __u32 count;




  __u32 map_fd;
  __u64 elem_flags;
  __u64 flags;
 } batch;

 struct {
  __u32 prog_type;
  __u32 insn_cnt;
  __aligned_u64 insns;
  __aligned_u64 license;
  __u32 log_level;
  __u32 log_size;
  __aligned_u64 log_buf;
  __u32 kern_version;
  __u32 prog_flags;
  char prog_name[16U];
  __u32 prog_ifindex;




  __u32 expected_attach_type;
  __u32 prog_btf_fd;
  __u32 func_info_rec_size;
  __aligned_u64 func_info;
  __u32 func_info_cnt;
  __u32 line_info_rec_size;
  __aligned_u64 line_info;
  __u32 line_info_cnt;
  __u32 attach_btf_id;
  union {

   __u32 attach_prog_fd;

   __u32 attach_btf_obj_fd;
  };
  __u32 core_relo_cnt;
  __aligned_u64 fd_array;
  __aligned_u64 core_relos;
  __u32 core_relo_rec_size;




  __u32 log_true_size;
 };

 struct {
  __aligned_u64 pathname;
  __u32 bpf_fd;
  __u32 file_flags;






  __s32 path_fd;
 };

 struct {
  union {
   __u32 target_fd;
   __u32 target_ifindex;
  };
  __u32 attach_bpf_fd;
  __u32 attach_type;
  __u32 attach_flags;
  __u32 replace_bpf_fd;
  union {
   __u32 relative_fd;
   __u32 relative_id;
  };
  __u64 expected_revision;
 };

 struct {
  __u32 prog_fd;
  __u32 retval;
  __u32 data_size_in;
  __u32 data_size_out;



  __aligned_u64 data_in;
  __aligned_u64 data_out;
  __u32 repeat;
  __u32 duration;
  __u32 ctx_size_in;
  __u32 ctx_size_out;



  __aligned_u64 ctx_in;
  __aligned_u64 ctx_out;
  __u32 flags;
  __u32 cpu;
  __u32 batch_size;
 } test;

 struct {
  union {
   __u32 start_id;
   __u32 prog_id;
   __u32 map_id;
   __u32 btf_id;
   __u32 link_id;
  };
  __u32 next_id;
  __u32 open_flags;
 };

 struct {
  __u32 bpf_fd;
  __u32 info_len;
  __aligned_u64 info;
 } info;

 struct {
  union {
   __u32 target_fd;
   __u32 target_ifindex;
  };
  __u32 attach_type;
  __u32 query_flags;
  __u32 attach_flags;
  __aligned_u64 prog_ids;
  union {
   __u32 prog_cnt;
   __u32 count;
  };
  __u32 :32;



  __aligned_u64 prog_attach_flags;
  __aligned_u64 link_ids;
  __aligned_u64 link_attach_flags;
  __u64 revision;
 } query;

 struct {
  __u64 name;
  __u32 prog_fd;
 } raw_tracepoint;

 struct {
  __aligned_u64 btf;
  __aligned_u64 btf_log_buf;
  __u32 btf_size;
  __u32 btf_log_size;
  __u32 btf_log_level;




  __u32 btf_log_true_size;
 };

 struct {
  __u32 pid;
  __u32 fd;
  __u32 flags;
  __u32 buf_len;
  __aligned_u64 buf;




  __u32 prog_id;
  __u32 fd_type;
  __u64 probe_offset;
  __u64 probe_addr;
 } task_fd_query;

 struct {
  union {
   __u32 prog_fd;
   __u32 map_fd;
  };
  union {
   __u32 target_fd;
   __u32 target_ifindex;
  };
  __u32 attach_type;
  __u32 flags;
  union {
   __u32 target_btf_id;
   struct {
    __aligned_u64 iter_info;
    __u32 iter_info_len;
   };
   struct {




    __u64 bpf_cookie;
   } perf_event;
   struct {
    __u32 flags;
    __u32 cnt;
    __aligned_u64 syms;
    __aligned_u64 addrs;
    __aligned_u64 cookies;
   } kprobe_multi;
   struct {

    __u32 target_btf_id;




    __u64 cookie;
   } tracing;
   struct {
    __u32 pf;
    __u32 hooknum;
    __s32 priority;
    __u32 flags;
   } netfilter;
   struct {
    union {
     __u32 relative_fd;
     __u32 relative_id;
    };
    __u64 expected_revision;
   } tcx;
   struct {
    __aligned_u64 path;
    __aligned_u64 offsets;
    __aligned_u64 ref_ctr_offsets;
    __aligned_u64 cookies;
    __u32 cnt;
    __u32 flags;
    __u32 pid;
   } uprobe_multi;
  };
 } link_create;

 struct {
  __u32 link_fd;
  union {

   __u32 new_prog_fd;

   __u32 new_map_fd;
  };
  __u32 flags;
  union {



   __u32 old_prog_fd;



   __u32 old_map_fd;
  };
 } link_update;

 struct {
  __u32 link_fd;
 } link_detach;

 struct {
  __u32 type;
 } enable_stats;

 struct {
  __u32 link_fd;
  __u32 flags;
 } iter_create;

 struct {
  __u32 prog_fd;
  __u32 map_fd;
  __u32 flags;
 } prog_bind_map;

} __attribute__((aligned(8)));
# 5872 "/var/lib/cilium/bpf/include/linux/bpf.h"
enum bpf_func_id {
 BPF_FUNC_unspec = 0, BPF_FUNC_map_lookup_elem = 1, BPF_FUNC_map_update_elem = 2, BPF_FUNC_map_delete_elem = 3, BPF_FUNC_probe_read = 4, BPF_FUNC_ktime_get_ns = 5, BPF_FUNC_trace_printk = 6, BPF_FUNC_get_prandom_u32 = 7, BPF_FUNC_get_smp_processor_id = 8, BPF_FUNC_skb_store_bytes = 9, BPF_FUNC_l3_csum_replace = 10, BPF_FUNC_l4_csum_replace = 11, BPF_FUNC_tail_call = 12, BPF_FUNC_clone_redirect = 13, BPF_FUNC_get_current_pid_tgid = 14, BPF_FUNC_get_current_uid_gid = 15, BPF_FUNC_get_current_comm = 16, BPF_FUNC_get_cgroup_classid = 17, BPF_FUNC_skb_vlan_push = 18, BPF_FUNC_skb_vlan_pop = 19, BPF_FUNC_skb_get_tunnel_key = 20, BPF_FUNC_skb_set_tunnel_key = 21, BPF_FUNC_perf_event_read = 22, BPF_FUNC_redirect = 23, BPF_FUNC_get_route_realm = 24, BPF_FUNC_perf_event_output = 25, BPF_FUNC_skb_load_bytes = 26, BPF_FUNC_get_stackid = 27, BPF_FUNC_csum_diff = 28, BPF_FUNC_skb_get_tunnel_opt = 29, BPF_FUNC_skb_set_tunnel_opt = 30, BPF_FUNC_skb_change_proto = 31, BPF_FUNC_skb_change_type = 32, BPF_FUNC_skb_under_cgroup = 33, BPF_FUNC_get_hash_recalc = 34, BPF_FUNC_get_current_task = 35, BPF_FUNC_probe_write_user = 36, BPF_FUNC_current_task_under_cgroup = 37, BPF_FUNC_skb_change_tail = 38, BPF_FUNC_skb_pull_data = 39, BPF_FUNC_csum_update = 40, BPF_FUNC_set_hash_invalid = 41, BPF_FUNC_get_numa_node_id = 42, BPF_FUNC_skb_change_head = 43, BPF_FUNC_xdp_adjust_head = 44, BPF_FUNC_probe_read_str = 45, BPF_FUNC_get_socket_cookie = 46, BPF_FUNC_get_socket_uid = 47, BPF_FUNC_set_hash = 48, BPF_FUNC_setsockopt = 49, BPF_FUNC_skb_adjust_room = 50, BPF_FUNC_redirect_map = 51, BPF_FUNC_sk_redirect_map = 52, BPF_FUNC_sock_map_update = 53, BPF_FUNC_xdp_adjust_meta = 54, BPF_FUNC_perf_event_read_value = 55, BPF_FUNC_perf_prog_read_value = 56, BPF_FUNC_getsockopt = 57, BPF_FUNC_override_return = 58, BPF_FUNC_sock_ops_cb_flags_set = 59, BPF_FUNC_msg_redirect_map = 60, BPF_FUNC_msg_apply_bytes = 61, BPF_FUNC_msg_cork_bytes = 62, BPF_FUNC_msg_pull_data = 63, BPF_FUNC_bind = 64, BPF_FUNC_xdp_adjust_tail = 65, BPF_FUNC_skb_get_xfrm_state = 66, BPF_FUNC_get_stack = 67, BPF_FUNC_skb_load_bytes_relative = 68, BPF_FUNC_fib_lookup = 69, BPF_FUNC_sock_hash_update = 70, BPF_FUNC_msg_redirect_hash = 71, BPF_FUNC_sk_redirect_hash = 72, BPF_FUNC_lwt_push_encap = 73, BPF_FUNC_lwt_seg6_store_bytes = 74, BPF_FUNC_lwt_seg6_adjust_srh = 75, BPF_FUNC_lwt_seg6_action = 76, BPF_FUNC_rc_repeat = 77, BPF_FUNC_rc_keydown = 78, BPF_FUNC_skb_cgroup_id = 79, BPF_FUNC_get_current_cgroup_id = 80, BPF_FUNC_get_local_storage = 81, BPF_FUNC_sk_select_reuseport = 82, BPF_FUNC_skb_ancestor_cgroup_id = 83, BPF_FUNC_sk_lookup_tcp = 84, BPF_FUNC_sk_lookup_udp = 85, BPF_FUNC_sk_release = 86, BPF_FUNC_map_push_elem = 87, BPF_FUNC_map_pop_elem = 88, BPF_FUNC_map_peek_elem = 89, BPF_FUNC_msg_push_data = 90, BPF_FUNC_msg_pop_data = 91, BPF_FUNC_rc_pointer_rel = 92, BPF_FUNC_spin_lock = 93, BPF_FUNC_spin_unlock = 94, BPF_FUNC_sk_fullsock = 95, BPF_FUNC_tcp_sock = 96, BPF_FUNC_skb_ecn_set_ce = 97, BPF_FUNC_get_listener_sock = 98, BPF_FUNC_skc_lookup_tcp = 99, BPF_FUNC_tcp_check_syncookie = 100, BPF_FUNC_sysctl_get_name = 101, BPF_FUNC_sysctl_get_current_value = 102, BPF_FUNC_sysctl_get_new_value = 103, BPF_FUNC_sysctl_set_new_value = 104, BPF_FUNC_strtol = 105, BPF_FUNC_strtoul = 106, BPF_FUNC_sk_storage_get = 107, BPF_FUNC_sk_storage_delete = 108, BPF_FUNC_send_signal = 109, BPF_FUNC_tcp_gen_syncookie = 110, BPF_FUNC_skb_output = 111, BPF_FUNC_probe_read_user = 112, BPF_FUNC_probe_read_kernel = 113, BPF_FUNC_probe_read_user_str = 114, BPF_FUNC_probe_read_kernel_str = 115, BPF_FUNC_tcp_send_ack = 116, BPF_FUNC_send_signal_thread = 117, BPF_FUNC_jiffies64 = 118, BPF_FUNC_read_branch_records = 119, BPF_FUNC_get_ns_current_pid_tgid = 120, BPF_FUNC_xdp_output = 121, BPF_FUNC_get_netns_cookie = 122, BPF_FUNC_get_current_ancestor_cgroup_id = 123, BPF_FUNC_sk_assign = 124, BPF_FUNC_ktime_get_boot_ns = 125, BPF_FUNC_seq_printf = 126, BPF_FUNC_seq_write = 127, BPF_FUNC_sk_cgroup_id = 128, BPF_FUNC_sk_ancestor_cgroup_id = 129, BPF_FUNC_ringbuf_output = 130, BPF_FUNC_ringbuf_reserve = 131, BPF_FUNC_ringbuf_submit = 132, BPF_FUNC_ringbuf_discard = 133, BPF_FUNC_ringbuf_query = 134, BPF_FUNC_csum_level = 135, BPF_FUNC_skc_to_tcp6_sock = 136, BPF_FUNC_skc_to_tcp_sock = 137, BPF_FUNC_skc_to_tcp_timewait_sock = 138, BPF_FUNC_skc_to_tcp_request_sock = 139, BPF_FUNC_skc_to_udp6_sock = 140, BPF_FUNC_get_task_stack = 141, BPF_FUNC_load_hdr_opt = 142, BPF_FUNC_store_hdr_opt = 143, BPF_FUNC_reserve_hdr_opt = 144, BPF_FUNC_inode_storage_get = 145, BPF_FUNC_inode_storage_delete = 146, BPF_FUNC_d_path = 147, BPF_FUNC_copy_from_user = 148, BPF_FUNC_snprintf_btf = 149, BPF_FUNC_seq_printf_btf = 150, BPF_FUNC_skb_cgroup_classid = 151, BPF_FUNC_redirect_neigh = 152, BPF_FUNC_per_cpu_ptr = 153, BPF_FUNC_this_cpu_ptr = 154, BPF_FUNC_redirect_peer = 155, BPF_FUNC_task_storage_get = 156, BPF_FUNC_task_storage_delete = 157, BPF_FUNC_get_current_task_btf = 158, BPF_FUNC_bprm_opts_set = 159, BPF_FUNC_ktime_get_coarse_ns = 160, BPF_FUNC_ima_inode_hash = 161, BPF_FUNC_sock_from_file = 162, BPF_FUNC_check_mtu = 163, BPF_FUNC_for_each_map_elem = 164, BPF_FUNC_snprintf = 165, BPF_FUNC_sys_bpf = 166, BPF_FUNC_btf_find_by_name_kind = 167, BPF_FUNC_sys_close = 168, BPF_FUNC_timer_init = 169, BPF_FUNC_timer_set_callback = 170, BPF_FUNC_timer_start = 171, BPF_FUNC_timer_cancel = 172, BPF_FUNC_get_func_ip = 173, BPF_FUNC_get_attach_cookie = 174, BPF_FUNC_task_pt_regs = 175, BPF_FUNC_get_branch_snapshot = 176, BPF_FUNC_trace_vprintk = 177, BPF_FUNC_skc_to_unix_sock = 178, BPF_FUNC_kallsyms_lookup_name = 179, BPF_FUNC_find_vma = 180, BPF_FUNC_loop = 181, BPF_FUNC_strncmp = 182, BPF_FUNC_get_func_arg = 183, BPF_FUNC_get_func_ret = 184, BPF_FUNC_get_func_arg_cnt = 185, BPF_FUNC_get_retval = 186, BPF_FUNC_set_retval = 187, BPF_FUNC_xdp_get_buff_len = 188, BPF_FUNC_xdp_load_bytes = 189, BPF_FUNC_xdp_store_bytes = 190, BPF_FUNC_copy_from_user_task = 191, BPF_FUNC_skb_set_tstamp = 192, BPF_FUNC_ima_file_hash = 193, BPF_FUNC_kptr_xchg = 194, BPF_FUNC_map_lookup_percpu_elem = 195, BPF_FUNC_skc_to_mptcp_sock = 196, BPF_FUNC_dynptr_from_mem = 197, BPF_FUNC_ringbuf_reserve_dynptr = 198, BPF_FUNC_ringbuf_submit_dynptr = 199, BPF_FUNC_ringbuf_discard_dynptr = 200, BPF_FUNC_dynptr_read = 201, BPF_FUNC_dynptr_write = 202, BPF_FUNC_dynptr_data = 203, BPF_FUNC_tcp_raw_gen_syncookie_ipv4 = 204, BPF_FUNC_tcp_raw_gen_syncookie_ipv6 = 205, BPF_FUNC_tcp_raw_check_syncookie_ipv4 = 206, BPF_FUNC_tcp_raw_check_syncookie_ipv6 = 207, BPF_FUNC_ktime_get_tai_ns = 208, BPF_FUNC_user_ringbuf_drain = 209, BPF_FUNC_cgrp_storage_get = 210, BPF_FUNC_cgrp_storage_delete = 211,
 __BPF_FUNC_MAX_ID,
};





enum {
 BPF_F_RECOMPUTE_CSUM = (1ULL << 0),
 BPF_F_INVALIDATE_HASH = (1ULL << 1),
};




enum {
 BPF_F_HDR_FIELD_MASK = 0xfULL,
};


enum {
 BPF_F_PSEUDO_HDR = (1ULL << 4),
 BPF_F_MARK_MANGLED_0 = (1ULL << 5),
 BPF_F_MARK_ENFORCE = (1ULL << 6),
 BPF_F_IPV6 = (1ULL << 7),
};


enum {
 BPF_F_INGRESS = (1ULL << 0),
};


enum {
 BPF_F_TUNINFO_IPV6 = (1ULL << 0),
};


enum {
 BPF_F_SKIP_FIELD_MASK = 0xffULL,
 BPF_F_USER_STACK = (1ULL << 8),

 BPF_F_FAST_STACK_CMP = (1ULL << 9),
 BPF_F_REUSE_STACKID = (1ULL << 10),

 BPF_F_USER_BUILD_ID = (1ULL << 11),
};


enum {
 BPF_F_ZERO_CSUM_TX = (1ULL << 1),
 BPF_F_DONT_FRAGMENT = (1ULL << 2),
 BPF_F_SEQ_NUMBER = (1ULL << 3),
 BPF_F_NO_TUNNEL_KEY = (1ULL << 4),
};


enum {
 BPF_F_TUNINFO_FLAGS = (1ULL << 4),
};




enum {
 BPF_F_INDEX_MASK = 0xffffffffULL,
 BPF_F_CURRENT_CPU = BPF_F_INDEX_MASK,

 BPF_F_CTXLEN_MASK = (0xfffffULL << 32),
};


enum {
 BPF_F_CURRENT_NETNS = (-1L),
};


enum {
 BPF_CSUM_LEVEL_QUERY,
 BPF_CSUM_LEVEL_INC,
 BPF_CSUM_LEVEL_DEC,
 BPF_CSUM_LEVEL_RESET,
};


enum {
 BPF_F_ADJ_ROOM_FIXED_GSO = (1ULL << 0),
 BPF_F_ADJ_ROOM_ENCAP_L3_IPV4 = (1ULL << 1),
 BPF_F_ADJ_ROOM_ENCAP_L3_IPV6 = (1ULL << 2),
 BPF_F_ADJ_ROOM_ENCAP_L4_GRE = (1ULL << 3),
 BPF_F_ADJ_ROOM_ENCAP_L4_UDP = (1ULL << 4),
 BPF_F_ADJ_ROOM_NO_CSUM_RESET = (1ULL << 5),
 BPF_F_ADJ_ROOM_ENCAP_L2_ETH = (1ULL << 6),
 BPF_F_ADJ_ROOM_DECAP_L3_IPV4 = (1ULL << 7),
 BPF_F_ADJ_ROOM_DECAP_L3_IPV6 = (1ULL << 8),
};

enum {
 BPF_ADJ_ROOM_ENCAP_L2_MASK = 0xff,
 BPF_ADJ_ROOM_ENCAP_L2_SHIFT = 56,
};






enum {
 BPF_F_SYSCTL_BASE_NAME = (1ULL << 0),
};


enum {
 BPF_LOCAL_STORAGE_GET_F_CREATE = (1ULL << 0),



 BPF_SK_STORAGE_GET_F_CREATE = BPF_LOCAL_STORAGE_GET_F_CREATE,
};


enum {
 BPF_F_GET_BRANCH_RECORDS_SIZE = (1ULL << 0),
};




enum {
 BPF_RB_NO_WAKEUP = (1ULL << 0),
 BPF_RB_FORCE_WAKEUP = (1ULL << 1),
};


enum {
 BPF_RB_AVAIL_DATA = 0,
 BPF_RB_RING_SIZE = 1,
 BPF_RB_CONS_POS = 2,
 BPF_RB_PROD_POS = 3,
};


enum {
 BPF_RINGBUF_BUSY_BIT = (1U << 31),
 BPF_RINGBUF_DISCARD_BIT = (1U << 30),
 BPF_RINGBUF_HDR_SZ = 8,
};


enum {
 BPF_SK_LOOKUP_F_REPLACE = (1ULL << 0),
 BPF_SK_LOOKUP_F_NO_REUSEPORT = (1ULL << 1),
};


enum bpf_adj_room_mode {
 BPF_ADJ_ROOM_NET,
 BPF_ADJ_ROOM_MAC,
};


enum bpf_hdr_start_off {
 BPF_HDR_START_MAC,
 BPF_HDR_START_NET,
};


enum bpf_lwt_encap_mode {
 BPF_LWT_ENCAP_SEG6,
 BPF_LWT_ENCAP_SEG6_INLINE,
 BPF_LWT_ENCAP_IP,
};


enum {
 BPF_F_BPRM_SECUREEXEC = (1ULL << 0),
};


enum {
 BPF_F_BROADCAST = (1ULL << 3),
 BPF_F_EXCLUDE_INGRESS = (1ULL << 4),
};







enum {
 BPF_SKB_TSTAMP_UNSPEC,
 BPF_SKB_TSTAMP_DELIVERY_MONO,




};




struct __sk_buff {
 __u32 len;
 __u32 pkt_type;
 __u32 mark;
 __u32 queue_mapping;
 __u32 protocol;
 __u32 vlan_present;
 __u32 vlan_tci;
 __u32 vlan_proto;
 __u32 priority;
 __u32 ingress_ifindex;
 __u32 ifindex;
 __u32 tc_index;
 __u32 cb[5];
 __u32 hash;
 __u32 tc_classid;
 __u32 data;
 __u32 data_end;
 __u32 napi_id;


 __u32 family;
 __u32 remote_ip4;
 __u32 local_ip4;
 __u32 remote_ip6[4];
 __u32 local_ip6[4];
 __u32 remote_port;
 __u32 local_port;


 __u32 data_meta;
 union { struct bpf_flow_keys * flow_keys; __u64 :64; } __attribute__((aligned(8)));
 __u64 tstamp;
 __u32 wire_len;
 __u32 gso_segs;
 union { struct bpf_sock * sk; __u64 :64; } __attribute__((aligned(8)));
 __u32 gso_size;
 __u8 tstamp_type;
 __u32 :24;
 __u64 hwtstamp;
};

struct bpf_tunnel_key {
 __u32 tunnel_id;
 union {
  __u32 remote_ipv4;
  __u32 remote_ipv6[4];
 };
 __u8 tunnel_tos;
 __u8 tunnel_ttl;
 union {
  __u16 tunnel_ext;
  __be16 tunnel_flags;
 };
 __u32 tunnel_label;
 union {
  __u32 local_ipv4;
  __u32 local_ipv6[4];
 };
};




struct bpf_xfrm_state {
 __u32 reqid;
 __u32 spi;
 __u16 family;
 __u16 ext;
 union {
  __u32 remote_ipv4;
  __u32 remote_ipv6[4];
 };
};
# 6158 "/var/lib/cilium/bpf/include/linux/bpf.h"
enum bpf_ret_code {
 BPF_OK = 0,

 BPF_DROP = 2,

 BPF_REDIRECT = 7,
# 6172 "/var/lib/cilium/bpf/include/linux/bpf.h"
 BPF_LWT_REROUTE = 128,




 BPF_FLOW_DISSECTOR_CONTINUE = 129,
};

struct bpf_sock {
 __u32 bound_dev_if;
 __u32 family;
 __u32 type;
 __u32 protocol;
 __u32 mark;
 __u32 priority;

 __u32 src_ip4;
 __u32 src_ip6[4];
 __u32 src_port;
 __be16 dst_port;
 __u16 :16;
 __u32 dst_ip4;
 __u32 dst_ip6[4];
 __u32 state;
 __s32 rx_queue_mapping;
};

struct bpf_tcp_sock {
 __u32 snd_cwnd;
 __u32 srtt_us;
 __u32 rtt_min;
 __u32 snd_ssthresh;
 __u32 rcv_nxt;
 __u32 snd_nxt;
 __u32 snd_una;
 __u32 mss_cache;
 __u32 ecn_flags;
 __u32 rate_delivered;
 __u32 rate_interval_us;
 __u32 packets_out;
 __u32 retrans_out;
 __u32 total_retrans;
 __u32 segs_in;


 __u32 data_segs_in;


 __u32 segs_out;


 __u32 data_segs_out;


 __u32 lost_out;
 __u32 sacked_out;
 __u64 bytes_received;



 __u64 bytes_acked;



 __u32 dsack_dups;


 __u32 delivered;
 __u32 delivered_ce;
 __u32 icsk_retransmits;
};

struct bpf_sock_tuple {
 union {
  struct {
   __be32 saddr;
   __be32 daddr;
   __be16 sport;
   __be16 dport;
  } ipv4;
  struct {
   __be32 saddr[4];
   __be32 daddr[4];
   __be16 sport;
   __be16 dport;
  } ipv6;
 };
};







enum tcx_action_base {
 TCX_NEXT = -1,
 TCX_PASS = 0,
 TCX_DROP = 2,
 TCX_REDIRECT = 7,
};

struct bpf_xdp_sock {
 __u32 queue_id;
};
# 6285 "/var/lib/cilium/bpf/include/linux/bpf.h"
enum xdp_action {
 XDP_ABORTED = 0,
 XDP_DROP,
 XDP_PASS,
 XDP_TX,
 XDP_REDIRECT,
};




struct xdp_md {
 __u32 data;
 __u32 data_end;
 __u32 data_meta;

 __u32 ingress_ifindex;
 __u32 rx_queue_index;

 __u32 egress_ifindex;
};






struct bpf_devmap_val {
 __u32 ifindex;
 union {
  int fd;
  __u32 id;
 } bpf_prog;
};






struct bpf_cpumap_val {
 __u32 qsize;
 union {
  int fd;
  __u32 id;
 } bpf_prog;
};

enum sk_action {
 SK_DROP = 0,
 SK_PASS,
};




struct sk_msg_md {
 union { void * data; __u64 :64; } __attribute__((aligned(8)));
 union { void * data_end; __u64 :64; } __attribute__((aligned(8)));

 __u32 family;
 __u32 remote_ip4;
 __u32 local_ip4;
 __u32 remote_ip6[4];
 __u32 local_ip6[4];
 __u32 remote_port;
 __u32 local_port;
 __u32 size;

 union { struct bpf_sock * sk; __u64 :64; } __attribute__((aligned(8)));
};

struct sk_reuseport_md {




 union { void * data; __u64 :64; } __attribute__((aligned(8)));

 union { void * data_end; __u64 :64; } __attribute__((aligned(8)));






 __u32 len;




 __u32 eth_protocol;
 __u32 ip_protocol;
 __u32 bind_inany;
 __u32 hash;
# 6392 "/var/lib/cilium/bpf/include/linux/bpf.h"
 union { struct bpf_sock * sk; __u64 :64; } __attribute__((aligned(8)));
 union { struct bpf_sock * migrating_sk; __u64 :64; } __attribute__((aligned(8)));
};



struct bpf_prog_info {
 __u32 type;
 __u32 id;
 __u8 tag[8];
 __u32 jited_prog_len;
 __u32 xlated_prog_len;
 __aligned_u64 jited_prog_insns;
 __aligned_u64 xlated_prog_insns;
 __u64 load_time;
 __u32 created_by_uid;
 __u32 nr_map_ids;
 __aligned_u64 map_ids;
 char name[16U];
 __u32 ifindex;
 __u32 gpl_compatible:1;
 __u32 :31;
 __u64 netns_dev;
 __u64 netns_ino;
 __u32 nr_jited_ksyms;
 __u32 nr_jited_func_lens;
 __aligned_u64 jited_ksyms;
 __aligned_u64 jited_func_lens;
 __u32 btf_id;
 __u32 func_info_rec_size;
 __aligned_u64 func_info;
 __u32 nr_func_info;
 __u32 nr_line_info;
 __aligned_u64 line_info;
 __aligned_u64 jited_line_info;
 __u32 nr_jited_line_info;
 __u32 line_info_rec_size;
 __u32 jited_line_info_rec_size;
 __u32 nr_prog_tags;
 __aligned_u64 prog_tags;
 __u64 run_time_ns;
 __u64 run_cnt;
 __u64 recursion_misses;
 __u32 verified_insns;
 __u32 attach_btf_obj_id;
 __u32 attach_btf_id;
} __attribute__((aligned(8)));

struct bpf_map_info {
 __u32 type;
 __u32 id;
 __u32 key_size;
 __u32 value_size;
 __u32 max_entries;
 __u32 map_flags;
 char name[16U];
 __u32 ifindex;
 __u32 btf_vmlinux_value_type_id;
 __u64 netns_dev;
 __u64 netns_ino;
 __u32 btf_id;
 __u32 btf_key_type_id;
 __u32 btf_value_type_id;
 __u32 :32;
 __u64 map_extra;
} __attribute__((aligned(8)));

struct bpf_btf_info {
 __aligned_u64 btf;
 __u32 btf_size;
 __u32 id;
 __aligned_u64 name;
 __u32 name_len;
 __u32 kernel_btf;
} __attribute__((aligned(8)));

struct bpf_link_info {
 __u32 type;
 __u32 id;
 __u32 prog_id;
 union {
  struct {
   __aligned_u64 tp_name;
   __u32 tp_name_len;
  } raw_tracepoint;
  struct {
   __u32 attach_type;
   __u32 target_obj_id;
   __u32 target_btf_id;
  } tracing;
  struct {
   __u64 cgroup_id;
   __u32 attach_type;
  } cgroup;
  struct {
   __aligned_u64 target_name;
   __u32 target_name_len;





   union {
    struct {
     __u32 map_id;
    } map;
   };
   union {
    struct {
     __u64 cgroup_id;
     __u32 order;
    } cgroup;
    struct {
     __u32 tid;
     __u32 pid;
    } task;
   };
  } iter;
  struct {
   __u32 netns_ino;
   __u32 attach_type;
  } netns;
  struct {
   __u32 ifindex;
  } xdp;
  struct {
   __u32 map_id;
  } struct_ops;
  struct {
   __u32 pf;
   __u32 hooknum;
   __s32 priority;
   __u32 flags;
  } netfilter;
  struct {
   __aligned_u64 addrs;
   __u32 count;
   __u32 flags;
  } kprobe_multi;
  struct {
   __u32 type;
   __u32 :32;
   union {
    struct {
     __aligned_u64 file_name;
     __u32 name_len;
     __u32 offset;
    } uprobe;
    struct {
     __aligned_u64 func_name;
     __u32 name_len;
     __u32 offset;
     __u64 addr;
    } kprobe;
    struct {
     __aligned_u64 tp_name;
     __u32 name_len;
    } tracepoint;
    struct {
     __u64 config;
     __u32 type;
    } event;
   };
  } perf_event;
  struct {
   __u32 ifindex;
   __u32 attach_type;
  } tcx;
 };
} __attribute__((aligned(8)));





struct bpf_sock_addr {
 __u32 user_family;
 __u32 user_ip4;


 __u32 user_ip6[4];


 __u32 user_port;


 __u32 family;
 __u32 type;
 __u32 protocol;
 __u32 msg_src_ip4;


 __u32 msg_src_ip6[4];


 union { struct bpf_sock * sk; __u64 :64; } __attribute__((aligned(8)));
};







struct bpf_sock_ops {
 __u32 op;
 union {
  __u32 args[4];
  __u32 reply;
  __u32 replylong[4];
 };
 __u32 family;
 __u32 remote_ip4;
 __u32 local_ip4;
 __u32 remote_ip6[4];
 __u32 local_ip6[4];
 __u32 remote_port;
 __u32 local_port;
 __u32 is_fullsock;



 __u32 snd_cwnd;
 __u32 srtt_us;
 __u32 bpf_sock_ops_cb_flags;
 __u32 state;
 __u32 rtt_min;
 __u32 snd_ssthresh;
 __u32 rcv_nxt;
 __u32 snd_nxt;
 __u32 snd_una;
 __u32 mss_cache;
 __u32 ecn_flags;
 __u32 rate_delivered;
 __u32 rate_interval_us;
 __u32 packets_out;
 __u32 retrans_out;
 __u32 total_retrans;
 __u32 segs_in;
 __u32 data_segs_in;
 __u32 segs_out;
 __u32 data_segs_out;
 __u32 lost_out;
 __u32 sacked_out;
 __u32 sk_txhash;
 __u64 bytes_received;
 __u64 bytes_acked;
 union { struct bpf_sock * sk; __u64 :64; } __attribute__((aligned(8)));
# 6654 "/var/lib/cilium/bpf/include/linux/bpf.h"
 union { void * skb_data; __u64 :64; } __attribute__((aligned(8)));
 union { void * skb_data_end; __u64 :64; } __attribute__((aligned(8)));
 __u32 skb_len;



 __u32 skb_tcp_flags;
# 6670 "/var/lib/cilium/bpf/include/linux/bpf.h"
 __u64 skb_hwtstamp;
};


enum {
 BPF_SOCK_OPS_RTO_CB_FLAG = (1<<0),
 BPF_SOCK_OPS_RETRANS_CB_FLAG = (1<<1),
 BPF_SOCK_OPS_STATE_CB_FLAG = (1<<2),
 BPF_SOCK_OPS_RTT_CB_FLAG = (1<<3),
# 6697 "/var/lib/cilium/bpf/include/linux/bpf.h"
 BPF_SOCK_OPS_PARSE_ALL_HDR_OPT_CB_FLAG = (1<<4),
# 6706 "/var/lib/cilium/bpf/include/linux/bpf.h"
 BPF_SOCK_OPS_PARSE_UNKNOWN_HDR_OPT_CB_FLAG = (1<<5),
# 6721 "/var/lib/cilium/bpf/include/linux/bpf.h"
 BPF_SOCK_OPS_WRITE_HDR_OPT_CB_FLAG = (1<<6),

 BPF_SOCK_OPS_ALL_CB_FLAGS = 0x7F,
};




enum {
 BPF_SOCK_OPS_VOID,
 BPF_SOCK_OPS_TIMEOUT_INIT,


 BPF_SOCK_OPS_RWND_INIT,



 BPF_SOCK_OPS_TCP_CONNECT_CB,


 BPF_SOCK_OPS_ACTIVE_ESTABLISHED_CB,



 BPF_SOCK_OPS_PASSIVE_ESTABLISHED_CB,



 BPF_SOCK_OPS_NEEDS_ECN,


 BPF_SOCK_OPS_BASE_RTT,






 BPF_SOCK_OPS_RTO_CB,




 BPF_SOCK_OPS_RETRANS_CB,





 BPF_SOCK_OPS_STATE_CB,



 BPF_SOCK_OPS_TCP_LISTEN_CB,


 BPF_SOCK_OPS_RTT_CB,

 BPF_SOCK_OPS_PARSE_HDR_OPT_CB,
# 6793 "/var/lib/cilium/bpf/include/linux/bpf.h"
 BPF_SOCK_OPS_HDR_OPT_LEN_CB,
# 6810 "/var/lib/cilium/bpf/include/linux/bpf.h"
 BPF_SOCK_OPS_WRITE_HDR_OPT_CB,
# 6836 "/var/lib/cilium/bpf/include/linux/bpf.h"
};






enum {
 BPF_TCP_ESTABLISHED = 1,
 BPF_TCP_SYN_SENT,
 BPF_TCP_SYN_RECV,
 BPF_TCP_FIN_WAIT1,
 BPF_TCP_FIN_WAIT2,
 BPF_TCP_TIME_WAIT,
 BPF_TCP_CLOSE,
 BPF_TCP_CLOSE_WAIT,
 BPF_TCP_LAST_ACK,
 BPF_TCP_LISTEN,
 BPF_TCP_CLOSING,
 BPF_TCP_NEW_SYN_RECV,

 BPF_TCP_MAX_STATES
};

enum {
 TCP_BPF_IW = 1001,
 TCP_BPF_SNDCWND_CLAMP = 1002,
 TCP_BPF_DELACK_MAX = 1003,
 TCP_BPF_RTO_MIN = 1004,
# 6897 "/var/lib/cilium/bpf/include/linux/bpf.h"
 TCP_BPF_SYN = 1005,
 TCP_BPF_SYN_IP = 1006,
 TCP_BPF_SYN_MAC = 1007,
};

enum {
 BPF_LOAD_HDR_OPT_TCP_SYN = (1ULL << 0),
};




enum {
 BPF_WRITE_HDR_TCP_CURRENT_MSS = 1,






 BPF_WRITE_HDR_TCP_SYNACK_COOKIE = 2,


};

struct bpf_perf_event_value {
 __u64 counter;
 __u64 enabled;
 __u64 running;
};

enum {
 BPF_DEVCG_ACC_MKNOD = (1ULL << 0),
 BPF_DEVCG_ACC_READ = (1ULL << 1),
 BPF_DEVCG_ACC_WRITE = (1ULL << 2),
};

enum {
 BPF_DEVCG_DEV_BLOCK = (1ULL << 0),
 BPF_DEVCG_DEV_CHAR = (1ULL << 1),
};

struct bpf_cgroup_dev_ctx {

 __u32 access_type;
 __u32 major;
 __u32 minor;
};

struct bpf_raw_tracepoint_args {
 __u64 args[0];
};




enum {
 BPF_FIB_LOOKUP_DIRECT = (1U << 0),
 BPF_FIB_LOOKUP_OUTPUT = (1U << 1),
 BPF_FIB_LOOKUP_SKIP_NEIGH = (1U << 2),
 BPF_FIB_LOOKUP_TBID = (1U << 3),
};

enum {
 BPF_FIB_LKUP_RET_SUCCESS,
 BPF_FIB_LKUP_RET_BLACKHOLE,
 BPF_FIB_LKUP_RET_UNREACHABLE,
 BPF_FIB_LKUP_RET_PROHIBIT,
 BPF_FIB_LKUP_RET_NOT_FWDED,
 BPF_FIB_LKUP_RET_FWD_DISABLED,
 BPF_FIB_LKUP_RET_UNSUPP_LWT,
 BPF_FIB_LKUP_RET_NO_NEIGH,
 BPF_FIB_LKUP_RET_FRAG_NEEDED,
};

struct bpf_fib_lookup {



 __u8 family;


 __u8 l4_protocol;
 __be16 sport;
 __be16 dport;

 union {

  __u16 tot_len;


  __u16 mtu_result;
 };



 __u32 ifindex;

 union {

  __u8 tos;
  __be32 flowinfo;


  __u32 rt_metric;
 };

 union {
  __be32 ipv4_src;
  __u32 ipv6_src[4];
 };





 union {
  __be32 ipv4_dst;
  __u32 ipv6_dst[4];
 };

 union {
  struct {

   __be16 h_vlan_proto;
   __be16 h_vlan_TCI;
  };




  __u32 tbid;
 };

 __u8 smac[6];
 __u8 dmac[6];
};

struct bpf_redir_neigh {

 __u32 nh_family;

 union {
  __be32 ipv4_nh;
  __u32 ipv6_nh[4];
 };
};


enum bpf_check_mtu_flags {
 BPF_MTU_CHK_SEGS = (1U << 0),
};

enum bpf_check_mtu_ret {
 BPF_MTU_CHK_RET_SUCCESS,
 BPF_MTU_CHK_RET_FRAG_NEEDED,
 BPF_MTU_CHK_RET_SEGS_TOOBIG,
};

enum bpf_task_fd_type {
 BPF_FD_TYPE_RAW_TRACEPOINT,
 BPF_FD_TYPE_TRACEPOINT,
 BPF_FD_TYPE_KPROBE,
 BPF_FD_TYPE_KRETPROBE,
 BPF_FD_TYPE_UPROBE,
 BPF_FD_TYPE_URETPROBE,
};

enum {
 BPF_FLOW_DISSECTOR_F_PARSE_1ST_FRAG = (1U << 0),
 BPF_FLOW_DISSECTOR_F_STOP_AT_FLOW_LABEL = (1U << 1),
 BPF_FLOW_DISSECTOR_F_STOP_AT_ENCAP = (1U << 2),
};

struct bpf_flow_keys {
 __u16 nhoff;
 __u16 thoff;
 __u16 addr_proto;
 __u8 is_frag;
 __u8 is_first_frag;
 __u8 is_encap;
 __u8 ip_proto;
 __be16 n_proto;
 __be16 sport;
 __be16 dport;
 union {
  struct {
   __be32 ipv4_src;
   __be32 ipv4_dst;
  };
  struct {
   __u32 ipv6_src[4];
   __u32 ipv6_dst[4];
  };
 };
 __u32 flags;
 __be32 flow_label;
};

struct bpf_func_info {
 __u32 insn_off;
 __u32 type_id;
};




struct bpf_line_info {
 __u32 insn_off;
 __u32 file_name_off;
 __u32 line_off;
 __u32 line_col;
};

struct bpf_spin_lock {
 __u32 val;
};

struct bpf_timer {
 __u64 :64;
 __u64 :64;
} __attribute__((aligned(8)));

struct bpf_dynptr {
 __u64 :64;
 __u64 :64;
} __attribute__((aligned(8)));

struct bpf_list_head {
 __u64 :64;
 __u64 :64;
} __attribute__((aligned(8)));

struct bpf_list_node {
 __u64 :64;
 __u64 :64;
 __u64 :64;
} __attribute__((aligned(8)));

struct bpf_rb_root {
 __u64 :64;
 __u64 :64;
} __attribute__((aligned(8)));

struct bpf_rb_node {
 __u64 :64;
 __u64 :64;
 __u64 :64;
 __u64 :64;
} __attribute__((aligned(8)));

struct bpf_refcount {
 __u32 :32;
} __attribute__((aligned(4)));

struct bpf_sysctl {
 __u32 write;


 __u32 file_pos;


};

struct bpf_sockopt {
 union { struct bpf_sock * sk; __u64 :64; } __attribute__((aligned(8)));
 union { void * optval; __u64 :64; } __attribute__((aligned(8)));
 union { void * optval_end; __u64 :64; } __attribute__((aligned(8)));

 __s32 level;
 __s32 optname;
 __s32 optlen;
 __s32 retval;
};

struct bpf_pidns_info {
 __u32 pid;
 __u32 tgid;
};


struct bpf_sk_lookup {
 union {
  union { struct bpf_sock * sk; __u64 :64; } __attribute__((aligned(8)));
  __u64 cookie;
 };

 __u32 family;
 __u32 protocol;
 __u32 remote_ip4;
 __u32 remote_ip6[4];
 __be16 remote_port;
 __u16 :16;
 __u32 local_ip4;
 __u32 local_ip6[4];
 __u32 local_port;
 __u32 ingress_ifindex;
};
# 7204 "/var/lib/cilium/bpf/include/linux/bpf.h"
struct btf_ptr {
 void *ptr;
 __u32 type_id;
 __u32 flags;
};
# 7219 "/var/lib/cilium/bpf/include/linux/bpf.h"
enum {
 BTF_F_COMPACT = (1ULL << 0),
 BTF_F_NONAME = (1ULL << 1),
 BTF_F_PTR_RAW = (1ULL << 2),
 BTF_F_ZERO = (1ULL << 3),
};





enum bpf_core_relo_kind {
 BPF_CORE_FIELD_BYTE_OFFSET = 0,
 BPF_CORE_FIELD_BYTE_SIZE = 1,
 BPF_CORE_FIELD_EXISTS = 2,
 BPF_CORE_FIELD_SIGNED = 3,
 BPF_CORE_FIELD_LSHIFT_U64 = 4,
 BPF_CORE_FIELD_RSHIFT_U64 = 5,
 BPF_CORE_TYPE_ID_LOCAL = 6,
 BPF_CORE_TYPE_ID_TARGET = 7,
 BPF_CORE_TYPE_EXISTS = 8,
 BPF_CORE_TYPE_SIZE = 9,
 BPF_CORE_ENUMVAL_EXISTS = 10,
 BPF_CORE_ENUMVAL_VALUE = 11,
 BPF_CORE_TYPE_MATCHES = 12,
};
# 7294 "/var/lib/cilium/bpf/include/linux/bpf.h"
struct bpf_core_relo {
 __u32 insn_off;
 __u32 type_id;
 __u32 access_str_off;
 enum bpf_core_relo_kind kind;
};






enum {
 BPF_F_TIMER_ABS = (1ULL << 0),
};


struct bpf_iter_num {



 __u64 __opaque[1];
} __attribute__((aligned(8)));
# 8 "/var/lib/cilium/bpf/include/bpf/ctx/common.h" 2

# 1 "/var/lib/cilium/bpf/include/bpf/ctx/../compiler.h" 1





# 1 "/var/lib/cilium/bpf/include/bpf/ctx/../stddef.h" 1
# 12 "/var/lib/cilium/bpf/include/bpf/ctx/../stddef.h"
enum {
 false = 0,
 true = 1,
};
# 7 "/var/lib/cilium/bpf/include/bpf/ctx/../compiler.h" 2
# 75 "/var/lib/cilium/bpf/include/bpf/ctx/../compiler.h"
static inline __attribute__((always_inline)) void bpf_barrier(void)
{




 asm volatile("": : :"memory");
}
# 10 "/var/lib/cilium/bpf/include/bpf/ctx/common.h" 2
# 1 "/var/lib/cilium/bpf/include/bpf/ctx/../errno.h" 1
# 11 "/var/lib/cilium/bpf/include/bpf/ctx/common.h" 2




static inline __attribute__((always_inline)) _Bool ctx_no_room(const void *needed, const void *limit)
{
 return __builtin_expect(!!(needed > limit), 0);
}

static inline __attribute__((always_inline)) _Bool ctx_is_skb(void)
{
 return 1 == 1;
}

static inline __attribute__((always_inline)) _Bool ctx_is_xdp(void)
{
 return 1 == 2;
}
# 12 "/var/lib/cilium/bpf/include/bpf/ctx/skb.h" 2
# 1 "/var/lib/cilium/bpf/include/bpf/ctx/../helpers_skb.h" 1








# 1 "/var/lib/cilium/bpf/include/bpf/ctx/../helpers.h" 1







# 1 "/var/lib/cilium/bpf/include/bpf/ctx/../ctx/ctx.h" 1
# 9 "/var/lib/cilium/bpf/include/bpf/ctx/../helpers.h" 2
# 33 "/var/lib/cilium/bpf/include/bpf/ctx/../helpers.h"
static void *(* map_lookup_elem)(const void *map, const void *key) __attribute__((__unused__)) = (void *)BPF_FUNC_map_lookup_elem;
static int (* map_update_elem)(const void *map, const void *key, const void *value, __u32 flags) __attribute__((__unused__)) = (void *)BPF_FUNC_map_update_elem;

static int (* map_delete_elem)(const void *map, const void *key) __attribute__((__unused__)) = (void *)BPF_FUNC_map_delete_elem;
static void *(* map_lookup_percpu_elem)(void *map, const void *key, unsigned int cpu) __attribute__((__unused__)) = (void *)BPF_FUNC_map_lookup_percpu_elem;

static long (* for_each_map_elem)(void *map, void *callback_fn, void *callback_ctx, __u64 flags) __attribute__((__unused__)) = (void *)BPF_FUNC_for_each_map_elem;



static __u64 (* ktime_get_ns)() __attribute__((__unused__)) = (void *)BPF_FUNC_ktime_get_ns;
static __u64 (* ktime_get_boot_ns)() __attribute__((__unused__)) = (void *)BPF_FUNC_ktime_get_boot_ns;
static __u64 (* jiffies64)() __attribute__((__unused__)) = (void *)BPF_FUNC_jiffies64;



static __sock_cookie (* get_socket_cookie)(void *ctx) __attribute__((__unused__)) = (void *)BPF_FUNC_get_socket_cookie;
static __net_cookie (* get_netns_cookie)(void *ctx) __attribute__((__unused__)) = (void *)BPF_FUNC_get_netns_cookie;


static __u32 (* get_cgroup_classid)() __attribute__((__unused__)) = (void *)BPF_FUNC_get_cgroup_classid;


static __attribute__((__format__(printf, 1, 3))) void
(* trace_printk)(const char *fmt, int fmt_size, ...) __attribute__((__unused__)) = (void *)BPF_FUNC_trace_printk;


static __u32 (* get_prandom_u32)() __attribute__((__unused__)) = (void *)BPF_FUNC_get_prandom_u32;


static int (* csum_diff_external)(const void *from, __u32 size_from, const void *to, __u32 size_to, __u32 seed) __attribute__((__unused__)) =

 (void *)BPF_FUNC_csum_diff;


static void (* tail_call)(void *ctx, const void *map, __u32 index) __attribute__((__unused__)) = (void *)BPF_FUNC_tail_call;


static __u32 (* get_smp_processor_id)() __attribute__((__unused__)) = (void *)BPF_FUNC_get_smp_processor_id;





struct bpf_fib_lookup_padded {
 struct bpf_fib_lookup l;
 __u8 pad[2];
};


static int (* fib_lookup)(void *ctx, struct bpf_fib_lookup *params, __u32 plen, __u32 flags) __attribute__((__unused__)) = (void *)BPF_FUNC_fib_lookup;



static struct bpf_sock *(* sk_lookup_tcp)(void *ctx, struct bpf_sock_tuple *tuple, __u32 tuple_size, __u64 netns, __u64 flags) __attribute__((__unused__)) = (void *)BPF_FUNC_sk_lookup_tcp;


static struct bpf_sock *(* sk_lookup_udp)(void *ctx, struct bpf_sock_tuple *tuple, __u32 tuple_size, __u64 netns, __u64 flags) __attribute__((__unused__)) = (void *)BPF_FUNC_sk_lookup_udp;







static int (* get_socket_opt)(void *ctx, int level, int optname, void *optval, int optlen) __attribute__((__unused__)) =

 (void *)BPF_FUNC_getsockopt;

static __u64 (* get_current_cgroup_id)() __attribute__((__unused__)) = (void *)BPF_FUNC_get_current_cgroup_id;

static int (* set_retval)(int retval) __attribute__((__unused__)) = (void *)BPF_FUNC_set_retval;

static inline int try_set_retval(int retval __attribute__((__unused__)))
{



 return 0;

}

static long (* loop)(__u32 nr_loops, void *callback_fn, void *callback_ctx, __u64 flags) __attribute__((__unused__)) = (void *)BPF_FUNC_loop;

static void *(* ringbuf_reserve)(void *ringbuf, __u64 size, __u64 flags) __attribute__((__unused__)) = (void *)BPF_FUNC_ringbuf_reserve;
static void (* ringbuf_submit)(void *data, __u64 flags) __attribute__((__unused__)) = (void *)BPF_FUNC_ringbuf_submit;
static void (* ringbuf_discard)(void *data, __u64 flags) __attribute__((__unused__)) = (void *)BPF_FUNC_ringbuf_discard;
# 10 "/var/lib/cilium/bpf/include/bpf/ctx/../helpers_skb.h" 2
# 1 "/var/lib/cilium/bpf/include/bpf/ctx/../features_skb.h" 1







# 1 "/var/lib/cilium/bpf/include/bpf/ctx/../features.h" 1
# 9 "/var/lib/cilium/bpf/include/bpf/ctx/../features_skb.h" 2
# 11 "/var/lib/cilium/bpf/include/bpf/ctx/../helpers_skb.h" 2




static int (* get_hash_recalc)(struct __sk_buff *skb) __attribute__((__unused__)) = (void *)BPF_FUNC_get_hash_recalc;


static int (* redirect)(int ifindex, __u32 flags) __attribute__((__unused__)) = (void *)BPF_FUNC_redirect;
static int (* redirect_neigh)(int ifindex, struct bpf_redir_neigh *params, int plen, __u32 flags) __attribute__((__unused__)) = (void *)BPF_FUNC_redirect_neigh;

static int (* redirect_peer)(int ifindex, __u32 flags) __attribute__((__unused__)) = (void *)BPF_FUNC_redirect_peer;
static int (* clone_redirect)(struct __sk_buff *skb, __u32 ifindex, __u64 flags) __attribute__((__unused__)) = (void *)BPF_FUNC_clone_redirect;


static int (* skb_load_bytes)(struct __sk_buff *skb, __u32 off, void *to, __u32 len) __attribute__((__unused__)) = (void *)BPF_FUNC_skb_load_bytes;

static int (* skb_store_bytes)(struct __sk_buff *skb, __u32 off, const void *from, __u32 len, __u32 flags) __attribute__((__unused__)) = (void *)BPF_FUNC_skb_store_bytes;


static int (* l3_csum_replace)(struct __sk_buff *skb, __u32 off, __u32 from, __u32 to, __u32 flags) __attribute__((__unused__)) = (void *)BPF_FUNC_l3_csum_replace;

static int (* l4_csum_replace)(struct __sk_buff *skb, __u32 off, __u32 from, __u32 to, __u32 flags) __attribute__((__unused__)) = (void *)BPF_FUNC_l4_csum_replace;


static int (* skb_adjust_room)(struct __sk_buff *skb, __s32 len_diff, __u32 mode, __u64 flags) __attribute__((__unused__)) = (void *)BPF_FUNC_skb_adjust_room;


static int (* skb_change_type)(struct __sk_buff *skb, __u32 type) __attribute__((__unused__)) = (void *)BPF_FUNC_skb_change_type;
static int (* skb_change_proto)(struct __sk_buff *skb, __u32 proto, __u32 flags) __attribute__((__unused__)) = (void *)BPF_FUNC_skb_change_proto;

static int (* skb_change_tail)(struct __sk_buff *skb, __u32 nlen, __u32 flags) __attribute__((__unused__)) = (void *)BPF_FUNC_skb_change_tail;

static int (* skb_change_head)(struct __sk_buff *skb, __u32 head_room, __u64 flags) __attribute__((__unused__)) = (void *)BPF_FUNC_skb_change_head;


static int (* skb_pull_data)(struct __sk_buff *skb, __u32 len) __attribute__((__unused__)) = (void *)BPF_FUNC_skb_pull_data;


static int (* skb_get_tunnel_key)(struct __sk_buff *skb, struct bpf_tunnel_key *to, __u32 size, __u32 flags) __attribute__((__unused__)) = (void *)BPF_FUNC_skb_get_tunnel_key;

static int (* skb_set_tunnel_key)(struct __sk_buff *skb, const struct bpf_tunnel_key *from, __u32 size, __u32 flags) __attribute__((__unused__)) = (void *)BPF_FUNC_skb_set_tunnel_key;


static int (* skb_get_tunnel_opt)(struct __sk_buff *skb, void *opt, __u32 size) __attribute__((__unused__)) = (void *)BPF_FUNC_skb_get_tunnel_opt;

static int (* skb_set_tunnel_opt)(struct __sk_buff *skb, void *opt, __u32 size) __attribute__((__unused__)) = (void *)BPF_FUNC_skb_set_tunnel_opt;



static int (* skb_event_output)(struct __sk_buff *skb, void *map, __u64 index, const void *data, __u32 size) __attribute__((__unused__)) =

    (void *)BPF_FUNC_perf_event_output;


static struct bpf_sock *(* skc_lookup_tcp)(struct __sk_buff *skb, struct bpf_sock_tuple *tuple, __u32 tuple_size, __u64 netns, __u64 flags) __attribute__((__unused__)) = (void *)BPF_FUNC_skc_lookup_tcp;


static int (* sk_release)(struct bpf_sock *sk) __attribute__((__unused__)) = (void *)BPF_FUNC_sk_release;
static int (* sk_assign)(struct __sk_buff *skb, struct bpf_sock *sk, __u64 flags) __attribute__((__unused__)) = (void *)BPF_FUNC_sk_assign;
# 13 "/var/lib/cilium/bpf/include/bpf/ctx/skb.h" 2
# 81 "/var/lib/cilium/bpf/include/bpf/ctx/skb.h"
static inline __attribute__((always_inline)) void * ctx_data(const struct __sk_buff *ctx) { void *ptr; asm volatile("%0 = *(u32 *)(%1 + %2)" : "=r"(ptr) : "r"(ctx), "i"(__builtin_offsetof(struct __sk_buff, data))); return ptr; }

static inline __attribute__((always_inline)) void * ctx_data_end(const struct __sk_buff *ctx) { void *ptr; asm volatile("%0 = *(u32 *)(%1 + %2)" : "=r"(ptr) : "r"(ctx), "i"(__builtin_offsetof(struct __sk_buff, data_end))); return ptr; }

static inline __attribute__((always_inline)) void * ctx_data_meta(const struct __sk_buff *ctx) { void *ptr; asm volatile("%0 = *(u32 *)(%1 + %2)" : "=r"(ptr) : "r"(ctx), "i"(__builtin_offsetof(struct __sk_buff, data_meta))); return ptr; }


static inline __attribute__((always_inline)) __attribute__((__unused__)) int
ctx_redirect(const struct __sk_buff *ctx __attribute__((__unused__)), int ifindex, __u32 flags)
{
 return redirect(ifindex, flags);
}

static inline __attribute__((always_inline)) __attribute__((__unused__)) int
ctx_redirect_peer(const struct __sk_buff *ctx __attribute__((__unused__)), int ifindex, __u32 flags)
{
 return redirect_peer(ifindex, flags);
}

static inline __attribute__((always_inline)) __attribute__((__unused__)) int
ctx_adjust_troom(struct __sk_buff *ctx, const __s32 len_diff)
{
 return skb_change_tail(ctx, ctx->len + len_diff, 0);
}

static inline __attribute__((always_inline)) __attribute__((__unused__)) __u64
ctx_full_len(const struct __sk_buff *ctx)
{
 return ctx->len;
}

static inline __attribute__((always_inline)) __attribute__((__unused__)) __u32
ctx_wire_len(const struct __sk_buff *ctx)
{
 return ctx->wire_len;
}

static inline __attribute__((always_inline)) __attribute__((__unused__)) void
ctx_store_meta(struct __sk_buff *ctx, const __u32 off, __u32 data)
{
 ctx->cb[off] = data;
}

static inline __attribute__((always_inline)) __attribute__((__unused__)) __u32
ctx_load_meta(const struct __sk_buff *ctx, const __u32 off)
{
 return ctx->cb[off];
}

static inline __attribute__((always_inline)) __attribute__((__unused__)) __u32
ctx_load_and_clear_meta(struct __sk_buff *ctx, const __u32 off)
{
 __u32 val = ctx_load_meta(ctx, off);

 ctx_store_meta(ctx, off, 0);
 return val;
}

static inline __attribute__((always_inline)) __attribute__((__unused__)) __u16
ctx_get_protocol(const struct __sk_buff *ctx)
{
 return (__u16)ctx->protocol;
}

static inline __attribute__((always_inline)) __attribute__((__unused__)) __u32
ctx_get_ifindex(const struct __sk_buff *ctx)
{
 return ctx->ifindex;
}

static inline __attribute__((always_inline)) __attribute__((__unused__)) __u32
ctx_get_ingress_ifindex(const struct __sk_buff *ctx)
{
 return ctx->ingress_ifindex;
}
# 5 "/var/lib/cilium/bpf/bpf_host.c" 2
# 1 "/var/lib/cilium/bpf/include/bpf/api.h" 1






# 1 "/var/lib/cilium/bpf/include/linux/byteorder.h" 1







# 1 "/var/lib/cilium/bpf/include/linux/byteorder/little_endian.h" 1
# 13 "/var/lib/cilium/bpf/include/linux/byteorder/little_endian.h"
# 1 "/var/lib/cilium/bpf/include/linux/swab.h" 1
# 45 "/var/lib/cilium/bpf/include/linux/swab.h"
static __inline__ __u16 __fswab16(__u16 val)
{





 return ((__u16)( (((__u16)(val) & (__u16)0x00ffU) << 8) | (((__u16)(val) & (__u16)0xff00U) >> 8)));

}

static __inline__ __u32 __fswab32(__u32 val)
{





 return ((__u32)( (((__u32)(val) & (__u32)0x000000ffUL) << 24) | (((__u32)(val) & (__u32)0x0000ff00UL) << 8) | (((__u32)(val) & (__u32)0x00ff0000UL) >> 8) | (((__u32)(val) & (__u32)0xff000000UL) >> 24)));

}

static __inline__ __u64 __fswab64(__u64 val)
{
# 78 "/var/lib/cilium/bpf/include/linux/swab.h"
 return ((__u64)( (((__u64)(val) & (__u64)0x00000000000000ffULL) << 56) | (((__u64)(val) & (__u64)0x000000000000ff00ULL) << 40) | (((__u64)(val) & (__u64)0x0000000000ff0000ULL) << 24) | (((__u64)(val) & (__u64)0x00000000ff000000ULL) << 8) | (((__u64)(val) & (__u64)0x000000ff00000000ULL) >> 8) | (((__u64)(val) & (__u64)0x0000ff0000000000ULL) >> 24) | (((__u64)(val) & (__u64)0x00ff000000000000ULL) >> 40) | (((__u64)(val) & (__u64)0xff00000000000000ULL) >> 56)));

}

static __inline__ __u32 __fswahw32(__u32 val)
{



 return ((__u32)( (((__u32)(val) & (__u32)0x0000ffffUL) << 16) | (((__u32)(val) & (__u32)0xffff0000UL) >> 16)));

}

static __inline__ __u32 __fswahb32(__u32 val)
{



 return ((__u32)( (((__u32)(val) & (__u32)0x00ff00ffUL) << 8) | (((__u32)(val) & (__u32)0xff00ff00UL) >> 8)));

}
# 153 "/var/lib/cilium/bpf/include/linux/swab.h"
static __inline__ __u16 __swab16p(const __u16 *p)
{



 return (__builtin_constant_p((__u16)(*p)) ? ((__u16)( (((__u16)(*p) & (__u16)0x00ffU) << 8) | (((__u16)(*p) & (__u16)0xff00U) >> 8))) : __fswab16(*p));

}





static __inline__ __u32 __swab32p(const __u32 *p)
{



 return (__builtin_constant_p((__u32)(*p)) ? ((__u32)( (((__u32)(*p) & (__u32)0x000000ffUL) << 24) | (((__u32)(*p) & (__u32)0x0000ff00UL) << 8) | (((__u32)(*p) & (__u32)0x00ff0000UL) >> 8) | (((__u32)(*p) & (__u32)0xff000000UL) >> 24))) : __fswab32(*p));

}





static __inline__ __u64 __swab64p(const __u64 *p)
{



 return (__builtin_constant_p((__u64)(*p)) ? ((__u64)( (((__u64)(*p) & (__u64)0x00000000000000ffULL) << 56) | (((__u64)(*p) & (__u64)0x000000000000ff00ULL) << 40) | (((__u64)(*p) & (__u64)0x0000000000ff0000ULL) << 24) | (((__u64)(*p) & (__u64)0x00000000ff000000ULL) << 8) | (((__u64)(*p) & (__u64)0x000000ff00000000ULL) >> 8) | (((__u64)(*p) & (__u64)0x0000ff0000000000ULL) >> 24) | (((__u64)(*p) & (__u64)0x00ff000000000000ULL) >> 40) | (((__u64)(*p) & (__u64)0xff00000000000000ULL) >> 56))) : __fswab64(*p));

}







static __inline__ __u32 __swahw32p(const __u32 *p)
{



 return (__builtin_constant_p((__u32)(*p)) ? ((__u32)( (((__u32)(*p) & (__u32)0x0000ffffUL) << 16) | (((__u32)(*p) & (__u32)0xffff0000UL) >> 16))) : __fswahw32(*p));

}







static __inline__ __u32 __swahb32p(const __u32 *p)
{



 return (__builtin_constant_p((__u32)(*p)) ? ((__u32)( (((__u32)(*p) & (__u32)0x00ff00ffUL) << 8) | (((__u32)(*p) & (__u32)0xff00ff00UL) >> 8))) : __fswahb32(*p));

}





static __inline__ void __swab16s(__u16 *p)
{



 *p = __swab16p(p);

}




static __inline__ void __swab32s(__u32 *p)
{



 *p = __swab32p(p);

}





static __inline__ void __swab64s(__u64 *p)
{



 *p = __swab64p(p);

}







static __inline__ void __swahw32s(__u32 *p)
{



 *p = __swahw32p(p);

}







static __inline__ void __swahb32s(__u32 *p)
{



 *p = __swahb32p(p);

}
# 14 "/var/lib/cilium/bpf/include/linux/byteorder/little_endian.h" 2
# 44 "/var/lib/cilium/bpf/include/linux/byteorder/little_endian.h"
static __inline__ __le64 __cpu_to_le64p(const __u64 *p)
{
 return (__le64)*p;
}
static __inline__ __u64 __le64_to_cpup(const __le64 *p)
{
 return (__u64)*p;
}
static __inline__ __le32 __cpu_to_le32p(const __u32 *p)
{
 return (__le32)*p;
}
static __inline__ __u32 __le32_to_cpup(const __le32 *p)
{
 return (__u32)*p;
}
static __inline__ __le16 __cpu_to_le16p(const __u16 *p)
{
 return (__le16)*p;
}
static __inline__ __u16 __le16_to_cpup(const __le16 *p)
{
 return (__u16)*p;
}
static __inline__ __be64 __cpu_to_be64p(const __u64 *p)
{
 return (__be64)__swab64p(p);
}
static __inline__ __u64 __be64_to_cpup(const __be64 *p)
{
 return __swab64p((__u64 *)p);
}
static __inline__ __be32 __cpu_to_be32p(const __u32 *p)
{
 return (__be32)__swab32p(p);
}
static __inline__ __u32 __be32_to_cpup(const __be32 *p)
{
 return __swab32p((__u32 *)p);
}
static __inline__ __be16 __cpu_to_be16p(const __u16 *p)
{
 return (__be16)__swab16p(p);
}
static __inline__ __u16 __be16_to_cpup(const __be16 *p)
{
 return __swab16p((__u16 *)p);
}
# 9 "/var/lib/cilium/bpf/include/linux/byteorder.h" 2
# 8 "/var/lib/cilium/bpf/include/bpf/api.h" 2

# 1 "/var/lib/cilium/bpf/include/linux/if_packet.h" 1
# 10 "/var/lib/cilium/bpf/include/bpf/api.h" 2


# 1 "/var/lib/cilium/bpf/include/bpf/section.h" 1
# 13 "/var/lib/cilium/bpf/include/bpf/api.h" 2

# 1 "/var/lib/cilium/bpf/include/bpf/builtins.h" 1
# 35 "/var/lib/cilium/bpf/include/bpf/builtins.h"
static inline __attribute__((always_inline)) __attribute__((__unused__)) void
__bpf_memset_builtin(void *d, __u8 c, __u64 len)
{



 __builtin_memset(d, c, len);
}

static inline __attribute__((always_inline)) void __bpf_memzero(void *d, __u64 len)
{
 if (!__builtin_constant_p(len))
  __builtin_trap();

 d += len;

 if (len > 1 && len % 2 == 1) {
  (*(__u8 *)(d -= sizeof(__u8))) = 0;
  len -= 1;
 }

 switch (len) {
 case 96: (*(__u64 *)(d -= sizeof(__u64))) = 0; __attribute__((fallthrough));
 case 88: jmp_88: (*(__u64 *)(d -= sizeof(__u64))) = 0; __attribute__((fallthrough));
 case 80: jmp_80: (*(__u64 *)(d -= sizeof(__u64))) = 0; __attribute__((fallthrough));
 case 72: jmp_72: (*(__u64 *)(d -= sizeof(__u64))) = 0; __attribute__((fallthrough));
 case 64: jmp_64: (*(__u64 *)(d -= sizeof(__u64))) = 0; __attribute__((fallthrough));
 case 56: jmp_56: (*(__u64 *)(d -= sizeof(__u64))) = 0; __attribute__((fallthrough));
 case 48: jmp_48: (*(__u64 *)(d -= sizeof(__u64))) = 0; __attribute__((fallthrough));
 case 40: jmp_40: (*(__u64 *)(d -= sizeof(__u64))) = 0; __attribute__((fallthrough));
 case 32: jmp_32: (*(__u64 *)(d -= sizeof(__u64))) = 0; __attribute__((fallthrough));
 case 24: jmp_24: (*(__u64 *)(d -= sizeof(__u64))) = 0; __attribute__((fallthrough));
 case 16: jmp_16: (*(__u64 *)(d -= sizeof(__u64))) = 0; __attribute__((fallthrough));
 case 8: jmp_8: (*(__u64 *)(d -= sizeof(__u64))) = 0;
  break;

 case 94: (*(__u16 *)(d -= sizeof(__u16))) = 0; (*(__u32 *)(d -= sizeof(__u32))) = 0; goto jmp_88;
 case 86: (*(__u16 *)(d -= sizeof(__u16))) = 0; (*(__u32 *)(d -= sizeof(__u32))) = 0; goto jmp_80;
 case 78: (*(__u16 *)(d -= sizeof(__u16))) = 0; (*(__u32 *)(d -= sizeof(__u32))) = 0; goto jmp_72;
 case 70: (*(__u16 *)(d -= sizeof(__u16))) = 0; (*(__u32 *)(d -= sizeof(__u32))) = 0; goto jmp_64;
 case 62: (*(__u16 *)(d -= sizeof(__u16))) = 0; (*(__u32 *)(d -= sizeof(__u32))) = 0; goto jmp_56;
 case 54: (*(__u16 *)(d -= sizeof(__u16))) = 0; (*(__u32 *)(d -= sizeof(__u32))) = 0; goto jmp_48;
 case 46: (*(__u16 *)(d -= sizeof(__u16))) = 0; (*(__u32 *)(d -= sizeof(__u32))) = 0; goto jmp_40;
 case 38: (*(__u16 *)(d -= sizeof(__u16))) = 0; (*(__u32 *)(d -= sizeof(__u32))) = 0; goto jmp_32;
 case 30: (*(__u16 *)(d -= sizeof(__u16))) = 0; (*(__u32 *)(d -= sizeof(__u32))) = 0; goto jmp_24;
 case 22: (*(__u16 *)(d -= sizeof(__u16))) = 0; (*(__u32 *)(d -= sizeof(__u32))) = 0; goto jmp_16;
 case 14: (*(__u16 *)(d -= sizeof(__u16))) = 0; (*(__u32 *)(d -= sizeof(__u32))) = 0; goto jmp_8;
 case 6: (*(__u16 *)(d -= sizeof(__u16))) = 0; (*(__u32 *)(d -= sizeof(__u32))) = 0;
  break;

 case 92: (*(__u32 *)(d -= sizeof(__u32))) = 0; goto jmp_88;
 case 84: (*(__u32 *)(d -= sizeof(__u32))) = 0; goto jmp_80;
 case 76: (*(__u32 *)(d -= sizeof(__u32))) = 0; goto jmp_72;
 case 68: (*(__u32 *)(d -= sizeof(__u32))) = 0; goto jmp_64;
 case 60: (*(__u32 *)(d -= sizeof(__u32))) = 0; goto jmp_56;
 case 52: (*(__u32 *)(d -= sizeof(__u32))) = 0; goto jmp_48;
 case 44: (*(__u32 *)(d -= sizeof(__u32))) = 0; goto jmp_40;
 case 36: (*(__u32 *)(d -= sizeof(__u32))) = 0; goto jmp_32;
 case 28: (*(__u32 *)(d -= sizeof(__u32))) = 0; goto jmp_24;
 case 20: (*(__u32 *)(d -= sizeof(__u32))) = 0; goto jmp_16;
 case 12: (*(__u32 *)(d -= sizeof(__u32))) = 0; goto jmp_8;
 case 4: (*(__u32 *)(d -= sizeof(__u32))) = 0;
  break;

 case 90: (*(__u16 *)(d -= sizeof(__u16))) = 0; goto jmp_88;
 case 82: (*(__u16 *)(d -= sizeof(__u16))) = 0; goto jmp_80;
 case 74: (*(__u16 *)(d -= sizeof(__u16))) = 0; goto jmp_72;
 case 66: (*(__u16 *)(d -= sizeof(__u16))) = 0; goto jmp_64;
 case 58: (*(__u16 *)(d -= sizeof(__u16))) = 0; goto jmp_56;
 case 50: (*(__u16 *)(d -= sizeof(__u16))) = 0; goto jmp_48;
 case 42: (*(__u16 *)(d -= sizeof(__u16))) = 0; goto jmp_40;
 case 34: (*(__u16 *)(d -= sizeof(__u16))) = 0; goto jmp_32;
 case 26: (*(__u16 *)(d -= sizeof(__u16))) = 0; goto jmp_24;
 case 18: (*(__u16 *)(d -= sizeof(__u16))) = 0; goto jmp_16;
 case 10: (*(__u16 *)(d -= sizeof(__u16))) = 0; goto jmp_8;
 case 2: (*(__u16 *)(d -= sizeof(__u16))) = 0;
  break;

 case 1: (*(__u8 *)(d -= sizeof(__u8))) = 0;
  break;

 default:





  __builtin_trap();
 }
}

static inline __attribute__((always_inline)) __attribute__((__unused__)) void
__bpf_no_builtin_memset(void *d __attribute__((__unused__)), __u8 c __attribute__((__unused__)),
   __u64 len __attribute__((__unused__)))
{
 __builtin_trap();
}




static inline __attribute__((always_inline)) __attribute__((no_builtin("memset"))) void memset(void *d, int c,
        __u64 len)
{
 if (__builtin_constant_p(len) && __builtin_constant_p(c) && c == 0)
  __bpf_memzero(d, len);
 else
  __bpf_memset_builtin(d, (__u8)c, len);
}

static inline __attribute__((always_inline)) __attribute__((__unused__)) void
__bpf_memcpy_builtin(void *d, const void *s, __u64 len)
{

 __builtin_memcpy(d, s, len);
}

static inline __attribute__((always_inline)) void __bpf_memcpy(void *d, const void *s, __u64 len)
{
 if (!__builtin_constant_p(len))
  __builtin_trap();

 d += len;
 s += len;

 if (len > 1 && len % 2 == 1) {
  (*(__u8 *)(d -= sizeof(__u8))) = (*(__u8 *)(s -= sizeof(__u8)));
  len -= 1;
 }

 switch (len) {
 case 96: (*(__u64 *)(d -= sizeof(__u64))) = (*(__u64 *)(s -= sizeof(__u64))); __attribute__((fallthrough));
 case 88: jmp_88: (*(__u64 *)(d -= sizeof(__u64))) = (*(__u64 *)(s -= sizeof(__u64))); __attribute__((fallthrough));
 case 80: jmp_80: (*(__u64 *)(d -= sizeof(__u64))) = (*(__u64 *)(s -= sizeof(__u64))); __attribute__((fallthrough));
 case 72: jmp_72: (*(__u64 *)(d -= sizeof(__u64))) = (*(__u64 *)(s -= sizeof(__u64))); __attribute__((fallthrough));
 case 64: jmp_64: (*(__u64 *)(d -= sizeof(__u64))) = (*(__u64 *)(s -= sizeof(__u64))); __attribute__((fallthrough));
 case 56: jmp_56: (*(__u64 *)(d -= sizeof(__u64))) = (*(__u64 *)(s -= sizeof(__u64))); __attribute__((fallthrough));
 case 48: jmp_48: (*(__u64 *)(d -= sizeof(__u64))) = (*(__u64 *)(s -= sizeof(__u64))); __attribute__((fallthrough));
 case 40: jmp_40: (*(__u64 *)(d -= sizeof(__u64))) = (*(__u64 *)(s -= sizeof(__u64))); __attribute__((fallthrough));
 case 32: jmp_32: (*(__u64 *)(d -= sizeof(__u64))) = (*(__u64 *)(s -= sizeof(__u64))); __attribute__((fallthrough));
 case 24: jmp_24: (*(__u64 *)(d -= sizeof(__u64))) = (*(__u64 *)(s -= sizeof(__u64))); __attribute__((fallthrough));
 case 16: jmp_16: (*(__u64 *)(d -= sizeof(__u64))) = (*(__u64 *)(s -= sizeof(__u64))); __attribute__((fallthrough));
 case 8: jmp_8: (*(__u64 *)(d -= sizeof(__u64))) = (*(__u64 *)(s -= sizeof(__u64)));
  break;

 case 94: (*(__u16 *)(d -= sizeof(__u16))) = (*(__u16 *)(s -= sizeof(__u16))); (*(__u32 *)(d -= sizeof(__u32))) = (*(__u32 *)(s -= sizeof(__u32))); goto jmp_88;
 case 86: (*(__u16 *)(d -= sizeof(__u16))) = (*(__u16 *)(s -= sizeof(__u16))); (*(__u32 *)(d -= sizeof(__u32))) = (*(__u32 *)(s -= sizeof(__u32))); goto jmp_80;
 case 78: (*(__u16 *)(d -= sizeof(__u16))) = (*(__u16 *)(s -= sizeof(__u16))); (*(__u32 *)(d -= sizeof(__u32))) = (*(__u32 *)(s -= sizeof(__u32))); goto jmp_72;
 case 70: (*(__u16 *)(d -= sizeof(__u16))) = (*(__u16 *)(s -= sizeof(__u16))); (*(__u32 *)(d -= sizeof(__u32))) = (*(__u32 *)(s -= sizeof(__u32))); goto jmp_64;
 case 62: (*(__u16 *)(d -= sizeof(__u16))) = (*(__u16 *)(s -= sizeof(__u16))); (*(__u32 *)(d -= sizeof(__u32))) = (*(__u32 *)(s -= sizeof(__u32))); goto jmp_56;
 case 54: (*(__u16 *)(d -= sizeof(__u16))) = (*(__u16 *)(s -= sizeof(__u16))); (*(__u32 *)(d -= sizeof(__u32))) = (*(__u32 *)(s -= sizeof(__u32))); goto jmp_48;
 case 46: (*(__u16 *)(d -= sizeof(__u16))) = (*(__u16 *)(s -= sizeof(__u16))); (*(__u32 *)(d -= sizeof(__u32))) = (*(__u32 *)(s -= sizeof(__u32))); goto jmp_40;
 case 38: (*(__u16 *)(d -= sizeof(__u16))) = (*(__u16 *)(s -= sizeof(__u16))); (*(__u32 *)(d -= sizeof(__u32))) = (*(__u32 *)(s -= sizeof(__u32))); goto jmp_32;
 case 30: (*(__u16 *)(d -= sizeof(__u16))) = (*(__u16 *)(s -= sizeof(__u16))); (*(__u32 *)(d -= sizeof(__u32))) = (*(__u32 *)(s -= sizeof(__u32))); goto jmp_24;
 case 22: (*(__u16 *)(d -= sizeof(__u16))) = (*(__u16 *)(s -= sizeof(__u16))); (*(__u32 *)(d -= sizeof(__u32))) = (*(__u32 *)(s -= sizeof(__u32))); goto jmp_16;
 case 14: (*(__u16 *)(d -= sizeof(__u16))) = (*(__u16 *)(s -= sizeof(__u16))); (*(__u32 *)(d -= sizeof(__u32))) = (*(__u32 *)(s -= sizeof(__u32))); goto jmp_8;
 case 6: (*(__u16 *)(d -= sizeof(__u16))) = (*(__u16 *)(s -= sizeof(__u16))); (*(__u32 *)(d -= sizeof(__u32))) = (*(__u32 *)(s -= sizeof(__u32)));
  break;

 case 92: (*(__u32 *)(d -= sizeof(__u32))) = (*(__u32 *)(s -= sizeof(__u32))); goto jmp_88;
 case 84: (*(__u32 *)(d -= sizeof(__u32))) = (*(__u32 *)(s -= sizeof(__u32))); goto jmp_80;
 case 76: (*(__u32 *)(d -= sizeof(__u32))) = (*(__u32 *)(s -= sizeof(__u32))); goto jmp_72;
 case 68: (*(__u32 *)(d -= sizeof(__u32))) = (*(__u32 *)(s -= sizeof(__u32))); goto jmp_64;
 case 60: (*(__u32 *)(d -= sizeof(__u32))) = (*(__u32 *)(s -= sizeof(__u32))); goto jmp_56;
 case 52: (*(__u32 *)(d -= sizeof(__u32))) = (*(__u32 *)(s -= sizeof(__u32))); goto jmp_48;
 case 44: (*(__u32 *)(d -= sizeof(__u32))) = (*(__u32 *)(s -= sizeof(__u32))); goto jmp_40;
 case 36: (*(__u32 *)(d -= sizeof(__u32))) = (*(__u32 *)(s -= sizeof(__u32))); goto jmp_32;
 case 28: (*(__u32 *)(d -= sizeof(__u32))) = (*(__u32 *)(s -= sizeof(__u32))); goto jmp_24;
 case 20: (*(__u32 *)(d -= sizeof(__u32))) = (*(__u32 *)(s -= sizeof(__u32))); goto jmp_16;
 case 12: (*(__u32 *)(d -= sizeof(__u32))) = (*(__u32 *)(s -= sizeof(__u32))); goto jmp_8;
 case 4: (*(__u32 *)(d -= sizeof(__u32))) = (*(__u32 *)(s -= sizeof(__u32)));
  break;

 case 90: (*(__u16 *)(d -= sizeof(__u16))) = (*(__u16 *)(s -= sizeof(__u16))); goto jmp_88;
 case 82: (*(__u16 *)(d -= sizeof(__u16))) = (*(__u16 *)(s -= sizeof(__u16))); goto jmp_80;
 case 74: (*(__u16 *)(d -= sizeof(__u16))) = (*(__u16 *)(s -= sizeof(__u16))); goto jmp_72;
 case 66: (*(__u16 *)(d -= sizeof(__u16))) = (*(__u16 *)(s -= sizeof(__u16))); goto jmp_64;
 case 58: (*(__u16 *)(d -= sizeof(__u16))) = (*(__u16 *)(s -= sizeof(__u16))); goto jmp_56;
 case 50: (*(__u16 *)(d -= sizeof(__u16))) = (*(__u16 *)(s -= sizeof(__u16))); goto jmp_48;
 case 42: (*(__u16 *)(d -= sizeof(__u16))) = (*(__u16 *)(s -= sizeof(__u16))); goto jmp_40;
 case 34: (*(__u16 *)(d -= sizeof(__u16))) = (*(__u16 *)(s -= sizeof(__u16))); goto jmp_32;
 case 26: (*(__u16 *)(d -= sizeof(__u16))) = (*(__u16 *)(s -= sizeof(__u16))); goto jmp_24;
 case 18: (*(__u16 *)(d -= sizeof(__u16))) = (*(__u16 *)(s -= sizeof(__u16))); goto jmp_16;
 case 10: (*(__u16 *)(d -= sizeof(__u16))) = (*(__u16 *)(s -= sizeof(__u16))); goto jmp_8;
 case 2: (*(__u16 *)(d -= sizeof(__u16))) = (*(__u16 *)(s -= sizeof(__u16)));
  break;

 case 1: (*(__u8 *)(d -= sizeof(__u8))) = (*(__u8 *)(s -= sizeof(__u8)));
  break;

 default:





  __builtin_trap();
 }
}

static inline __attribute__((always_inline)) __attribute__((__unused__)) void
__bpf_no_builtin_memcpy(void *d __attribute__((__unused__)), const void *s __attribute__((__unused__)),
   __u64 len __attribute__((__unused__)))
{
 __builtin_trap();
}




static inline __attribute__((always_inline)) __attribute__((no_builtin("memcpy"))) void memcpy(void *d, const void *s,
        __u64 len)
{
 return __bpf_memcpy(d, s, len);
}

static inline __attribute__((always_inline)) __attribute__((__unused__)) __u64
__bpf_memcmp_builtin(const void *x, const void *y, __u64 len)
{
# 263 "/var/lib/cilium/bpf/include/bpf/builtins.h"
 return __builtin_bcmp(x, y, len);
}

static inline __attribute__((always_inline)) __u64 __bpf_memcmp(const void *x, const void *y,
       __u64 len)
{
 __u64 r = 0;

 if (!__builtin_constant_p(len))
  __builtin_trap();

 x += len;
 y += len;

 if (len > 1 && len % 2 == 1) {
  r |= (*(__u8 *)(x -= sizeof(__u8))) ^ (*(__u8 *)(y -= sizeof(__u8)));
  len -= 1;
 }

 switch (len) {
 case 72: r |= (*(__u64 *)(x -= sizeof(__u64))) ^ (*(__u64 *)(y -= sizeof(__u64))); __attribute__((fallthrough));
 case 64: jmp_64: r |= (*(__u64 *)(x -= sizeof(__u64))) ^ (*(__u64 *)(y -= sizeof(__u64))); __attribute__((fallthrough));
 case 56: jmp_56: r |= (*(__u64 *)(x -= sizeof(__u64))) ^ (*(__u64 *)(y -= sizeof(__u64))); __attribute__((fallthrough));
 case 48: jmp_48: r |= (*(__u64 *)(x -= sizeof(__u64))) ^ (*(__u64 *)(y -= sizeof(__u64))); __attribute__((fallthrough));
 case 40: jmp_40: r |= (*(__u64 *)(x -= sizeof(__u64))) ^ (*(__u64 *)(y -= sizeof(__u64))); __attribute__((fallthrough));
 case 32: jmp_32: r |= (*(__u64 *)(x -= sizeof(__u64))) ^ (*(__u64 *)(y -= sizeof(__u64))); __attribute__((fallthrough));
 case 24: jmp_24: r |= (*(__u64 *)(x -= sizeof(__u64))) ^ (*(__u64 *)(y -= sizeof(__u64))); __attribute__((fallthrough));
 case 16: jmp_16: r |= (*(__u64 *)(x -= sizeof(__u64))) ^ (*(__u64 *)(y -= sizeof(__u64))); __attribute__((fallthrough));
 case 8: jmp_8: r |= (*(__u64 *)(x -= sizeof(__u64))) ^ (*(__u64 *)(y -= sizeof(__u64)));
  break;

 case 70: r |= (*(__u16 *)(x -= sizeof(__u16))) ^ (*(__u16 *)(y -= sizeof(__u16))); r |= (*(__u32 *)(x -= sizeof(__u32))) ^ (*(__u32 *)(y -= sizeof(__u32))); goto jmp_64;
 case 62: r |= (*(__u16 *)(x -= sizeof(__u16))) ^ (*(__u16 *)(y -= sizeof(__u16))); r |= (*(__u32 *)(x -= sizeof(__u32))) ^ (*(__u32 *)(y -= sizeof(__u32))); goto jmp_56;
 case 54: r |= (*(__u16 *)(x -= sizeof(__u16))) ^ (*(__u16 *)(y -= sizeof(__u16))); r |= (*(__u32 *)(x -= sizeof(__u32))) ^ (*(__u32 *)(y -= sizeof(__u32))); goto jmp_48;
 case 46: r |= (*(__u16 *)(x -= sizeof(__u16))) ^ (*(__u16 *)(y -= sizeof(__u16))); r |= (*(__u32 *)(x -= sizeof(__u32))) ^ (*(__u32 *)(y -= sizeof(__u32))); goto jmp_40;
 case 38: r |= (*(__u16 *)(x -= sizeof(__u16))) ^ (*(__u16 *)(y -= sizeof(__u16))); r |= (*(__u32 *)(x -= sizeof(__u32))) ^ (*(__u32 *)(y -= sizeof(__u32))); goto jmp_32;
 case 30: r |= (*(__u16 *)(x -= sizeof(__u16))) ^ (*(__u16 *)(y -= sizeof(__u16))); r |= (*(__u32 *)(x -= sizeof(__u32))) ^ (*(__u32 *)(y -= sizeof(__u32))); goto jmp_24;
 case 22: r |= (*(__u16 *)(x -= sizeof(__u16))) ^ (*(__u16 *)(y -= sizeof(__u16))); r |= (*(__u32 *)(x -= sizeof(__u32))) ^ (*(__u32 *)(y -= sizeof(__u32))); goto jmp_16;
 case 14: r |= (*(__u16 *)(x -= sizeof(__u16))) ^ (*(__u16 *)(y -= sizeof(__u16))); r |= (*(__u32 *)(x -= sizeof(__u32))) ^ (*(__u32 *)(y -= sizeof(__u32))); goto jmp_8;
 case 6: r |= (*(__u16 *)(x -= sizeof(__u16))) ^ (*(__u16 *)(y -= sizeof(__u16))); r |= (*(__u32 *)(x -= sizeof(__u32))) ^ (*(__u32 *)(y -= sizeof(__u32)));
  break;

 case 68: r |= (*(__u32 *)(x -= sizeof(__u32))) ^ (*(__u32 *)(y -= sizeof(__u32))); goto jmp_64;
 case 60: r |= (*(__u32 *)(x -= sizeof(__u32))) ^ (*(__u32 *)(y -= sizeof(__u32))); goto jmp_56;
 case 52: r |= (*(__u32 *)(x -= sizeof(__u32))) ^ (*(__u32 *)(y -= sizeof(__u32))); goto jmp_48;
 case 44: r |= (*(__u32 *)(x -= sizeof(__u32))) ^ (*(__u32 *)(y -= sizeof(__u32))); goto jmp_40;
 case 36: r |= (*(__u32 *)(x -= sizeof(__u32))) ^ (*(__u32 *)(y -= sizeof(__u32))); goto jmp_32;
 case 28: r |= (*(__u32 *)(x -= sizeof(__u32))) ^ (*(__u32 *)(y -= sizeof(__u32))); goto jmp_24;
 case 20: r |= (*(__u32 *)(x -= sizeof(__u32))) ^ (*(__u32 *)(y -= sizeof(__u32))); goto jmp_16;
 case 12: r |= (*(__u32 *)(x -= sizeof(__u32))) ^ (*(__u32 *)(y -= sizeof(__u32))); goto jmp_8;
 case 4: r |= (*(__u32 *)(x -= sizeof(__u32))) ^ (*(__u32 *)(y -= sizeof(__u32)));
  break;

 case 66: r |= (*(__u16 *)(x -= sizeof(__u16))) ^ (*(__u16 *)(y -= sizeof(__u16))); goto jmp_64;
 case 58: r |= (*(__u16 *)(x -= sizeof(__u16))) ^ (*(__u16 *)(y -= sizeof(__u16))); goto jmp_56;
 case 50: r |= (*(__u16 *)(x -= sizeof(__u16))) ^ (*(__u16 *)(y -= sizeof(__u16))); goto jmp_48;
 case 42: r |= (*(__u16 *)(x -= sizeof(__u16))) ^ (*(__u16 *)(y -= sizeof(__u16))); goto jmp_40;
 case 34: r |= (*(__u16 *)(x -= sizeof(__u16))) ^ (*(__u16 *)(y -= sizeof(__u16))); goto jmp_32;
 case 26: r |= (*(__u16 *)(x -= sizeof(__u16))) ^ (*(__u16 *)(y -= sizeof(__u16))); goto jmp_24;
 case 18: r |= (*(__u16 *)(x -= sizeof(__u16))) ^ (*(__u16 *)(y -= sizeof(__u16))); goto jmp_16;
 case 10: r |= (*(__u16 *)(x -= sizeof(__u16))) ^ (*(__u16 *)(y -= sizeof(__u16))); goto jmp_8;
 case 2: r |= (*(__u16 *)(x -= sizeof(__u16))) ^ (*(__u16 *)(y -= sizeof(__u16)));
  break;

 case 1: r |= (*(__u8 *)(x -= sizeof(__u8))) ^ (*(__u8 *)(y -= sizeof(__u8)));
  break;

 default:
  __builtin_trap();
 }

 return r;
}

static inline __attribute__((always_inline)) __attribute__((__unused__)) __u64
__bpf_no_builtin_memcmp(const void *x __attribute__((__unused__)),
   const void *y __attribute__((__unused__)), __u64 len __attribute__((__unused__)))
{
 __builtin_trap();
 return 0;
}







static inline __attribute__((always_inline)) __attribute__((no_builtin("memcmp"))) __u64 memcmp(const void *x,
         const void *y,
         __u64 len)
{
 return __bpf_memcmp(x, y, len);
}

static inline __attribute__((always_inline)) __attribute__((__unused__)) void
__bpf_memmove_builtin(void *d, const void *s, __u64 len)
{

 __builtin_memmove(d, s, len);
}

static inline __attribute__((always_inline)) void __bpf_memmove_bwd(void *d, const void *s, __u64 len)
{

 __bpf_memcpy(d, s, len);
}

static inline __attribute__((always_inline)) void __bpf_memmove_fwd(void *d, const void *s, __u64 len)
{
 if (!__builtin_constant_p(len))
  __builtin_trap();

 switch (len) {
 case 96: do { *(__u64 *)d = *(__u64 *)s; (d += sizeof(__u64)); (s += sizeof(__u64)); } while (0); __attribute__((fallthrough));
 case 88: jmp_88: do { *(__u64 *)d = *(__u64 *)s; (d += sizeof(__u64)); (s += sizeof(__u64)); } while (0); __attribute__((fallthrough));
 case 80: jmp_80: do { *(__u64 *)d = *(__u64 *)s; (d += sizeof(__u64)); (s += sizeof(__u64)); } while (0); __attribute__((fallthrough));
 case 72: jmp_72: do { *(__u64 *)d = *(__u64 *)s; (d += sizeof(__u64)); (s += sizeof(__u64)); } while (0); __attribute__((fallthrough));
 case 64: jmp_64: do { *(__u64 *)d = *(__u64 *)s; (d += sizeof(__u64)); (s += sizeof(__u64)); } while (0); __attribute__((fallthrough));
 case 56: jmp_56: do { *(__u64 *)d = *(__u64 *)s; (d += sizeof(__u64)); (s += sizeof(__u64)); } while (0); __attribute__((fallthrough));
 case 48: jmp_48: do { *(__u64 *)d = *(__u64 *)s; (d += sizeof(__u64)); (s += sizeof(__u64)); } while (0); __attribute__((fallthrough));
 case 40: jmp_40: do { *(__u64 *)d = *(__u64 *)s; (d += sizeof(__u64)); (s += sizeof(__u64)); } while (0); __attribute__((fallthrough));
 case 32: jmp_32: do { *(__u64 *)d = *(__u64 *)s; (d += sizeof(__u64)); (s += sizeof(__u64)); } while (0); __attribute__((fallthrough));
 case 24: jmp_24: do { *(__u64 *)d = *(__u64 *)s; (d += sizeof(__u64)); (s += sizeof(__u64)); } while (0); __attribute__((fallthrough));
 case 16: jmp_16: do { *(__u64 *)d = *(__u64 *)s; (d += sizeof(__u64)); (s += sizeof(__u64)); } while (0); __attribute__((fallthrough));
 case 8: jmp_8: do { *(__u64 *)d = *(__u64 *)s; (d += sizeof(__u64)); (s += sizeof(__u64)); } while (0);
  break;

 case 94: do { *(__u16 *)d = *(__u16 *)s; (d += sizeof(__u16)); (s += sizeof(__u16)); } while (0); do { *(__u32 *)d = *(__u32 *)s; (d += sizeof(__u32)); (s += sizeof(__u32)); } while (0); goto jmp_88;
 case 86: do { *(__u16 *)d = *(__u16 *)s; (d += sizeof(__u16)); (s += sizeof(__u16)); } while (0); do { *(__u32 *)d = *(__u32 *)s; (d += sizeof(__u32)); (s += sizeof(__u32)); } while (0); goto jmp_80;
 case 78: do { *(__u16 *)d = *(__u16 *)s; (d += sizeof(__u16)); (s += sizeof(__u16)); } while (0); do { *(__u32 *)d = *(__u32 *)s; (d += sizeof(__u32)); (s += sizeof(__u32)); } while (0); goto jmp_72;
 case 70: do { *(__u16 *)d = *(__u16 *)s; (d += sizeof(__u16)); (s += sizeof(__u16)); } while (0); do { *(__u32 *)d = *(__u32 *)s; (d += sizeof(__u32)); (s += sizeof(__u32)); } while (0); goto jmp_64;
 case 62: do { *(__u16 *)d = *(__u16 *)s; (d += sizeof(__u16)); (s += sizeof(__u16)); } while (0); do { *(__u32 *)d = *(__u32 *)s; (d += sizeof(__u32)); (s += sizeof(__u32)); } while (0); goto jmp_56;
 case 54: do { *(__u16 *)d = *(__u16 *)s; (d += sizeof(__u16)); (s += sizeof(__u16)); } while (0); do { *(__u32 *)d = *(__u32 *)s; (d += sizeof(__u32)); (s += sizeof(__u32)); } while (0); goto jmp_48;
 case 46: do { *(__u16 *)d = *(__u16 *)s; (d += sizeof(__u16)); (s += sizeof(__u16)); } while (0); do { *(__u32 *)d = *(__u32 *)s; (d += sizeof(__u32)); (s += sizeof(__u32)); } while (0); goto jmp_40;
 case 38: do { *(__u16 *)d = *(__u16 *)s; (d += sizeof(__u16)); (s += sizeof(__u16)); } while (0); do { *(__u32 *)d = *(__u32 *)s; (d += sizeof(__u32)); (s += sizeof(__u32)); } while (0); goto jmp_32;
 case 30: do { *(__u16 *)d = *(__u16 *)s; (d += sizeof(__u16)); (s += sizeof(__u16)); } while (0); do { *(__u32 *)d = *(__u32 *)s; (d += sizeof(__u32)); (s += sizeof(__u32)); } while (0); goto jmp_24;
 case 22: do { *(__u16 *)d = *(__u16 *)s; (d += sizeof(__u16)); (s += sizeof(__u16)); } while (0); do { *(__u32 *)d = *(__u32 *)s; (d += sizeof(__u32)); (s += sizeof(__u32)); } while (0); goto jmp_16;
 case 14: do { *(__u16 *)d = *(__u16 *)s; (d += sizeof(__u16)); (s += sizeof(__u16)); } while (0); do { *(__u32 *)d = *(__u32 *)s; (d += sizeof(__u32)); (s += sizeof(__u32)); } while (0); goto jmp_8;
 case 6: do { *(__u16 *)d = *(__u16 *)s; (d += sizeof(__u16)); (s += sizeof(__u16)); } while (0); do { *(__u32 *)d = *(__u32 *)s; (d += sizeof(__u32)); (s += sizeof(__u32)); } while (0);
  break;

 case 92: do { *(__u32 *)d = *(__u32 *)s; (d += sizeof(__u32)); (s += sizeof(__u32)); } while (0); goto jmp_88;
 case 84: do { *(__u32 *)d = *(__u32 *)s; (d += sizeof(__u32)); (s += sizeof(__u32)); } while (0); goto jmp_80;
 case 76: do { *(__u32 *)d = *(__u32 *)s; (d += sizeof(__u32)); (s += sizeof(__u32)); } while (0); goto jmp_72;
 case 68: do { *(__u32 *)d = *(__u32 *)s; (d += sizeof(__u32)); (s += sizeof(__u32)); } while (0); goto jmp_64;
 case 60: do { *(__u32 *)d = *(__u32 *)s; (d += sizeof(__u32)); (s += sizeof(__u32)); } while (0); goto jmp_56;
 case 52: do { *(__u32 *)d = *(__u32 *)s; (d += sizeof(__u32)); (s += sizeof(__u32)); } while (0); goto jmp_48;
 case 44: do { *(__u32 *)d = *(__u32 *)s; (d += sizeof(__u32)); (s += sizeof(__u32)); } while (0); goto jmp_40;
 case 36: do { *(__u32 *)d = *(__u32 *)s; (d += sizeof(__u32)); (s += sizeof(__u32)); } while (0); goto jmp_32;
 case 28: do { *(__u32 *)d = *(__u32 *)s; (d += sizeof(__u32)); (s += sizeof(__u32)); } while (0); goto jmp_24;
 case 20: do { *(__u32 *)d = *(__u32 *)s; (d += sizeof(__u32)); (s += sizeof(__u32)); } while (0); goto jmp_16;
 case 12: do { *(__u32 *)d = *(__u32 *)s; (d += sizeof(__u32)); (s += sizeof(__u32)); } while (0); goto jmp_8;
 case 4: do { *(__u32 *)d = *(__u32 *)s; (d += sizeof(__u32)); (s += sizeof(__u32)); } while (0);
  break;

 case 90: do { *(__u16 *)d = *(__u16 *)s; (d += sizeof(__u16)); (s += sizeof(__u16)); } while (0); goto jmp_88;
 case 82: do { *(__u16 *)d = *(__u16 *)s; (d += sizeof(__u16)); (s += sizeof(__u16)); } while (0); goto jmp_80;
 case 74: do { *(__u16 *)d = *(__u16 *)s; (d += sizeof(__u16)); (s += sizeof(__u16)); } while (0); goto jmp_72;
 case 66: do { *(__u16 *)d = *(__u16 *)s; (d += sizeof(__u16)); (s += sizeof(__u16)); } while (0); goto jmp_64;
 case 58: do { *(__u16 *)d = *(__u16 *)s; (d += sizeof(__u16)); (s += sizeof(__u16)); } while (0); goto jmp_56;
 case 50: do { *(__u16 *)d = *(__u16 *)s; (d += sizeof(__u16)); (s += sizeof(__u16)); } while (0); goto jmp_48;
 case 42: do { *(__u16 *)d = *(__u16 *)s; (d += sizeof(__u16)); (s += sizeof(__u16)); } while (0); goto jmp_40;
 case 34: do { *(__u16 *)d = *(__u16 *)s; (d += sizeof(__u16)); (s += sizeof(__u16)); } while (0); goto jmp_32;
 case 26: do { *(__u16 *)d = *(__u16 *)s; (d += sizeof(__u16)); (s += sizeof(__u16)); } while (0); goto jmp_24;
 case 18: do { *(__u16 *)d = *(__u16 *)s; (d += sizeof(__u16)); (s += sizeof(__u16)); } while (0); goto jmp_16;
 case 10: do { *(__u16 *)d = *(__u16 *)s; (d += sizeof(__u16)); (s += sizeof(__u16)); } while (0); goto jmp_8;
 case 2: do { *(__u16 *)d = *(__u16 *)s; (d += sizeof(__u16)); (s += sizeof(__u16)); } while (0);
  break;

 case 1: do { *(__u8 *)d = *(__u8 *)s; (d += sizeof(__u8)); (s += sizeof(__u8)); } while (0);
  break;

 default:





  __builtin_trap();
 }
}

static inline __attribute__((always_inline)) __attribute__((__unused__)) void
__bpf_no_builtin_memmove(void *d __attribute__((__unused__)), const void *s __attribute__((__unused__)),
    __u64 len __attribute__((__unused__)))
{
 __builtin_trap();
}




static inline __attribute__((always_inline)) void __bpf_memmove(void *d, const void *s, __u64 len)
{
# 467 "/var/lib/cilium/bpf/include/bpf/builtins.h"
 if (d <= s)
  return __bpf_memmove_fwd(d, s, len);
 else
  return __bpf_memmove_bwd(d, s, len);
}

static inline __attribute__((always_inline)) __attribute__((no_builtin("memmove"))) void memmove(void *d,
          const void *s,
          __u64 len)
{
 return __bpf_memmove(d, s, len);
}
# 15 "/var/lib/cilium/bpf/include/bpf/api.h" 2
# 1 "/var/lib/cilium/bpf/include/bpf/tailcall.h" 1
# 37 "/var/lib/cilium/bpf/include/bpf/tailcall.h"
static inline __attribute__((always_inline)) __attribute__((__unused__)) void
tail_call_dynamic(struct __sk_buff *ctx, const void *map, __u32 slot)
{
 if (__builtin_constant_p(slot))
  __builtin_trap();





 tail_call(ctx, map, slot);
}
# 16 "/var/lib/cilium/bpf/include/bpf/api.h" 2

# 1 "/var/lib/cilium/bpf/include/bpf/loader.h" 1
# 18 "/var/lib/cilium/bpf/include/bpf/api.h" 2
# 1 "/var/lib/cilium/bpf/include/bpf/csum.h" 1








static inline __attribute__((always_inline)) __sum16 csum_fold(__wsum csum)
{
 csum = (csum & 0xffff) + (csum >> 16);
 csum = (csum & 0xffff) + (csum >> 16);
 return (__sum16)~csum;
}

static inline __attribute__((always_inline)) __wsum csum_unfold(__sum16 csum)
{
 return (__wsum)csum;
}

static inline __attribute__((always_inline)) __wsum csum_add(__wsum csum, __wsum addend)
{
 csum += addend;
 return csum + (csum < addend);
}

static inline __attribute__((always_inline)) __wsum csum_sub(__wsum csum, __wsum addend)
{
 return csum_add(csum, ~addend);
}

static inline __attribute__((always_inline)) __wsum csum_diff(const void *from, __u32 size_from,
     const void *to, __u32 size_to,
     __u32 seed)
{
 if (__builtin_constant_p(size_from) &&
     __builtin_constant_p(size_to)) {



  if (size_from == 4 && size_to == 4 &&
      __builtin_constant_p(seed) && seed == 0)
   return csum_add(~(*(__u32 *)from), *(__u32 *)to);
  if (size_from == 4 && size_to == 4)
   return csum_add(seed,
     csum_add(~(*(__u32 *)from),
       *(__u32 *)to));
 }

 return csum_diff_external(from, size_from, to, size_to, seed);
}
# 19 "/var/lib/cilium/bpf/include/bpf/api.h" 2
# 1 "/var/lib/cilium/bpf/include/bpf/access.h" 1








static inline __attribute__((always_inline)) __attribute__((__unused__)) __u32
map_array_get_32(const __u32 *array, __u32 index, const __u32 limit)
{
 __u32 datum = 0;

 if (__builtin_constant_p(index) ||
     !__builtin_constant_p(limit))
  __builtin_trap();






 asm volatile("%[index] <<= 2\n\t"
       "if %[index] > %[limit] goto +1\n\t"
       "%[array] += %[index]\n\t"
       "%[datum] = *(u32 *)(%[array] + 0)\n\t"
       : [datum]"=r"(datum)
       : [limit]"i"(limit), [array]"r"(array), [index]"r"(index)
       : );

 return datum;
}
# 20 "/var/lib/cilium/bpf/include/bpf/api.h" 2
# 6 "/var/lib/cilium/bpf/bpf_host.c" 2

# 1 "/var/lib/cilium/bpf/include/bpf/config/node.h" 1
# 13 "/var/lib/cilium/bpf/include/bpf/config/node.h"
# 1 "/var/lib/cilium/bpf/lib/static_data.h" 1






# 1 "/var/lib/cilium/bpf/lib/endian.h" 1
# 8 "/var/lib/cilium/bpf/lib/static_data.h" 2
# 14 "/var/lib/cilium/bpf/include/bpf/config/node.h" 2


# 1 "/var/run/cilium/state/globals/node_config.h" 1
# 1 "/var/lib/cilium/bpf/lib/utils.h" 1
# 10 "/var/lib/cilium/bpf/lib/utils.h"
# 1 "/var/lib/cilium/bpf/lib/time.h" 1
# 11 "/var/lib/cilium/bpf/lib/utils.h" 2
# 2 "/var/run/cilium/state/globals/node_config.h" 2
# 19 "/var/run/cilium/state/globals/node_config.h"
__attribute__((section(".rodata.config"), used)) __attribute__((btf_decl_tag("kind:object"))) __attribute__((btf_decl_tag("Identity length in bits"))) volatile const __u32 __config_identity_length;;
void __check_identity_length(void) { __config_identity_length; }; volatile const __u32 __config_identity_length = 16;;
__attribute__((section(".rodata.config"), used)) __attribute__((btf_decl_tag("kind:object"))) __attribute__((btf_decl_tag("ifindex of the interface the bpf program is attached to"))) volatile const __u32 __config_interface_ifindex;;
# 17 "/var/lib/cilium/bpf/include/bpf/config/node.h" 2

__attribute__((section(".rodata.config"), used)) __attribute__((btf_decl_tag("kind:node"))) __attribute__((btf_decl_tag("IPv4 source address used for SNAT when a Pod talks to itself over a Service"))) volatile const union v4addr __config_service_loopback_ipv4;
__attribute__((section(".rodata.config"), used)) __attribute__((btf_decl_tag("kind:node"))) __attribute__((btf_decl_tag("Internal IPv6 router address assigned to the cilium_host interface"))) volatile const union v6addr __config_router_ipv6;

__attribute__((section(".rodata.config"), used)) __attribute__((btf_decl_tag("kind:node"))) __attribute__((btf_decl_tag("Length of payload to capture when tracing native packets."))) volatile const __u32 __config_trace_payload_len;


__attribute__((section(".rodata.config"), used)) __attribute__((btf_decl_tag("kind:node"))) __attribute__((btf_decl_tag("Length of payload to capture when tracing overlay packets."))) volatile const __u32 __config_trace_payload_len_overlay;

__attribute__((section(".rodata.config"), used)) __attribute__((btf_decl_tag("kind:node"))) __attribute__((btf_decl_tag("Index of the interface used to connect nodes in the cluster."))) volatile const __u32 __config_direct_routing_dev_ifindex;
# 8 "/var/lib/cilium/bpf/bpf_host.c" 2
# 1 "/var/lib/cilium/bpf/include/bpf/config/global.h" 1
# 13 "/var/lib/cilium/bpf/include/bpf/config/global.h"
__attribute__((section(".rodata.config"), used)) __attribute__((btf_decl_tag("kind:object"))) __attribute__((btf_decl_tag("MAC address of the interface the bpf program is attached to"))) volatile const union macaddr __config_interface_mac;


__attribute__((section(".rodata.config"), used)) __attribute__((btf_decl_tag("kind:object"))) __attribute__((btf_decl_tag("ifindex of the interface the bpf program is attached to"))) volatile const __u32 __config_interface_ifindex;


__attribute__((section(".rodata.config"), used)) __attribute__((btf_decl_tag("kind:object"))) __attribute__((btf_decl_tag("Pull security context from IP cache"))) volatile const _Bool __config_secctx_from_ipcache;
# 9 "/var/lib/cilium/bpf/bpf_host.c" 2
# 1 "/var/lib/cilium/bpf/include/bpf/config/endpoint.h" 1
# 14 "/var/lib/cilium/bpf/include/bpf/config/endpoint.h"
# 1 "/var/run/cilium/state/templates/4d63d91dccf7e66170c064cbeb06bb0f939365dfdc9da3b526f2330a42bb47ba/ep_config.h" 1
# 15 "/var/lib/cilium/bpf/include/bpf/config/endpoint.h" 2

__attribute__((section(".rodata.config"), used)) __attribute__((btf_decl_tag("kind:object"))) __attribute__((btf_decl_tag("The endpoint's security label"))) volatile const __u32 __config_security_label;





__attribute__((section(".rodata.config"), used)) __attribute__((btf_decl_tag("kind:object"))) __attribute__((btf_decl_tag("The host endpoint's security ID"))) volatile const __u16 __config_host_ep_id;
# 10 "/var/lib/cilium/bpf/bpf_host.c" 2
# 1 "/var/lib/cilium/bpf/include/bpf/config/host.h" 1
# 12 "/var/lib/cilium/bpf/include/bpf/config/host.h"
# 1 "/var/lib/cilium/bpf/include/linux/if_ether.h" 1
# 144 "/var/lib/cilium/bpf/include/linux/if_ether.h"
struct ethhdr {
 unsigned char h_dest[6];
 unsigned char h_source[6];
 __be16 h_proto;
} __attribute__((packed));
# 13 "/var/lib/cilium/bpf/include/bpf/config/host.h" 2
# 22 "/var/lib/cilium/bpf/include/bpf/config/host.h"
__attribute__((section(".rodata.config"), used)) __attribute__((btf_decl_tag("kind:object"))) __attribute__((btf_decl_tag("Length of the Ethernet header on this device. May be set to zero on L2-less devices. (default __ETH_HLEN)"))) volatile const __u8 __config_eth_header_length;
void __check_eth_header_length(void) { __config_eth_header_length; }; volatile const __u8 __config_eth_header_length = 14;
# 11 "/var/lib/cilium/bpf/bpf_host.c" 2
# 27 "/var/lib/cilium/bpf/bpf_host.c"
# 1 "/var/lib/cilium/bpf/lib/common.h" 1
# 10 "/var/lib/cilium/bpf/lib/common.h"
# 1 "/var/lib/cilium/bpf/include/linux/ipv6.h" 1





# 1 "/var/lib/cilium/bpf/include/linux/in6.h" 1
# 31 "/var/lib/cilium/bpf/include/linux/in6.h"
struct in6_addr {
 union {
  __u8 u6_addr8[16];
  __be16 u6_addr16[8];
  __be32 u6_addr32[4];
 } in6_u;



};
# 7 "/var/lib/cilium/bpf/include/linux/ipv6.h" 2
# 32 "/var/lib/cilium/bpf/include/linux/ipv6.h"
struct in6_ifreq {
 struct in6_addr ifr6_addr;
 __u32 ifr6_prefixlen;
 int ifr6_ifindex;
};
# 47 "/var/lib/cilium/bpf/include/linux/ipv6.h"
struct ipv6_rt_hdr {
 __u8 nexthdr;
 __u8 hdrlen;
 __u8 type;
 __u8 segments_left;





};


struct ipv6_opt_hdr {
 __u8 nexthdr;
 __u8 hdrlen;



} __attribute__((packed));
# 78 "/var/lib/cilium/bpf/include/linux/ipv6.h"
struct rt0_hdr {
 struct ipv6_rt_hdr rt_hdr;
 __u32 reserved;
 struct in6_addr addr[0];


};





struct rt2_hdr {
 struct ipv6_rt_hdr rt_hdr;
 __u32 reserved;
 struct in6_addr addr;


};





struct ipv6_destopt_hao {
 __u8 type;
 __u8 length;
 struct in6_addr addr;
} __attribute__((packed));
# 115 "/var/lib/cilium/bpf/include/linux/ipv6.h"
struct ipv6hdr {

 __u8 priority:4,
    version:4;






 __u8 flow_lbl[3];

 __be16 payload_len;
 __u8 nexthdr;
 __u8 hop_limit;

 struct in6_addr saddr;
 struct in6_addr daddr;
};



enum {
 DEVCONF_FORWARDING = 0,
 DEVCONF_HOPLIMIT,
 DEVCONF_MTU6,
 DEVCONF_ACCEPT_RA,
 DEVCONF_ACCEPT_REDIRECTS,
 DEVCONF_AUTOCONF,
 DEVCONF_DAD_TRANSMITS,
 DEVCONF_RTR_SOLICITS,
 DEVCONF_RTR_SOLICIT_INTERVAL,
 DEVCONF_RTR_SOLICIT_DELAY,
 DEVCONF_USE_TEMPADDR,
 DEVCONF_TEMP_VALID_LFT,
 DEVCONF_TEMP_PREFERED_LFT,
 DEVCONF_REGEN_MAX_RETRY,
 DEVCONF_MAX_DESYNC_FACTOR,
 DEVCONF_MAX_ADDRESSES,
 DEVCONF_FORCE_MLD_VERSION,
 DEVCONF_ACCEPT_RA_DEFRTR,
 DEVCONF_ACCEPT_RA_PINFO,
 DEVCONF_ACCEPT_RA_RTR_PREF,
 DEVCONF_RTR_PROBE_INTERVAL,
 DEVCONF_ACCEPT_RA_RT_INFO_MAX_PLEN,
 DEVCONF_PROXY_NDP,
 DEVCONF_OPTIMISTIC_DAD,
 DEVCONF_ACCEPT_SOURCE_ROUTE,
 DEVCONF_MC_FORWARDING,
 DEVCONF_DISABLE_IPV6,
 DEVCONF_ACCEPT_DAD,
 DEVCONF_FORCE_TLLAO,
 DEVCONF_NDISC_NOTIFY,
 DEVCONF_MLDV1_UNSOLICITED_REPORT_INTERVAL,
 DEVCONF_MLDV2_UNSOLICITED_REPORT_INTERVAL,
 DEVCONF_SUPPRESS_FRAG_NDISC,
 DEVCONF_ACCEPT_RA_FROM_LOCAL,
 DEVCONF_USE_OPTIMISTIC,
 DEVCONF_ACCEPT_RA_MTU,
 DEVCONF_STABLE_SECRET,
 DEVCONF_USE_OIF_ADDRS_ONLY,
 DEVCONF_ACCEPT_RA_MIN_HOP_LIMIT,
 DEVCONF_IGNORE_ROUTES_WITH_LINKDOWN,
 DEVCONF_DROP_UNICAST_IN_L2_MULTICAST,
 DEVCONF_DROP_UNSOLICITED_NA,
 DEVCONF_KEEP_ADDR_ON_DOWN,
 DEVCONF_RTR_SOLICIT_MAX_INTERVAL,
 DEVCONF_SEG6_ENABLED,
 DEVCONF_SEG6_REQUIRE_HMAC,
 DEVCONF_ENHANCED_DAD,
 DEVCONF_ADDR_GEN_MODE,
 DEVCONF_DISABLE_POLICY,
 DEVCONF_ACCEPT_RA_RT_INFO_MIN_PLEN,
 DEVCONF_NDISC_TCLASS,
 DEVCONF_RPL_SEG_ENABLED,
 DEVCONF_RA_DEFRTR_METRIC,
 DEVCONF_IOAM6_ENABLED,
 DEVCONF_IOAM6_ID,
 DEVCONF_IOAM6_ID_WIDE,
 DEVCONF_NDISC_EVICT_NOCARRIER,
 DEVCONF_ACCEPT_UNTRACKED_NA,
 DEVCONF_MAX
};
# 11 "/var/lib/cilium/bpf/lib/common.h" 2
# 1 "/var/lib/cilium/bpf/include/linux/in.h" 1
# 25 "/var/lib/cilium/bpf/include/linux/in.h"
enum {
  IPPROTO_IP = 0,

  IPPROTO_ICMP = 1,

  IPPROTO_IGMP = 2,

  IPPROTO_IPIP = 4,

  IPPROTO_TCP = 6,

  IPPROTO_EGP = 8,

  IPPROTO_PUP = 12,

  IPPROTO_UDP = 17,

  IPPROTO_IDP = 22,

  IPPROTO_TP = 29,

  IPPROTO_DCCP = 33,

  IPPROTO_IPV6 = 41,

  IPPROTO_RSVP = 46,

  IPPROTO_GRE = 47,

  IPPROTO_ESP = 50,

  IPPROTO_AH = 51,

  IPPROTO_MTP = 92,

  IPPROTO_BEETPH = 94,

  IPPROTO_ENCAP = 98,

  IPPROTO_PIM = 103,

  IPPROTO_COMP = 108,

  IPPROTO_SCTP = 132,

  IPPROTO_UDPLITE = 136,

  IPPROTO_MPLS = 137,

  IPPROTO_RAW = 255,

  IPPROTO_MAX
};


struct in_addr {
 __be32 s_addr;
};
# 12 "/var/lib/cilium/bpf/lib/common.h" 2
# 1 "/var/lib/cilium/bpf/include/linux/socket.h" 1
# 13 "/var/lib/cilium/bpf/lib/common.h" 2


# 1 "/var/lib/cilium/bpf/lib/eth.h" 1
# 17 "/var/lib/cilium/bpf/lib/eth.h"
union macaddr {
 __u8 addr[6];
 __u64 pad;
};

static inline __attribute__((always_inline)) _Bool eth_addrcmp(const union macaddr *a,
     const union macaddr *b)
{
 return memcmp(a, b, 6);
}

static inline __attribute__((always_inline)) _Bool eth_is_bcast(const union macaddr *a)
{
 union macaddr bcast = { .addr = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff}};

 return !eth_addrcmp(a, &bcast);
}

static inline __attribute__((always_inline)) _Bool eth_is_supported_ethertype(__be16 proto)
{

 return proto >= (__builtin_constant_p(0x0600) ? ((__u16)( ((__u16)(0x0600) << (16 -(0 +1)*8) >> (16 -8) << (1*8)) | ((__u16)(0x0600) << (16 -(1 +1)*8) >> (16 -8) << (0*8)))) : __builtin_bswap16(0x0600));
}

static inline __attribute__((always_inline)) int eth_load_saddr(struct __sk_buff *ctx, __u8 *mac,
       int off)
{
 return skb_load_bytes(ctx, off + 6, mac, 6);
}

static inline __attribute__((always_inline)) int eth_store_saddr_aligned(struct __sk_buff *ctx,
         const __u8 *mac, int off)
{
 return skb_store_bytes(ctx, off + 6, mac, 6, 0);
}

static inline __attribute__((always_inline)) int eth_store_saddr(struct __sk_buff *ctx,
        const __u8 *mac, int off)
{

 return eth_store_saddr_aligned(ctx, mac, off);
# 70 "/var/lib/cilium/bpf/lib/eth.h"
}

static inline __attribute__((always_inline)) int eth_load_daddr(struct __sk_buff *ctx, __u8 *mac,
       int off)
{
 return skb_load_bytes(ctx, off, mac, 6);
}

static inline __attribute__((always_inline)) int eth_store_daddr_aligned(struct __sk_buff *ctx,
         const __u8 *mac, int off)
{
 return skb_store_bytes(ctx, off, mac, 6, 0);
}

static inline __attribute__((always_inline)) int eth_store_daddr(struct __sk_buff *ctx,
        const __u8 *mac, int off)
{

 return eth_store_daddr_aligned(ctx, mac, off);
# 101 "/var/lib/cilium/bpf/lib/eth.h"
}

static inline __attribute__((always_inline)) int eth_store_proto(struct __sk_buff *ctx,
        const __u16 proto, int off)
{
 return skb_store_bytes(ctx, off + 6 + 6,
          &proto, sizeof(proto), 0);
}
# 16 "/var/lib/cilium/bpf/lib/common.h" 2
# 1 "/var/lib/cilium/bpf/lib/mono.h" 1
# 17 "/var/lib/cilium/bpf/lib/common.h" 2
# 1 "/var/lib/cilium/bpf/lib/config.h" 1
# 18 "/var/lib/cilium/bpf/lib/common.h" 2
# 1 "/var/lib/cilium/bpf/lib/tunnel.h" 1
# 29 "/var/lib/cilium/bpf/lib/tunnel.h"
struct geneve_opt_hdr {
 __be16 opt_class;
 __u8 type;

 __u8 length:5, rsvd:3;



};

struct geneve_dsr_opt4 {
 struct geneve_opt_hdr hdr;
 __be32 addr;
 __be16 port;
 __u16 pad;
};

struct geneve_dsr_opt6 {
 struct geneve_opt_hdr hdr;
 struct in6_addr addr;
 __be16 port;
 __u16 pad;
};

struct genevehdr {

 __u8 opt_len:6, ver:2;
 __u8 rsvd:6, critical:1, control:1;




 __be16 protocol_type;
 __u8 vni[3];
 __u8 reserved;
};

struct vxlanhdr {
 __be32 vx_flags;
 __be32 vx_vni;
};

static inline __attribute__((always_inline)) __u32 tunnel_vni_to_sec_identity(__be32 vni)
{
 return (__builtin_constant_p(vni) ? ((__u32)( ((__u32)(vni) << (32 -(0 +1)*8) >> (32 -8) << (3*8)) | ((__u32)(vni) << (32 -(1 +1)*8) >> (32 -8) << (2*8)) | ((__u32)(vni) << (32 -(2 +1)*8) >> (32 -8) << (1*8)) | ((__u32)(vni) << (32 -(3 +1)*8) >> (32 -8) << (0*8)))) : __builtin_bswap32(vni)) >> 8;
}

static inline __attribute__((always_inline)) __be32 sec_identity_to_tunnel_vni(__u32 sec_identity)
{
 return (__builtin_constant_p(sec_identity << 8) ? ((__u32)( ((__u32)(sec_identity << 8) << (32 -(0 +1)*8) >> (32 -8) << (3*8)) | ((__u32)(sec_identity << 8) << (32 -(1 +1)*8) >> (32 -8) << (2*8)) | ((__u32)(sec_identity << 8) << (32 -(2 +1)*8) >> (32 -8) << (1*8)) | ((__u32)(sec_identity << 8) << (32 -(3 +1)*8) >> (32 -8) << (0*8)))) : __builtin_bswap32(sec_identity << 8));
}
# 19 "/var/lib/cilium/bpf/lib/common.h" 2
# 1 "/var/lib/cilium/bpf/lib/notify.h" 1
# 13 "/var/lib/cilium/bpf/lib/notify.h"
enum {
 CILIUM_NOTIFY_UNSPEC,
 CILIUM_NOTIFY_DROP,
 CILIUM_NOTIFY_DBG_MSG,
 CILIUM_NOTIFY_DBG_CAPTURE,
 CILIUM_NOTIFY_TRACE,
 CILIUM_NOTIFY_POLICY_VERDICT,
 CILIUM_NOTIFY_CAPTURE,
 CILIUM_NOTIFY_TRACE_SOCK,
};
# 48 "/var/lib/cilium/bpf/lib/notify.h"
enum trace_point {
 TRACE_POINT_UNKNOWN = -1,
 TRACE_TO_LXC,
 TRACE_TO_PROXY,
 TRACE_TO_HOST,
 TRACE_TO_STACK,
 TRACE_TO_OVERLAY,
 TRACE_FROM_LXC,
 TRACE_FROM_PROXY,
 TRACE_FROM_HOST,
 TRACE_FROM_STACK,
 TRACE_FROM_OVERLAY,
 TRACE_FROM_NETWORK,
 TRACE_TO_NETWORK,
 TRACE_FROM_CRYPTO,
 TRACE_TO_CRYPTO,
} __attribute__((packed));
# 20 "/var/lib/cilium/bpf/lib/common.h" 2
# 1 "/var/lib/cilium/bpf/lib/drop_reasons.h" 1
# 21 "/var/lib/cilium/bpf/lib/common.h" 2

# 1 "/var/lib/cilium/bpf/lib/source_info.h" 1
# 30 "/var/lib/cilium/bpf/lib/source_info.h"
static inline __attribute__((always_inline)) int
__id_for_file(const char *const header_name)
{



 do { if (!__builtin_strcmp(header_name, "bpf_host.c")) return 1; } while (0);
 do { if (!__builtin_strcmp(header_name, "bpf_lxc.c")) return 2; } while (0);
 do { if (!__builtin_strcmp(header_name, "bpf_overlay.c")) return 3; } while (0);
 do { if (!__builtin_strcmp(header_name, "bpf_xdp.c")) return 4; } while (0);
 do { if (!__builtin_strcmp(header_name, "bpf_sock.c")) return 5; } while (0);
 do { if (!__builtin_strcmp(header_name, "bpf_network.c")) return 6; } while (0);
 do { if (!__builtin_strcmp(header_name, "bpf_wireguard.c")) return 7; } while (0);


 do { if (!__builtin_strcmp(header_name, "arp.h")) return 101; } while (0);
 do { if (!__builtin_strcmp(header_name, "drop.h")) return 102; } while (0);
 do { if (!__builtin_strcmp(header_name, "srv6.h")) return 103; } while (0);
 do { if (!__builtin_strcmp(header_name, "icmp6.h")) return 104; } while (0);
 do { if (!__builtin_strcmp(header_name, "nodeport.h")) return 105; } while (0);
 do { if (!__builtin_strcmp(header_name, "lb.h")) return 106; } while (0);
 do { if (!__builtin_strcmp(header_name, "mcast.h")) return 107; } while (0);
 do { if (!__builtin_strcmp(header_name, "ipv4.h")) return 108; } while (0);
 do { if (!__builtin_strcmp(header_name, "conntrack.h")) return 109; } while (0);
 do { if (!__builtin_strcmp(header_name, "local_delivery.h")) return 110; } while (0);
 do { if (!__builtin_strcmp(header_name, "trace.h")) return 111; } while (0);
 do { if (!__builtin_strcmp(header_name, "encap.h")) return 112; } while (0);
 do { if (!__builtin_strcmp(header_name, "encrypt.h")) return 113; } while (0);
 do { if (!__builtin_strcmp(header_name, "host_firewall.h")) return 114; } while (0);
 do { if (!__builtin_strcmp(header_name, "nodeport_egress.h")) return 115; } while (0);
 do { if (!__builtin_strcmp(header_name, "ipv6.h")) return 116; } while (0);
 do { if (!__builtin_strcmp(header_name, "classifiers.h")) return 117; } while (0);



 return 0;
}
# 23 "/var/lib/cilium/bpf/lib/common.h" 2
# 67 "/var/lib/cilium/bpf/lib/common.h"
enum {
 XFER_PKT_NO_SVC = (1 << 0),
 XFER_UNUSED = (1 << 1),
 XFER_PKT_SNAT_DONE = (1 << 2),
};


enum {
 XFER_FLAGS = 0,
};




typedef __u64 mac_t;

union v4addr {
 __be32 be32;
 __u8 addr[4];
};

union v6addr {
 __u8 addr[16];
 struct {
  __u32 p1;
  __u32 p2;
  __u32 p3;
  __u32 p4;
 } p;




 struct {
  __u64 d1;
  __u64 d2;
 } d;


} __attribute__((packed));

static inline __attribute__((always_inline)) _Bool validate_ethertype_l2_off(struct __sk_buff *ctx,
            int l2_off, __u16 *proto)
{
 const __u64 tot_len = l2_off + __config_eth_header_length;
 void *data_end = ctx_data_end(ctx);
 void *data = ctx_data(ctx);
 struct ethhdr *eth;

 if (__config_eth_header_length == 0) {



  *proto = ctx_get_protocol(ctx);
  return true;
 }

 if (data + tot_len > data_end)
  return false;

 eth = data + l2_off;

 *proto = eth->h_proto;

 return eth_is_supported_ethertype(*proto);
}

static inline __attribute__((always_inline)) _Bool validate_ethertype(struct __sk_buff *ctx,
            __u16 *proto)
{
 return validate_ethertype_l2_off(ctx, 0, proto);
}

static inline __attribute__((always_inline)) __attribute__((__unused__)) _Bool
____revalidate_data_pull(struct __sk_buff *ctx, void **data_, void **data_end_,
    void **l3, const __u32 l3_len, const _Bool pull,
    __u32 l3_off)
{
 const __u64 tot_len = l3_off + l3_len;
 void *data_end;
 void *data;


 if (pull)
  skb_pull_data(ctx, (__u32)tot_len);
 data_end = ctx_data_end(ctx);
 data = ctx_data(ctx);
 if (data + tot_len > data_end)
  return false;


 *data_ = data;
 *data_end_ = data_end;

 *l3 = data + l3_off;
 return true;
}

static inline __attribute__((always_inline)) __attribute__((__unused__)) _Bool
__revalidate_data_pull(struct __sk_buff *ctx, void **data, void **data_end,
         void **l3, const __u32 l3_off, const __u32 l3_len,
         const _Bool pull)
{
 return ____revalidate_data_pull(ctx, data, data_end, l3, l3_len, pull,
     l3_off);
}

static inline __attribute__((always_inline)) __u32 get_tunnel_id(__u32 identity)
{

 if (identity == 9 || identity == 10)
  return 2;

 return identity;
}

static inline __attribute__((always_inline)) __u32 get_id_from_tunnel_id(__u32 tunnel_id, __u16 proto __attribute__((__unused__)))
{

 if (tunnel_id == 2) {
  switch (proto) {
  case (__builtin_constant_p(0x0800) ? ((__u16)( ((__u16)(0x0800) << (16 -(0 +1)*8) >> (16 -8) << (1*8)) | ((__u16)(0x0800) << (16 -(1 +1)*8) >> (16 -8) << (0*8)))) : __builtin_bswap16(0x0800)):
   return 9;
  case (__builtin_constant_p(0x86DD) ? ((__u16)( ((__u16)(0x86DD) << (16 -(0 +1)*8) >> (16 -8) << (1*8)) | ((__u16)(0x86DD) << (16 -(1 +1)*8) >> (16 -8) << (0*8)))) : __builtin_bswap16(0x86DD)):
   return 10;
  }
 }

 return tunnel_id;
}
# 224 "/var/lib/cilium/bpf/lib/common.h"
struct endpoint_key {
 union {
  struct {
   __u32 ip4;
   __u32 pad1;
   __u32 pad2;
   __u32 pad3;
  };
  union v6addr ip6;
 };
 __u8 family;
 __u8 key;
 __u16 cluster_id;
} __attribute__((packed));






struct endpoint_info {
 __u32 ifindex;
 __u16 unused;
 __u16 lxc_id;
 __u32 flags;
 mac_t mac;
 mac_t node_mac;
 __u32 sec_id;
 __u32 parent_ifindex;
 __u32 pad[2];
};




struct edt_id {
 __u32 id;
 __u8 direction;
 __u8 pad[3];
};

struct edt_info {
 __u64 bps;
 __u64 t_last;
 union {
  __u64 t_horizon_drop;
  __u64 tokens;
 };
 __u32 prio;
 __u32 pad_32;
 __u64 pad[3];
};

struct remote_endpoint_info {
 __u32 sec_identity;
 union {
  struct {
   __u32 ip4;
   __u32 pad1;
   __u32 pad2;
   __u32 pad3;
  };
  union v6addr ip6;
 } tunnel_endpoint;
 __u16 pad;
 __u8 key;
 __u8 flag_skip_tunnel:1,
   flag_has_tunnel_ep:1,
   flag_ipv6_tunnel_ep:1,
   pad2:5;
};
# 315 "/var/lib/cilium/bpf/lib/common.h"
struct policy_key {
 struct bpf_lpm_trie_key lpm_key;
 __u32 sec_label;
 __u8 egress:1,
   pad:7;
 __u8 protocol;
 __be16 dport;
};





struct policy_entry {
 __be16 proxy_port;
 __u8 deny:1,
   reserved:2,
   lpm_prefix_length:5;
 __u8 auth_type:7,
   has_explicit_auth_type:1;
 __u8 proxy_port_priority;
 __u8 pad1;
 __u16 pad2;
};
# 350 "/var/lib/cilium/bpf/lib/common.h"
struct policy_stats_key {
 __u16 endpoint_id;
 __u8 pad1;
 __u8 prefix_len;
 __u32 sec_label;
 __u8 egress:1,
   pad:7;
 __u8 protocol;
 __be16 dport;
};

struct policy_stats_value {
 __u64 packets;
 __u64 bytes;
};

struct auth_key {
 __u32 local_sec_label;
 __u32 remote_sec_label;
 __u16 remote_node_id;
 __u8 auth_type;
 __u8 pad;
};


struct auth_info {
 __u64 expiration;
};

struct metrics_key {
 __u8 reason;
 __u8 dir:2,
    pad:6;
 __u16 line;
 __u8 file;
 __u8 reserved[3];
};


struct metrics_value {
 __u64 count;
 __u64 bytes;
};

struct egress_gw_policy_key {
 struct bpf_lpm_trie_key lpm_key;
 __u32 saddr;
 __u32 daddr;
};

struct egress_gw_policy_entry {
 __u32 egress_ip;
 __u32 gateway_ip;
};

struct egress_gw_policy_key6 {
 struct bpf_lpm_trie_key lpm_key;
 union v6addr saddr;
 union v6addr daddr;
};

struct egress_gw_policy_entry6 {
 union v6addr egress_ip;
 __u32 gateway_ip;
 __u32 reserved[3];
 __u32 egress_ifindex;
 __u32 reserved2;
};

struct srv6_vrf_key4 {
 struct bpf_lpm_trie_key lpm;
 __u32 src_ip;
 __u32 dst_cidr;
};

struct srv6_vrf_key6 {
 struct bpf_lpm_trie_key lpm;
 union v6addr src_ip;
 union v6addr dst_cidr;
};

struct srv6_policy_key4 {
 struct bpf_lpm_trie_key lpm;
 __u32 vrf_id;
 __u32 dst_cidr;
};

struct srv6_policy_key6 {
 struct bpf_lpm_trie_key lpm;
 __u32 vrf_id;
 union v6addr dst_cidr;
};

struct node_key {
 __u16 pad1;
 __u8 pad2;
 __u8 family;
 union {
  struct {
   __u32 ip4;
   __u32 pad4;
   __u32 pad5;
   __u32 pad6;
  };
  union v6addr ip6;
 };
};

struct node_value {
 __u16 id;
 __u8 spi;
 __u8 pad;
};

enum {
 POLICY_INGRESS = 1,
 POLICY_EGRESS = 2,
};

enum {
 POLICY_MATCH_NONE = 0,
 POLICY_MATCH_L3_ONLY = 1,
 POLICY_MATCH_L3_L4 = 2,
 POLICY_MATCH_L4_ONLY = 3,
 POLICY_MATCH_ALL = 4,
 POLICY_MATCH_L3_PROTO = 5,
 POLICY_MATCH_PROTO_ONLY = 6,
};

enum {
 CAPTURE_INGRESS = 1,
 CAPTURE_EGRESS = 2,
};
# 525 "/var/lib/cilium/bpf/lib/common.h"
enum metric_dir {
 METRIC_INGRESS = 1,
 METRIC_EGRESS,
 METRIC_SERVICE
} __attribute__((packed));
# 628 "/var/lib/cilium/bpf/lib/common.h"
struct encrypt_config {
 __u8 encrypt_key;
} __attribute__((packed));
# 656 "/var/lib/cilium/bpf/lib/common.h"
enum {
 CB_SRC_LABEL,






 CB_1,
# 673 "/var/lib/cilium/bpf/lib/common.h"
 CB_2,




 CB_3,




 CB_CT_STATE,







};
# 704 "/var/lib/cilium/bpf/lib/common.h"
enum ct_dir {
 CT_EGRESS,
 CT_INGRESS,
 CT_SERVICE,
} __attribute__((packed));







enum ct_status {
 CT_NEW,
 CT_ESTABLISHED,
 CT_REPLY,
 CT_RELATED,
} __attribute__((packed));


enum {
 SVC_FLAG_EXTERNAL_IP = (1 << 0),
 SVC_FLAG_NODEPORT = (1 << 1),
 SVC_FLAG_EXT_LOCAL_SCOPE = (1 << 2),
 SVC_FLAG_HOSTPORT = (1 << 3),
 SVC_FLAG_AFFINITY = (1 << 4),
 SVC_FLAG_LOADBALANCER = (1 << 5),
 SVC_FLAG_ROUTABLE = (1 << 6),
 SVC_FLAG_SOURCE_RANGE = (1 << 7),
};


enum {
 SVC_FLAG_LOCALREDIRECT = (1 << 0),
 SVC_FLAG_NAT_46X64 = (1 << 1),
 SVC_FLAG_L7_LOADBALANCER = (1 << 2),
 SVC_FLAG_LOOPBACK = (1 << 3),
 SVC_FLAG_L7_DELEGATE = (1 << 3),
 SVC_FLAG_INT_LOCAL_SCOPE = (1 << 4),
 SVC_FLAG_TWO_SCOPES = (1 << 5),
 SVC_FLAG_QUARANTINED = (1 << 6),
 SVC_FLAG_SOURCE_RANGE_DENY = (1 << 6),
 SVC_FLAG_FWD_MODE_DSR = (1 << 7),
};


enum {
 BE_STATE_ACTIVE = 0,
 BE_STATE_TERMINATING,
 BE_STATE_QUARANTINED,
 BE_STATE_MAINTENANCE,
};

struct ipv6_ct_tuple {



 union v6addr daddr;
 union v6addr saddr;



 __be16 dport;
 __be16 sport;
 __u8 nexthdr;
 __u8 flags;
} __attribute__((packed));

struct ipv4_ct_tuple {



 __be32 daddr;
 __be32 saddr;



 __be16 dport;
 __be16 sport;
 __u8 nexthdr;
 __u8 flags;
} __attribute__((packed));

struct ct_entry {
 __u64 reserved0;
 __u64 backend_id;
 __u64 packets;
 __u64 bytes;
 __u32 lifetime;
 __u16 rx_closing:1,
       tx_closing:1,
       reserved1:1,
       lb_loopback:1,
       seen_non_syn:1,
       node_port:1,
       proxy_redirect:1,
       dsr_internal:1,
       from_l7lb:1,
       reserved2:1,
       from_tunnel:1,
       reserved3:5;
 __u16 rev_nat_index;
 __u16 reserved4;




 __u8 tx_flags_seen;
 __u8 rx_flags_seen;

 __u32 src_sec_id;




 __u32 last_tx_report;
 __u32 last_rx_report;
};



struct lb6_key {
 union v6addr address;
 __be16 dport;
 __u16 backend_slot;
 __u8 proto;
 __u8 scope;
 __u8 pad[2];
};


struct lb6_service {
 union {
  __u32 backend_id;

  __u32 affinity_timeout;
  __u32 l7_lb_proxy_port;
 };
 __u16 count;
 __u16 rev_nat_index;
 __u8 flags;
 __u8 flags2;
 __u16 qcount;
};


struct lb6_backend {
 union v6addr address;
 __be16 port;
 __u8 proto;
 __u8 flags;
 __u16 cluster_id;



 __u8 zone;
 __u8 pad;
};

struct lb6_health {
 struct lb6_backend peer;
};

struct lb6_reverse_nat {
 union v6addr address;
 __be16 port;
} __attribute__((packed));

struct ipv6_revnat_tuple {
 __sock_cookie cookie;
 union v6addr address;
 __be16 port;
 __u16 pad;
};

struct ipv6_revnat_entry {
 union v6addr address;
 __be16 port;
 __u16 rev_nat_index;
};

struct lb4_key {
 __be32 address;
 __be16 dport;
 __u16 backend_slot;
 __u8 proto;
 __u8 scope;
 __u8 pad[2];
};




struct lb4_service {
 union {

  __u32 backend_id;
# 911 "/var/lib/cilium/bpf/lib/common.h"
  __u32 affinity_timeout;



  __u32 l7_lb_proxy_port;
 };



 __u16 count;
 __u16 rev_nat_index;
 __u8 flags;
 __u8 flags2;



 __u16 qcount;
};

struct lb4_backend {
 __be32 address;
 __be16 port;
 __u8 proto;
 __u8 flags;
 __u16 cluster_id;



 __u8 zone;
 __u8 pad;
};

struct lb4_health {
 struct lb4_backend peer;
};

struct lb4_reverse_nat {
 __be32 address;
 __be16 port;
} __attribute__((packed));

struct ipv4_revnat_tuple {
 __sock_cookie cookie;
 __be32 address;
 __be16 port;
 __u16 pad;
};

struct ipv4_revnat_entry {
 __be32 address;
 __be16 port;
 __u16 rev_nat_index;
};

union lb4_affinity_client_id {
 __u32 client_ip;
 __net_cookie client_cookie;
} __attribute__((packed));

struct lb4_affinity_key {
 union lb4_affinity_client_id client_id;
 __u16 rev_nat_id;
 __u8 netns_cookie:1,
      reserved:7;
 __u8 pad1;
 __u32 pad2;
} __attribute__((packed));

union lb6_affinity_client_id {
 union v6addr client_ip;
 __net_cookie client_cookie;
} __attribute__((packed));

struct lb6_affinity_key {
 union lb6_affinity_client_id client_id;
 __u16 rev_nat_id;
 __u8 netns_cookie:1,
      reserved:7;
 __u8 pad1;
 __u32 pad2;
} __attribute__((packed));

struct lb_affinity_val {
 __u64 last_used;
 __u32 backend_id;
 __u32 pad;
} __attribute__((packed));

struct lb_affinity_match {
 __u32 backend_id;
 __u16 rev_nat_id;
 __u16 pad;
} __attribute__((packed));

struct ct_state {
 __u16 rev_nat_index;



 __u16 loopback_disabled:1,

       node_port:1,
       dsr_internal:1,
       syn:1,
       proxy_redirect:1,
       from_l7lb:1,
       reserved1:1,
       from_tunnel:1,
    closing:1,
       reserved:7;
 __u32 src_sec_id;
 __u32 backend_id;
};

static inline __attribute__((always_inline)) _Bool ct_state_is_from_l7lb(const struct ct_state *ct_state __attribute__((__unused__)))
{



 return false;

}




struct lb4_src_range_key {
 struct bpf_lpm_trie_key lpm_key;
 __u16 rev_nat_id;
 __u16 pad;
 __u32 addr;
};

struct lb6_src_range_key {
 struct bpf_lpm_trie_key lpm_key;
 __u16 rev_nat_id;
 __u16 pad;
 union v6addr addr;
};

static inline __attribute__((always_inline)) __u64 ctx_adjust_hroom_flags(void)
{
 return BPF_F_ADJ_ROOM_NO_CSUM_RESET;
}

struct lpm_v4_key {
 struct bpf_lpm_trie_key lpm;
 __u8 addr[4];
};

struct lpm_v6_key {
 struct bpf_lpm_trie_key lpm;
 __u8 addr[16];
};

struct lpm_val {

 __u8 flags;
};

struct skip_lb4_key {
 __u64 netns_cookie;
 __u32 address;
 __u16 port;
 __u16 pad;
};

struct skip_lb6_key {
 __u64 netns_cookie;
 union v6addr address;
 __u32 pad;
 __u16 port;
 __u16 pad2;
};






# 1 "/var/lib/cilium/bpf/lib/overloadable.h" 1
# 10 "/var/lib/cilium/bpf/lib/overloadable.h"
# 1 "/var/lib/cilium/bpf/lib/overloadable_skb.h" 1






# 1 "/var/lib/cilium/bpf/include/linux/ip.h" 1
# 87 "/var/lib/cilium/bpf/include/linux/ip.h"
struct iphdr {

 __u8 ihl:4,
  version:4;






 __u8 tos;
 __be16 tot_len;
 __be16 id;
 __be16 frag_off;
 __u8 ttl;
 __u8 protocol;
 __sum16 check;
 __be32 saddr;
 __be32 daddr;

};


struct ip_auth_hdr {
 __u8 nexthdr;
 __u8 hdrlen;
 __be16 reserved;
 __be32 spi;
 __be32 seq_no;
 __u8 auth_data[0];
};

struct ip_esp_hdr {
 __be32 spi;
 __be32 seq_no;
 __u8 enc_data[0];
};

struct ip_comp_hdr {
 __u8 nexthdr;
 __u8 flags;
 __be16 cpi;
};

struct ip_beet_phdr {
 __u8 nexthdr;
 __u8 hdrlen;
 __u8 padlen;
 __u8 reserved;
};
# 8 "/var/lib/cilium/bpf/lib/overloadable_skb.h" 2
# 1 "/var/lib/cilium/bpf/lib/clustermesh.h" 1
# 15 "/var/lib/cilium/bpf/lib/clustermesh.h"
static inline __attribute__((always_inline)) __u32
get_identity_len()
{
 __u32 identity_len = __config_identity_length;
 return identity_len;
}




static inline __attribute__((always_inline)) __u32
extract_cluster_id_from_identity(__u32 identity)
{
 return (__u32)(identity >> get_identity_len());
}

static inline __attribute__((always_inline)) __u32
get_max_identity()
{
 return (__u32)((1 << get_identity_len()) - 1);
}

static inline __attribute__((always_inline)) __attribute__((__unused__)) __u32
get_cluster_id_upper_mask()
{
 return (255 & ~0x000000FF) << (8 + get_identity_len());
}

static inline __attribute__((always_inline)) __attribute__((__unused__)) __u32
get_mark_magic_cluster_id_mask()
{
 return 0x000000FF | get_cluster_id_upper_mask();
}
# 9 "/var/lib/cilium/bpf/lib/overloadable_skb.h" 2


static inline __attribute__((always_inline)) __attribute__((__unused__)) void
bpf_clear_meta(struct __sk_buff *ctx)
{
 __u32 zero = 0;

 ({ typeof(ctx->cb[0]) __val = (zero); (*(volatile typeof(ctx->cb[0]) *)&ctx->cb[0]) = (__val); bpf_barrier(); __val; });
 ({ typeof(ctx->cb[1]) __val = (zero); (*(volatile typeof(ctx->cb[1]) *)&ctx->cb[1]) = (__val); bpf_barrier(); __val; });
 ({ typeof(ctx->cb[2]) __val = (zero); (*(volatile typeof(ctx->cb[2]) *)&ctx->cb[2]) = (__val); bpf_barrier(); __val; });
 ({ typeof(ctx->cb[3]) __val = (zero); (*(volatile typeof(ctx->cb[3]) *)&ctx->cb[3]) = (__val); bpf_barrier(); __val; });
 ({ typeof(ctx->cb[4]) __val = (zero); (*(volatile typeof(ctx->cb[4]) *)&ctx->cb[4]) = (__val); bpf_barrier(); __val; });


 ({ typeof(ctx->tc_classid) __val = (zero); (*(volatile typeof(ctx->tc_classid) *)&ctx->tc_classid) = (__val); bpf_barrier(); __val; });
}

static inline __attribute__((always_inline)) __attribute__((__unused__)) void
ctx_store_meta_ipv6(struct __sk_buff *ctx, const __u32 off, const union v6addr *addr)
{
 ctx_store_meta(ctx, off, addr->p.p1);
 ctx_store_meta(ctx, off + 1, addr->p.p2);
 ctx_store_meta(ctx, off + 2, addr->p.p3);
 ctx_store_meta(ctx, off + 3, addr->p.p4);
}

static inline __attribute__((always_inline)) __attribute__((__unused__)) void
ctx_load_meta_ipv6(const struct __sk_buff *ctx, union v6addr *addr, const __u32 off)
{
 addr->p.p1 = ctx_load_meta(ctx, off);
 addr->p.p2 = ctx_load_meta(ctx, off + 1);
 addr->p.p3 = ctx_load_meta(ctx, off + 2);
 addr->p.p4 = ctx_load_meta(ctx, off + 3);
}
# 62 "/var/lib/cilium/bpf/lib/overloadable_skb.h"
static inline __attribute__((always_inline)) __attribute__((__unused__)) int
get_identity(const struct __sk_buff *ctx)
{
 __u32 cluster_id_lower = ctx->mark & 0x000000FF;
 __u32 cluster_id_upper = (ctx->mark & get_cluster_id_upper_mask()) >> (8 + get_identity_len());
 __u32 identity = (ctx->mark >> 16) & get_max_identity();

 return (cluster_id_lower | cluster_id_upper) << get_identity_len() | identity;
}




static inline __attribute__((always_inline)) __attribute__((__unused__)) __u16
get_epid(const struct __sk_buff *ctx)
{
 return ctx->mark >> 16;
}
# 98 "/var/lib/cilium/bpf/lib/overloadable_skb.h"
static inline __attribute__((always_inline)) __attribute__((__unused__)) void
set_identity_mark(struct __sk_buff *ctx, __u32 identity, __u32 magic)
{
 __u32 cluster_id = (identity >> get_identity_len()) & 255;
 __u32 cluster_id_lower = cluster_id & 0xFF;
 __u32 cluster_id_upper = ((cluster_id & 0xFFFFFF00) << (8 + get_identity_len()));

 ctx->mark = (magic & 0xFF00);
 ctx->mark &= 0xFF00;
 ctx->mark |= (identity & get_max_identity()) << 16 | cluster_id_lower | cluster_id_upper;
}

static inline __attribute__((always_inline)) __attribute__((__unused__)) void
set_identity_meta(struct __sk_buff *ctx, __u32 identity)
{
 ctx->cb[CB_CT_STATE] = identity;
}




static inline __attribute__((always_inline)) __attribute__((__unused__)) void
ctx_set_cluster_id_mark(struct __sk_buff *ctx, __u32 cluster_id)
{
 __u32 cluster_id_lower = (cluster_id & 0xFF);
 __u32 cluster_id_upper = ((cluster_id & 0xFFFFFF00) << (8 + get_identity_len()));

 ctx->mark |= cluster_id_lower | cluster_id_upper | 0x0200;
}

static inline __attribute__((always_inline)) __attribute__((__unused__)) __u32
ctx_get_cluster_id_mark(struct __sk_buff *ctx)
{
 __u32 ret = 0;
 __u32 cluster_id_lower = ctx->mark & 0x000000FF;
 __u32 cluster_id_upper = (ctx->mark & get_cluster_id_upper_mask()) >> (8 + get_identity_len());

 if ((ctx->mark & 0x0200) != 0x0200)
  return ret;

 ret = (cluster_id_upper | cluster_id_lower) & 255;
 ctx->mark &= ~(__u32)(0x0200 | get_mark_magic_cluster_id_mask());

 return ret;
}

static inline __attribute__((always_inline)) __attribute__((__unused__)) int
redirect_self(const struct __sk_buff *ctx)
{



 return (int)ctx_redirect(ctx, ctx->ifindex, 0);
}

static inline __attribute__((always_inline)) __attribute__((__unused__)) _Bool
neigh_resolver_available(void)
{
 return true;
}

static inline __attribute__((always_inline)) __attribute__((__unused__)) void
ctx_skip_nodeport_clear(struct __sk_buff *ctx __attribute__((__unused__)))
{



}

static inline __attribute__((always_inline)) __attribute__((__unused__)) void
ctx_skip_nodeport_set(struct __sk_buff *ctx __attribute__((__unused__)))
{



}

static inline __attribute__((always_inline)) __attribute__((__unused__)) _Bool
ctx_skip_nodeport(struct __sk_buff *ctx __attribute__((__unused__)))
{





 return true;

}
# 204 "/var/lib/cilium/bpf/lib/overloadable_skb.h"
static inline __attribute__((always_inline)) __attribute__((__unused__)) __u32 ctx_get_xfer(struct __sk_buff *ctx,
        __u32 off)
{
 __u32 *data_meta = ctx_data_meta(ctx);
 void *data = ctx_data(ctx);

 return !ctx_no_room(data_meta + off + 1, data) ? data_meta[off] : 0;
}

static inline __attribute__((always_inline)) __attribute__((__unused__)) void
ctx_set_xfer(struct __sk_buff *ctx __attribute__((__unused__)), __u32 meta __attribute__((__unused__)))
{

}

static inline __attribute__((always_inline)) __attribute__((__unused__)) void
ctx_move_xfer(struct __sk_buff *ctx __attribute__((__unused__)))
{

}

static inline __attribute__((always_inline)) __attribute__((__unused__)) int
ctx_change_head(struct __sk_buff *ctx, __u32 head_room, __u64 flags)
{
 return skb_change_head(ctx, head_room, flags);
}

static inline __attribute__((always_inline)) void ctx_snat_done_set(struct __sk_buff *ctx)
{
 ctx->mark &= ~0x0F00;
 ctx->mark |= 0x0300;
}

static inline __attribute__((always_inline)) _Bool ctx_snat_done(const struct __sk_buff *ctx)
{
 return (ctx->mark & 0x0F00) == 0x0300;
}

static inline __attribute__((always_inline)) _Bool ctx_is_overlay(const struct __sk_buff *ctx)
{
 if (!0)
  return false;

 return (ctx->mark & 0x0F00) == 0x0400;
}

static inline __attribute__((always_inline)) _Bool ctx_is_overlay_encrypted(const struct __sk_buff *ctx)
{
 if (!0)
  return false;

 return (ctx->mark & 0xFF00) == (0x0400 | 0x1000);
}

static inline __attribute__((always_inline)) _Bool ctx_mark_is_wireguard(const struct __sk_buff *ctx)
{
 if (!0)
  return false;


 return (ctx->mark & 0x1E00) == 0x1E00 ||
   (ctx->mark & 0x0F00) == 0x0E00;
}
# 11 "/var/lib/cilium/bpf/lib/overloadable.h" 2
# 1092 "/var/lib/cilium/bpf/lib/common.h" 2
# 28 "/var/lib/cilium/bpf/bpf_host.c" 2
# 1 "/var/lib/cilium/bpf/lib/config_map.h" 1
# 19 "/var/lib/cilium/bpf/lib/config_map.h"
struct {
 int(*(type))[BPF_MAP_TYPE_ARRAY];
 typeof(__u32) *(key);
 typeof(__u64) *(value);
 int(*(pinning))[1];
 int(*(max_entries))[256];
} cilium_runtime_config __attribute__((section(".maps"), used));




enum runtime_config {
 RUNTIME_CONFIG_UTIME_OFFSET = 0,



 RUNTIME_CONFIG_AGENT_LIVENESS = 1,
};





static inline __attribute__((always_inline)) __u64 config_get(enum runtime_config index)
{
 __u64 *val = map_lookup_elem(&cilium_runtime_config, &index);

 if (__builtin_expect(!!(val), 1))
  return *val;

 return 0;
}





static inline __attribute__((always_inline)) void config_set(enum runtime_config index, __u64 value)
{
 map_update_elem(&cilium_runtime_config, &index, &value, BPF_ANY);
}
# 29 "/var/lib/cilium/bpf/bpf_host.c" 2
# 1 "/var/lib/cilium/bpf/lib/edt.h" 1
# 96 "/var/lib/cilium/bpf/lib/edt.h"
static inline __attribute__((always_inline)) void
edt_set_aggregate(struct __sk_buff *ctx __attribute__((__unused__)),
    __u32 aggregate __attribute__((__unused__)))
{
}
# 30 "/var/lib/cilium/bpf/bpf_host.c" 2
# 1 "/var/lib/cilium/bpf/lib/arp.h" 1





# 1 "/var/lib/cilium/bpf/include/linux/if_arp.h" 1
# 117 "/var/lib/cilium/bpf/include/linux/if_arp.h"
struct arphdr {
 __be16 ar_hrd;
 __be16 ar_pro;
 unsigned char ar_hln;
 unsigned char ar_pln;
 __be16 ar_op;
# 134 "/var/lib/cilium/bpf/include/linux/if_arp.h"
};
# 7 "/var/lib/cilium/bpf/lib/arp.h" 2


# 1 "/var/lib/cilium/bpf/lib/dbg.h" 1






enum {
 DBG_UNSPEC,
 DBG_GENERIC,
 DBG_LOCAL_DELIVERY,
 DBG_ENCAP,
 DBG_LXC_FOUND,
 DBG_POLICY_DENIED,
 DBG_CT_LOOKUP,
 DBG_CT_LOOKUP_REV,
 DBG_CT_MATCH,
 DBG_CT_CREATED,
 DBG_CT_CREATED2,
 DBG_ICMP6_HANDLE,
 DBG_ICMP6_REQUEST,
 DBG_ICMP6_NS,
 DBG_ICMP6_TIME_EXCEEDED,
 DBG_CT_VERDICT,
 DBG_DECAP,
 DBG_PORT_MAP,
 DBG_ERROR_RET,
 DBG_TO_HOST,
 DBG_TO_STACK,
 DBG_PKT_HASH,
 DBG_LB6_LOOKUP_FRONTEND,
 DBG_LB6_LOOKUP_FRONTEND_FAIL,
 DBG_LB6_LOOKUP_BACKEND_SLOT,
 DBG_LB6_LOOKUP_BACKEND_SLOT_SUCCESS,
 DBG_LB6_LOOKUP_BACKEND_SLOT_V2_FAIL,
 DBG_LB6_LOOKUP_BACKEND_FAIL,
 DBG_LB6_REVERSE_NAT_LOOKUP,
 DBG_LB6_REVERSE_NAT,
 DBG_LB4_LOOKUP_FRONTEND,
 DBG_LB4_LOOKUP_FRONTEND_FAIL,
 DBG_LB4_LOOKUP_BACKEND_SLOT,
 DBG_LB4_LOOKUP_BACKEND_SLOT_SUCCESS,
 DBG_LB4_LOOKUP_BACKEND_SLOT_V2_FAIL,
 DBG_LB4_LOOKUP_BACKEND_FAIL,
 DBG_LB4_REVERSE_NAT_LOOKUP,
 DBG_LB4_REVERSE_NAT,
 DBG_LB4_LOOPBACK_SNAT,
 DBG_LB4_LOOPBACK_SNAT_REV,
 DBG_CT_LOOKUP4,
 DBG_RR_BACKEND_SLOT_SEL,
 DBG_REV_PROXY_LOOKUP,
 DBG_REV_PROXY_FOUND,
 DBG_REV_PROXY_UPDATE,
 DBG_L4_POLICY,
 DBG_NETDEV_IN_CLUSTER,
 DBG_NETDEV_ENCAP4,
 DBG_CT_LOOKUP4_1,



 DBG_CT_LOOKUP4_2,



 DBG_CT_CREATED4,



 DBG_CT_LOOKUP6_1,



 DBG_CT_LOOKUP6_2,



 DBG_CT_CREATED6,



 DBG_SKIP_PROXY,


 DBG_L4_CREATE,



 DBG_IP_ID_MAP_FAILED4,



 DBG_IP_ID_MAP_FAILED6,



 DBG_IP_ID_MAP_SUCCEED4,



 DBG_IP_ID_MAP_SUCCEED6,



 DBG_LB_STALE_CT,



 DBG_INHERIT_IDENTITY,


 DBG_SK_LOOKUP4,



 DBG_SK_LOOKUP6,



 DBG_SK_ASSIGN,


 DBG_L7_LB,



 DBG_SKIP_POLICY,
};


enum {
 DBG_CAPTURE_UNSPEC,
 DBG_CAPTURE_FROM_RESERVED1,
 DBG_CAPTURE_FROM_RESERVED2,
 DBG_CAPTURE_FROM_RESERVED3,
 DBG_CAPTURE_DELIVERY,
 DBG_CAPTURE_FROM_LB,
 DBG_CAPTURE_AFTER_V46,
 DBG_CAPTURE_AFTER_V64,
 DBG_CAPTURE_PROXY_PRE,
 DBG_CAPTURE_PROXY_POST,
 DBG_CAPTURE_SNAT_PRE,
 DBG_CAPTURE_SNAT_POST,
};
# 154 "/var/lib/cilium/bpf/lib/dbg.h"
struct debug_msg {
 __u8 type; __u8 subtype; __u16 source; __u32 hash;
 __u32 arg1;
 __u32 arg2;
 __u32 arg3;
};

struct debug_capture_msg {
 __u8 type; __u8 subtype; __u16 source; __u32 hash; __u32 len_orig; __u16 len_cap; __u16 version;
 __u32 arg1;
 __u32 arg2;
};
# 246 "/var/lib/cilium/bpf/lib/dbg.h"
static inline __attribute__((always_inline))
void cilium_dbg(struct __sk_buff *ctx __attribute__((__unused__)), __u8 type __attribute__((__unused__)),
  __u32 arg1 __attribute__((__unused__)), __u32 arg2 __attribute__((__unused__)))
{
}

static inline __attribute__((always_inline))
void cilium_dbg3(struct __sk_buff *ctx __attribute__((__unused__)),
   __u8 type __attribute__((__unused__)), __u32 arg1 __attribute__((__unused__)),
   __u32 arg2 __attribute__((__unused__)), __u32 arg3 __attribute__((__unused__)))
{
}

static inline __attribute__((always_inline))
void cilium_dbg_capture(struct __sk_buff *ctx __attribute__((__unused__)),
   __u8 type __attribute__((__unused__)), __u32 arg1 __attribute__((__unused__)))
{
}

static inline __attribute__((always_inline))
void cilium_dbg_capture2(struct __sk_buff *ctx __attribute__((__unused__)),
    __u8 type __attribute__((__unused__)), __u32 arg1 __attribute__((__unused__)),
    __u32 arg2 __attribute__((__unused__)))
{
}
# 10 "/var/lib/cilium/bpf/lib/arp.h" 2
# 1 "/var/lib/cilium/bpf/lib/drop.h" 1
# 17 "/var/lib/cilium/bpf/lib/drop.h"
# 1 "/var/lib/cilium/bpf/lib/events.h" 1







struct {
 int(*(type))[BPF_MAP_TYPE_PERF_EVENT_ARRAY];
 int(*(key_size))[sizeof(__u32)];
 int(*(value_size))[sizeof(__u32)];
 int(*(pinning))[1];
} cilium_events __attribute__((section(".maps"), used));
# 18 "/var/lib/cilium/bpf/lib/drop.h" 2


# 1 "/var/lib/cilium/bpf/lib/metrics.h" 1
# 14 "/var/lib/cilium/bpf/lib/metrics.h"
struct {
 int(*(type))[BPF_MAP_TYPE_PERCPU_HASH];
 typeof(struct metrics_key) *(key);
 typeof(struct metrics_value) *(value);
 int(*(pinning))[1];
 int(*(max_entries))[1024];
 int(*(map_flags))[BPF_F_NO_PREALLOC];
} cilium_metrics __attribute__((section(".maps"), used));
# 33 "/var/lib/cilium/bpf/lib/metrics.h"
static inline __attribute__((always_inline)) void _update_metrics(__u64 bytes, __u8 direction,
         __u8 reason, __u16 line, __u8 file)
{
 struct metrics_value *entry, new_entry = {};
 struct metrics_key key = {};

 key.reason = reason;
 key.dir = direction;
 key.line = line;
 key.file = file;

 entry = map_lookup_elem(&cilium_metrics, &key);
 if (entry) {
  entry->count += 1;
  entry->bytes += bytes;
 } else {
  new_entry.count = 1;
  new_entry.bytes = bytes;
  map_update_elem(&cilium_metrics, &key, &new_entry, 0);
 }
}






static inline __attribute__((always_inline)) enum metric_dir ct_to_metrics_dir(enum ct_dir ct_dir)
{
 switch (ct_dir) {
 case CT_INGRESS:
  return METRIC_INGRESS;
 case CT_EGRESS:
  return METRIC_EGRESS;
 case CT_SERVICE:
  return METRIC_SERVICE;
 default:
  return 0;
 }
}
# 21 "/var/lib/cilium/bpf/lib/drop.h" 2
# 1 "/var/lib/cilium/bpf/lib/ratelimit.h" 1
# 12 "/var/lib/cilium/bpf/lib/ratelimit.h"
struct ratelimit_key {
 __u32 usage;
 union {
  struct {
   __u32 netdev_idx;
  } icmpv6;
 } key;
};

struct ratelimit_value {
 __u64 last_topup;
 __u64 tokens;
};

struct {
 int(*(type))[BPF_MAP_TYPE_LRU_HASH];
 typeof(struct ratelimit_key) *(key);
 typeof(struct ratelimit_value) *(value);
 int(*(pinning))[1];
 int(*(max_entries))[1024];
 int(*(map_flags))[0];
} cilium_ratelimit __attribute__((section(".maps"), used));

struct ratelimit_metrics_key {
 __u32 usage;
};

struct ratelimit_metrics_value {
 __u64 dropped;
};

struct {
 int(*(type))[BPF_MAP_TYPE_HASH];
 typeof(struct ratelimit_metrics_key) *(key);
 typeof(struct ratelimit_metrics_value) *(value);
 int(*(pinning))[1];
 int(*(max_entries))[64];
 int(*(map_flags))[BPF_F_NO_PREALLOC];
} cilium_ratelimit_metrics __attribute__((section(".maps"), used));

struct ratelimit_settings {

 __u64 bucket_size;

 __u64 tokens_per_topup;

 __u64 topup_interval_ns;
};

static inline __attribute__((always_inline)) _Bool ratelimit_check_and_take(struct ratelimit_key *key,
           const struct ratelimit_settings *settings)
{
 struct ratelimit_value *value;
 struct ratelimit_value new_value;
 struct ratelimit_metrics_key metrics_key;
 struct ratelimit_metrics_value *metrics_value;
 struct ratelimit_metrics_value new_metrics_value;
 __u64 since_last_topup;
 __u64 now;
 __u64 interval;
 __u64 remainder;
 int ret;

 now = ktime_get_ns();

 if (!key)
  return false;
 metrics_key.usage = key->usage;
 metrics_value = map_lookup_elem(&cilium_ratelimit_metrics, &metrics_key);
 if (!metrics_value) {
  new_metrics_value.dropped = 0;
  metrics_value = &new_metrics_value;
  ret = map_update_elem(&cilium_ratelimit_metrics, &metrics_key,
          metrics_value, BPF_ANY);

  if (__builtin_expect(!!(ret < 0 || !metrics_value), 0))
   return false;
 }


 value = map_lookup_elem(&cilium_ratelimit, key);
 if (!value) {
  new_value.last_topup = now;
  new_value.tokens = settings->tokens_per_topup - 1;
  ret = map_update_elem(&cilium_ratelimit, key, &new_value, BPF_ANY);
  if (__builtin_expect(!!(ret < 0), 0)) {




   metrics_value->dropped++;
   return false;
  }
  return true;
 }







 since_last_topup = now - value->last_topup;
 if (since_last_topup > settings->topup_interval_ns) {
  interval = since_last_topup / settings->topup_interval_ns;
  remainder = since_last_topup % settings->topup_interval_ns;

  value->tokens += interval * settings->tokens_per_topup;
  value->last_topup = now - remainder;

  if (value->tokens > settings->bucket_size)
   value->tokens = settings->bucket_size;
 }


 if (value->tokens > 0) {
  value->tokens--;
  return true;
 }

 metrics_value->dropped++;
 return false;
}
# 22 "/var/lib/cilium/bpf/lib/drop.h" 2
# 1 "/var/lib/cilium/bpf/lib/tailcall.h" 1
# 105 "/var/lib/cilium/bpf/lib/tailcall.h"
struct {
 int(*(type))[BPF_MAP_TYPE_PROG_ARRAY];
 int(*(key_size))[sizeof(__u32)];
 int(*(max_entries))[48];
 int(*(pinning))[1 << 4];
 typeof(int ()) *(values)[];
} cilium_calls __attribute__((section(".maps"), used));
# 128 "/var/lib/cilium/bpf/lib/tailcall.h"
static inline __attribute__((always_inline)) __attribute__((warn_unused_result)) int
tail_call_internal(struct __sk_buff *ctx, const __u32 index, __s8 *ext_err)
{
 { if (!__builtin_constant_p(index)) __builtin_trap(); asm volatile("r1 = %[ctx]\n\t" "r2 = " "cilium_calls" " ll\n\t" "r3 = %[slot_idx]\n\t" "call 12\n\t" :: [ctx]"r"(ctx), [slot_idx]"i"(index) : "r0", "r1", "r2", "r3", "r4", "r5"); };

 if (ext_err)
  *ext_err = (__s8)index;
 return -140;
}
# 23 "/var/lib/cilium/bpf/lib/drop.h" 2
# 1 "/var/lib/cilium/bpf/lib/classifiers.h" 1








# 1 "/var/lib/cilium/bpf/lib/ipv4.h" 1








# 1 "/var/lib/cilium/bpf/lib/l4.h" 1





# 1 "/var/lib/cilium/bpf/include/linux/tcp.h" 1
# 23 "/var/lib/cilium/bpf/include/linux/tcp.h"
struct tcphdr {
 __be16 source;
 __be16 dest;
 __be32 seq;
 __be32 ack_seq;

 __u16 res1:4,
  doff:4,
  fin:1,
  syn:1,
  rst:1,
  psh:1,
  ack:1,
  urg:1,
  ece:1,
  cwr:1;
# 53 "/var/lib/cilium/bpf/include/linux/tcp.h"
 __be16 window;
 __sum16 check;
 __be16 urg_ptr;
};






union tcp_word_hdr {
 struct tcphdr hdr;
 __be32 words[5];
};



enum {
 TCP_FLAG_CWR = ((__be32)((__u32)( (((__u32)((0x00800000)) & (__u32)0x000000ffUL) << 24) | (((__u32)((0x00800000)) & (__u32)0x0000ff00UL) << 8) | (((__u32)((0x00800000)) & (__u32)0x00ff0000UL) >> 8) | (((__u32)((0x00800000)) & (__u32)0xff000000UL) >> 24)))),
 TCP_FLAG_ECE = ((__be32)((__u32)( (((__u32)((0x00400000)) & (__u32)0x000000ffUL) << 24) | (((__u32)((0x00400000)) & (__u32)0x0000ff00UL) << 8) | (((__u32)((0x00400000)) & (__u32)0x00ff0000UL) >> 8) | (((__u32)((0x00400000)) & (__u32)0xff000000UL) >> 24)))),
 TCP_FLAG_URG = ((__be32)((__u32)( (((__u32)((0x00200000)) & (__u32)0x000000ffUL) << 24) | (((__u32)((0x00200000)) & (__u32)0x0000ff00UL) << 8) | (((__u32)((0x00200000)) & (__u32)0x00ff0000UL) >> 8) | (((__u32)((0x00200000)) & (__u32)0xff000000UL) >> 24)))),
 TCP_FLAG_ACK = ((__be32)((__u32)( (((__u32)((0x00100000)) & (__u32)0x000000ffUL) << 24) | (((__u32)((0x00100000)) & (__u32)0x0000ff00UL) << 8) | (((__u32)((0x00100000)) & (__u32)0x00ff0000UL) >> 8) | (((__u32)((0x00100000)) & (__u32)0xff000000UL) >> 24)))),
 TCP_FLAG_PSH = ((__be32)((__u32)( (((__u32)((0x00080000)) & (__u32)0x000000ffUL) << 24) | (((__u32)((0x00080000)) & (__u32)0x0000ff00UL) << 8) | (((__u32)((0x00080000)) & (__u32)0x00ff0000UL) >> 8) | (((__u32)((0x00080000)) & (__u32)0xff000000UL) >> 24)))),
 TCP_FLAG_RST = ((__be32)((__u32)( (((__u32)((0x00040000)) & (__u32)0x000000ffUL) << 24) | (((__u32)((0x00040000)) & (__u32)0x0000ff00UL) << 8) | (((__u32)((0x00040000)) & (__u32)0x00ff0000UL) >> 8) | (((__u32)((0x00040000)) & (__u32)0xff000000UL) >> 24)))),
 TCP_FLAG_SYN = ((__be32)((__u32)( (((__u32)((0x00020000)) & (__u32)0x000000ffUL) << 24) | (((__u32)((0x00020000)) & (__u32)0x0000ff00UL) << 8) | (((__u32)((0x00020000)) & (__u32)0x00ff0000UL) >> 8) | (((__u32)((0x00020000)) & (__u32)0xff000000UL) >> 24)))),
 TCP_FLAG_FIN = ((__be32)((__u32)( (((__u32)((0x00010000)) & (__u32)0x000000ffUL) << 24) | (((__u32)((0x00010000)) & (__u32)0x0000ff00UL) << 8) | (((__u32)((0x00010000)) & (__u32)0x00ff0000UL) >> 8) | (((__u32)((0x00010000)) & (__u32)0xff000000UL) >> 24)))),
 TCP_RESERVED_BITS = ((__be32)((__u32)( (((__u32)((0x0F000000)) & (__u32)0x000000ffUL) << 24) | (((__u32)((0x0F000000)) & (__u32)0x0000ff00UL) << 8) | (((__u32)((0x0F000000)) & (__u32)0x00ff0000UL) >> 8) | (((__u32)((0x0F000000)) & (__u32)0xff000000UL) >> 24)))),
 TCP_DATA_OFFSET = ((__be32)((__u32)( (((__u32)((0xF0000000)) & (__u32)0x000000ffUL) << 24) | (((__u32)((0xF0000000)) & (__u32)0x0000ff00UL) << 8) | (((__u32)((0xF0000000)) & (__u32)0x00ff0000UL) >> 8) | (((__u32)((0xF0000000)) & (__u32)0xff000000UL) >> 24))))
};
# 7 "/var/lib/cilium/bpf/lib/l4.h" 2
# 1 "/var/lib/cilium/bpf/include/linux/udp.h" 1
# 23 "/var/lib/cilium/bpf/include/linux/udp.h"
struct udphdr {
 __be16 source;
 __be16 dest;
 __be16 len;
 __sum16 check;
};
# 8 "/var/lib/cilium/bpf/lib/l4.h" 2


# 1 "/var/lib/cilium/bpf/lib/csum.h" 1







# 1 "/var/lib/cilium/bpf/include/linux/icmpv6.h" 1







struct icmp6hdr {

 __u8 icmp6_type;
 __u8 icmp6_code;
 __sum16 icmp6_cksum;


 union {
  __be32 un_data32[1];
  __be16 un_data16[2];
  __u8 un_data8[4];

  struct icmpv6_echo {
   __be16 identifier;
   __be16 sequence;
  } u_echo;

                struct icmpv6_nd_advt {

                        __u32 reserved:5,
                          override:1,
                          solicited:1,
                          router:1,
     reserved2:24;
# 40 "/var/lib/cilium/bpf/include/linux/icmpv6.h"
                } u_nd_advt;

                struct icmpv6_nd_ra {
   __u8 hop_limit;

   __u8 reserved:3,
     router_pref:2,
     home_agent:1,
     other:1,
     managed:1;
# 60 "/var/lib/cilium/bpf/include/linux/icmpv6.h"
   __be16 rt_lifetime;
                } u_nd_ra;

 } icmp6_dataun;
# 81 "/var/lib/cilium/bpf/include/linux/icmpv6.h"
};
# 164 "/var/lib/cilium/bpf/include/linux/icmpv6.h"
struct icmp6_filter {
 __u32 data[8];
};
# 9 "/var/lib/cilium/bpf/lib/csum.h" 2




struct csum_offset {
 __u16 offset;
 __u16 flags;
};
# 28 "/var/lib/cilium/bpf/lib/csum.h"
static inline __attribute__((always_inline)) void csum_l4_offset_and_flags(__u8 nexthdr,
           struct csum_offset *off)
{
 switch (nexthdr) {
 case IPPROTO_TCP:
  off->offset = (__builtin_offsetof(struct tcphdr, check));
  break;

 case IPPROTO_UDP:
  off->offset = (__builtin_offsetof(struct udphdr, check));
  off->flags = BPF_F_MARK_MANGLED_0;
  break;
# 55 "/var/lib/cilium/bpf/lib/csum.h"
 case 58:
  off->offset = __builtin_offsetof(struct icmp6hdr, icmp6_cksum);
  break;

 case IPPROTO_ICMP:
  break;
 }
}
# 73 "/var/lib/cilium/bpf/lib/csum.h"
static inline __attribute__((always_inline)) int csum_l4_replace(struct __sk_buff *ctx, __u64 l4_off,
        const struct csum_offset *csum,
        __be32 from, __be32 to, int flags)
{
 return l4_csum_replace(ctx, (__u32)(l4_off + csum->offset), from, to, flags | csum->flags);
}
# 11 "/var/lib/cilium/bpf/lib/l4.h" 2






union tcp_flags {
 struct {
  __u8 upper_bits;
  __u8 lower_bits;
  __u16 pad;
 };
 __u32 value;
};

static inline __attribute__((always_inline)) __u8 tcp_flags_to_u8(__be32 value)
{
 return ((union tcp_flags)value).lower_bits;
}

static inline __attribute__((always_inline)) int
l4_store_port(struct __sk_buff *ctx, int l4_off, int port_off, __be16 port)
{
 return skb_store_bytes(ctx, l4_off + port_off, &port, sizeof(port), 0);
}
# 54 "/var/lib/cilium/bpf/lib/l4.h"
static inline __attribute__((always_inline)) int l4_modify_port(struct __sk_buff *ctx, int l4_off,
       int off, struct csum_offset *csum_off,
       __be16 port, __be16 old_port)
{
 if (csum_l4_replace(ctx, l4_off, csum_off, old_port, port, sizeof(port)) < 0)
  return -154;

 if (skb_store_bytes(ctx, l4_off + off, &port, sizeof(port), 0) < 0)
  return -141;

 return 0;
}

static inline __attribute__((always_inline)) int l4_load_port(struct __sk_buff *ctx, int off,
     __be16 *port)
{
 return skb_load_bytes(ctx, off, port, sizeof(__be16));
}

static inline __attribute__((always_inline)) int l4_load_ports(struct __sk_buff *ctx, int off,
      __be16 *ports)
{
 return skb_load_bytes(ctx, off, ports, 2 * sizeof(__be16));
}

static inline __attribute__((always_inline)) int l4_load_tcp_flags(struct __sk_buff *ctx, int l4_off,
          union tcp_flags *flags)
{
 return skb_load_bytes(ctx, l4_off + 12, flags, 2);
}
# 10 "/var/lib/cilium/bpf/lib/ipv4.h" 2

# 1 "/var/lib/cilium/bpf/lib/ipfrag.h" 1
# 33 "/var/lib/cilium/bpf/lib/ipfrag.h"
typedef __s64 fraginfo_t;




struct ipv6_frag_hdr {
 __u8 nexthdr;
 __u8 reserved;
 __be16 frag_off;
 __be32 id;
} __attribute__((packed));


static inline __attribute__((always_inline)) fraginfo_t ipfrag_encode_ipv4(const struct iphdr *ip4)
{
 fraginfo_t fraginfo = (__u16)ip4->id;

 fraginfo |= (__u64)ip4->protocol << 32;
# 62 "/var/lib/cilium/bpf/lib/ipfrag.h"
 if (ip4->frag_off & (__builtin_constant_p(0x3fff) ? ((__u16)( ((__u16)(0x3fff) << (16 -(0 +1)*8) >> (16 -8) << (1*8)) | ((__u16)(0x3fff) << (16 -(1 +1)*8) >> (16 -8) << (0*8)))) : __builtin_bswap16(0x3fff)))
  fraginfo |= (1LL << 40);
 if (ip4->frag_off & (__builtin_constant_p(0x1fff) ? ((__u16)( ((__u16)(0x1fff) << (16 -(0 +1)*8) >> (16 -8) << (1*8)) | ((__u16)(0x1fff) << (16 -(1 +1)*8) >> (16 -8) << (0*8)))) : __builtin_bswap16(0x1fff)))
  fraginfo |= (1LL << 41);

 return fraginfo;
}


static inline __attribute__((always_inline)) fraginfo_t ipfrag_encode_ipv6(const struct ipv6_frag_hdr *exthdr)
{
 fraginfo_t fraginfo = (__u32)exthdr->id;

 fraginfo |= (__u64)exthdr->nexthdr << 32;







 if (exthdr->frag_off & (__builtin_constant_p(0xfff9) ? ((__u16)( ((__u16)(0xfff9) << (16 -(0 +1)*8) >> (16 -8) << (1*8)) | ((__u16)(0xfff9) << (16 -(1 +1)*8) >> (16 -8) << (0*8)))) : __builtin_bswap16(0xfff9)))
  fraginfo |= (1LL << 40);
 if (exthdr->frag_off & (__builtin_constant_p(0xfff8) ? ((__u16)( ((__u16)(0xfff8) << (16 -(0 +1)*8) >> (16 -8) << (1*8)) | ((__u16)(0xfff8) << (16 -(1 +1)*8) >> (16 -8) << (0*8)))) : __builtin_bswap16(0xfff8)))
  fraginfo |= (1LL << 41);

 return fraginfo;
}

static inline __attribute__((always_inline)) _Bool ipfrag_is_fragment(fraginfo_t fraginfo)
{
 return fraginfo & (1LL << 40);
}

static inline __attribute__((always_inline)) _Bool ipfrag_has_l4_header(fraginfo_t fraginfo)
{
 return !(fraginfo & (1LL << 41));
}

static inline __attribute__((always_inline)) __u8 ipfrag_get_protocol(fraginfo_t fraginfo)
{
 return (fraginfo >> 32) & 0xff;
}


static inline __attribute__((always_inline)) __be32 ipfrag_get_id(fraginfo_t fraginfo)
{
 return (__be32)(fraginfo & 0xffffffff);
}
# 12 "/var/lib/cilium/bpf/lib/ipv4.h" 2




struct ipv4_frag_id {
 __be32 daddr;
 __be32 saddr;
 __be16 id;
 __u8 proto;
 __u8 pad;
} __attribute__((packed));

struct ipv4_frag_l4ports {
 __be16 sport;
 __be16 dport;
} __attribute__((packed));


struct {
 int(*(type))[BPF_MAP_TYPE_LRU_HASH];
 typeof(struct ipv4_frag_id) *(key);
 typeof(struct ipv4_frag_l4ports) *(value);
 int(*(pinning))[1];
 int(*(max_entries))[8192];
 int(*(map_flags))[0];
} cilium_ipv4_frag_datagrams __attribute__((section(".maps"), used));


static inline __attribute__((always_inline)) int
ipv4_csum_update_by_value(struct __sk_buff *ctx, int l3_off, __u64 old_val,
     __u64 new_val, __u32 len)
{
 return l3_csum_replace(ctx, l3_off + __builtin_offsetof(struct iphdr, check),
          (__u32)old_val, (__u32)new_val, len);
}

static inline __attribute__((always_inline)) int
ipv4_csum_update_by_diff(struct __sk_buff *ctx, int l3_off, __u64 diff)
{
 return l3_csum_replace(ctx, l3_off + __builtin_offsetof(struct iphdr, check),
          0, (__u32)diff, 0);
}

static inline __attribute__((always_inline)) int ipv4_load_daddr(struct __sk_buff *ctx, int off,
        __u32 *dst)
{
 return skb_load_bytes(ctx, off + __builtin_offsetof(struct iphdr, daddr), dst, 4);
}

static inline __attribute__((always_inline)) int ipv4_dec_ttl(struct __sk_buff *ctx, int off,
     struct iphdr *ip4)
{
 __u8 new_ttl, ttl = ip4->ttl;

 if (ttl <= 1)
  return -196;

 new_ttl = ttl - 1;
 ip4->ttl = new_ttl;


 if (ipv4_csum_update_by_value(ctx, off, ttl, new_ttl, 2) < 0)
  return -153;

 return 0;
}

static inline __attribute__((always_inline)) int ipv4_hdrlen(const struct iphdr *ip4)
{
 return ip4->ihl * 4;
}

static inline __attribute__((always_inline)) _Bool ipv4_is_in_subnet(__be32 addr,
           __be32 subnet, int prefixlen)
{
 return (addr & (__builtin_constant_p(~((1 << (32 - prefixlen)) - 1)) ? ((__u32)( ((__u32)(~((1 << (32 - prefixlen)) - 1)) << (32 -(0 +1)*8) >> (32 -8) << (3*8)) | ((__u32)(~((1 << (32 - prefixlen)) - 1)) << (32 -(1 +1)*8) >> (32 -8) << (2*8)) | ((__u32)(~((1 << (32 - prefixlen)) - 1)) << (32 -(2 +1)*8) >> (32 -8) << (1*8)) | ((__u32)(~((1 << (32 - prefixlen)) - 1)) << (32 -(3 +1)*8) >> (32 -8) << (0*8)))) : __builtin_bswap32(~((1 << (32 - prefixlen)) - 1)))) == subnet;
}


static inline __attribute__((always_inline)) int
ipv4_frag_get_l4ports(const struct ipv4_frag_id *frag_id,
        struct ipv4_frag_l4ports *ports)
{
 struct ipv4_frag_l4ports *tmp;

 tmp = map_lookup_elem(&cilium_ipv4_frag_datagrams, frag_id);
 if (!tmp)
  return -175;


 memcpy(ports, tmp, sizeof(*ports));
 return 0;
}

static inline __attribute__((always_inline)) int
ipv4_handle_fragmentation(struct __sk_buff *ctx,
     const struct iphdr *ip4,
     fraginfo_t fraginfo,
     int l4_off,
     enum ct_dir ct_dir,
     struct ipv4_frag_l4ports *ports)
{
 struct ipv4_frag_id frag_id = {
  .daddr = ip4->daddr,
  .saddr = ip4->saddr,
  .id = (__be16)ipfrag_get_id(fraginfo),
  .proto = ipfrag_get_protocol(fraginfo),
 };

 if (__builtin_expect(!!(!ipfrag_has_l4_header(fraginfo)), 0))
  return ipv4_frag_get_l4ports(&frag_id, ports);


 if (l4_load_ports(ctx, l4_off, (__be16 *)ports) < 0)
  return -135;

 if (__builtin_expect(!!(ipfrag_is_fragment(fraginfo)), 0)) {



  if (map_update_elem(&cilium_ipv4_frag_datagrams, &frag_id, ports, BPF_ANY))
   _update_metrics(ctx_full_len(ctx), ct_to_metrics_dir(ct_dir), 10, 134, (__u8)__id_for_file("ipv4.h"));





 }

 return 0;
}


static inline __attribute__((always_inline)) int
ipv4_load_l4_ports(struct __sk_buff *ctx, struct iphdr *ip4 __attribute__((__unused__)),
     fraginfo_t fraginfo, int l4_off, enum ct_dir dir __attribute__((__unused__)),
     __be16 *ports)
{

 return ipv4_handle_fragmentation(ctx, ip4, fraginfo, l4_off, dir,
      (struct ipv4_frag_l4ports *)ports);







 return 0;
}
# 10 "/var/lib/cilium/bpf/lib/classifiers.h" 2
# 1 "/var/lib/cilium/bpf/lib/ipv6.h" 1
# 42 "/var/lib/cilium/bpf/lib/ipv6.h"
struct ipv6_frag_id {
 __be32 id;
 __u8 proto;
 __u8 pad[3];
 union v6addr saddr;
 union v6addr daddr;
} __attribute__((packed));

struct ipv6_frag_l4ports {
 __be16 sport;
 __be16 dport;
} __attribute__((packed));


struct {
 int(*(type))[BPF_MAP_TYPE_LRU_HASH];
 typeof(struct ipv6_frag_id) *(key);
 typeof(struct ipv6_frag_l4ports) *(value);
 int(*(pinning))[1];
 int(*(max_entries))[8192];
 int(*(map_flags))[0];
} cilium_ipv6_frag_datagrams __attribute__((section(".maps"), used));


static inline __attribute__((always_inline)) int ipv6_optlen(const struct ipv6_opt_hdr *opthdr)
{
 return (opthdr->hdrlen + 1) << 3;
}

static inline __attribute__((always_inline)) int ipv6_authlen(const struct ipv6_opt_hdr *opthdr)
{
 return (opthdr->hdrlen + 2) << 2;
}

static inline __attribute__((always_inline)) int ipv6_skip_exthdr(struct __sk_buff *ctx, __u8 *nexthdr, int off)
{
 struct ipv6_opt_hdr opthdr __attribute__((aligned(8)));
 __u8 nh = *nexthdr;

 switch (nh) {
 case 59:
  return -156;

 case 44:
 case 51:
 case 0:
 case 43:
 case 60:
  if (skb_load_bytes(ctx, off, &opthdr, sizeof(opthdr)) < 0)
   return -134;

  *nexthdr = opthdr.nexthdr;
  break;

 default:
  return 0;
 }

 switch (nh) {
 case 44:
  return 8;

 case 51:
  return ipv6_authlen(&opthdr);

 case 0:
 case 43:
 case 60:
  return ipv6_optlen(&opthdr);

 default:

  __builtin_unreachable();
 }
}

static inline __attribute__((always_inline)) int ipv6_hdrlen_offset(struct __sk_buff *ctx, int l3_off,
           __u8 *nexthdr, fraginfo_t *fraginfo)
{
 int i, len = sizeof(struct ipv6hdr);
 __u8 nh = *nexthdr;







 *fraginfo = 0;

#pragma unroll
 for (i = 0; i < 4; i++) {
  __u8 newnh = nh;
  int hdrlen = ipv6_skip_exthdr(ctx, &newnh, l3_off + len);

  if (hdrlen < 0)
   return hdrlen;

  if (!hdrlen) {
   *nexthdr = nh;
   return len;
  }

  if (nh == 44) {
   struct ipv6_frag_hdr frag;

   if (skb_load_bytes(ctx, l3_off + len, &frag, sizeof(frag)) < 0)
    return -134;

   *fraginfo = ipfrag_encode_ipv6(&frag);
  }

  len += hdrlen;
  nh = newnh;
 }


 return -156;
}

static inline __attribute__((always_inline)) int ipv6_hdrlen_with_fraginfo(struct __sk_buff *ctx,
           __u8 *nexthdr,
           fraginfo_t *fraginfo)
{
 return ipv6_hdrlen_offset(ctx, __config_eth_header_length, nexthdr, fraginfo);
}

static inline __attribute__((always_inline)) int ipv6_hdrlen(struct __sk_buff *ctx, __u8 *nexthdr)
{
 fraginfo_t fraginfo;

 return ipv6_hdrlen_offset(ctx, __config_eth_header_length, nexthdr, &fraginfo);
}

static inline __attribute__((always_inline)) void ipv6_addr_copy(union v6addr *dst,
        const union v6addr *src)
{
 memcpy(dst, src, sizeof(*dst));
}

static inline __attribute__((always_inline)) void ipv6_addr_copy_unaligned(union v6addr *dst,
           const union v6addr *src)
{
 dst->d.d1 = src->d.d1;
 dst->d.d2 = src->d.d2;
}

static inline __attribute__((always_inline)) _Bool ipv6_addr_equals(const union v6addr *a,
          const union v6addr *b)
{
 if (a->d.d1 != b->d.d1)
  return false;
 return a->d.d2 == b->d.d2;
}

static inline __attribute__((always_inline))
void ipv6_sol_mc_mac_set(const union v6addr *addr, union macaddr *mac)
{
 mac->addr[0] = 0x33;
 mac->addr[1] = 0x33;
 mac->addr[2] = 0xFF;
 memcpy((__u8 *)mac + 3, (__u8 *)addr + 13, 3);
}

static inline __attribute__((always_inline))
_Bool ipv6_is_sol_mc_mac(const union v6addr *addr, const union macaddr *mac)
{
 union macaddr mc_mac __attribute__((aligned(8)));

 ipv6_sol_mc_mac_set(addr, &mc_mac);
 return eth_addrcmp((const union macaddr *)&mc_mac, mac) == 0;
}

static inline __attribute__((always_inline))
void ipv6_sol_mc_addr_set(const union v6addr *addr, union v6addr *mc_addr)
{
 const union v6addr base_addr = { .addr = {0xff, 0x02, 0, 0, 0, 0, 0, 0,
       0, 0, 0, 0x01, 0xFF, 0, 0, 0} };
 *mc_addr = base_addr;
 mc_addr->addr[13] = addr->addr[13];
 mc_addr->addr[14] = addr->addr[14];
 mc_addr->addr[15] = addr->addr[15];
}


static inline __attribute__((always_inline)) int ipv6_addr_in_net(const union v6addr *addr,
         const union v6addr *net,
         const union v6addr *mask)
{
 return ((addr->p.p1 & mask->p.p1) == net->p.p1)
  && (!mask->p.p2
      || (((addr->p.p2 & mask->p.p2) == net->p.p2)
   && (!mask->p.p3
       || (((addr->p.p3 & mask->p.p3) == net->p.p3)
    && (!mask->p.p4 || ((addr->p.p4 & mask->p.p4) == net->p.p4))))));
}





static inline __attribute__((always_inline)) void ipv6_addr_clear_suffix(union v6addr *addr,
         int prefix)
{
 addr->p.p1 &= (__builtin_constant_p(prefix <= 0 ? 0 : prefix < 32 ? ((1<<prefix) - 1) << (32-prefix) : 0xFFFFFFFF) ? ((__u32)( ((__u32)(prefix <= 0 ? 0 : prefix < 32 ? ((1<<prefix) - 1) << (32-prefix) : 0xFFFFFFFF) << (32 -(0 +1)*8) >> (32 -8) << (3*8)) | ((__u32)(prefix <= 0 ? 0 : prefix < 32 ? ((1<<prefix) - 1) << (32-prefix) : 0xFFFFFFFF) << (32 -(1 +1)*8) >> (32 -8) << (2*8)) | ((__u32)(prefix <= 0 ? 0 : prefix < 32 ? ((1<<prefix) - 1) << (32-prefix) : 0xFFFFFFFF) << (32 -(2 +1)*8) >> (32 -8) << (1*8)) | ((__u32)(prefix <= 0 ? 0 : prefix < 32 ? ((1<<prefix) - 1) << (32-prefix) : 0xFFFFFFFF) << (32 -(3 +1)*8) >> (32 -8) << (0*8)))) : __builtin_bswap32(prefix <= 0 ? 0 : prefix < 32 ? ((1<<prefix) - 1) << (32-prefix) : 0xFFFFFFFF));
 prefix -= 32;
 addr->p.p2 &= (__builtin_constant_p(prefix <= 0 ? 0 : prefix < 32 ? ((1<<prefix) - 1) << (32-prefix) : 0xFFFFFFFF) ? ((__u32)( ((__u32)(prefix <= 0 ? 0 : prefix < 32 ? ((1<<prefix) - 1) << (32-prefix) : 0xFFFFFFFF) << (32 -(0 +1)*8) >> (32 -8) << (3*8)) | ((__u32)(prefix <= 0 ? 0 : prefix < 32 ? ((1<<prefix) - 1) << (32-prefix) : 0xFFFFFFFF) << (32 -(1 +1)*8) >> (32 -8) << (2*8)) | ((__u32)(prefix <= 0 ? 0 : prefix < 32 ? ((1<<prefix) - 1) << (32-prefix) : 0xFFFFFFFF) << (32 -(2 +1)*8) >> (32 -8) << (1*8)) | ((__u32)(prefix <= 0 ? 0 : prefix < 32 ? ((1<<prefix) - 1) << (32-prefix) : 0xFFFFFFFF) << (32 -(3 +1)*8) >> (32 -8) << (0*8)))) : __builtin_bswap32(prefix <= 0 ? 0 : prefix < 32 ? ((1<<prefix) - 1) << (32-prefix) : 0xFFFFFFFF));
 prefix -= 32;
 addr->p.p3 &= (__builtin_constant_p(prefix <= 0 ? 0 : prefix < 32 ? ((1<<prefix) - 1) << (32-prefix) : 0xFFFFFFFF) ? ((__u32)( ((__u32)(prefix <= 0 ? 0 : prefix < 32 ? ((1<<prefix) - 1) << (32-prefix) : 0xFFFFFFFF) << (32 -(0 +1)*8) >> (32 -8) << (3*8)) | ((__u32)(prefix <= 0 ? 0 : prefix < 32 ? ((1<<prefix) - 1) << (32-prefix) : 0xFFFFFFFF) << (32 -(1 +1)*8) >> (32 -8) << (2*8)) | ((__u32)(prefix <= 0 ? 0 : prefix < 32 ? ((1<<prefix) - 1) << (32-prefix) : 0xFFFFFFFF) << (32 -(2 +1)*8) >> (32 -8) << (1*8)) | ((__u32)(prefix <= 0 ? 0 : prefix < 32 ? ((1<<prefix) - 1) << (32-prefix) : 0xFFFFFFFF) << (32 -(3 +1)*8) >> (32 -8) << (0*8)))) : __builtin_bswap32(prefix <= 0 ? 0 : prefix < 32 ? ((1<<prefix) - 1) << (32-prefix) : 0xFFFFFFFF));
 prefix -= 32;
 addr->p.p4 &= (__builtin_constant_p(prefix <= 0 ? 0 : prefix < 32 ? ((1<<prefix) - 1) << (32-prefix) : 0xFFFFFFFF) ? ((__u32)( ((__u32)(prefix <= 0 ? 0 : prefix < 32 ? ((1<<prefix) - 1) << (32-prefix) : 0xFFFFFFFF) << (32 -(0 +1)*8) >> (32 -8) << (3*8)) | ((__u32)(prefix <= 0 ? 0 : prefix < 32 ? ((1<<prefix) - 1) << (32-prefix) : 0xFFFFFFFF) << (32 -(1 +1)*8) >> (32 -8) << (2*8)) | ((__u32)(prefix <= 0 ? 0 : prefix < 32 ? ((1<<prefix) - 1) << (32-prefix) : 0xFFFFFFFF) << (32 -(2 +1)*8) >> (32 -8) << (1*8)) | ((__u32)(prefix <= 0 ? 0 : prefix < 32 ? ((1<<prefix) - 1) << (32-prefix) : 0xFFFFFFFF) << (32 -(3 +1)*8) >> (32 -8) << (0*8)))) : __builtin_bswap32(prefix <= 0 ? 0 : prefix < 32 ? ((1<<prefix) - 1) << (32-prefix) : 0xFFFFFFFF));
}

static inline __attribute__((always_inline)) int ipv6_dec_hoplimit(struct __sk_buff *ctx, int off)
{
 __u8 hl;

 if (skb_load_bytes(ctx, off + __builtin_offsetof(struct ipv6hdr, hop_limit),
      &hl, sizeof(hl)) < 0)
  return -134;

 if (hl <= 1)
  return -196;
 hl--;
 if (skb_store_bytes(ctx, off + __builtin_offsetof(struct ipv6hdr, hop_limit),
       &hl, sizeof(hl), BPF_F_RECOMPUTE_CSUM) < 0)
  return -141;
 return 0;
}

static inline __attribute__((always_inline)) int ipv6_load_saddr(struct __sk_buff *ctx, int off,
        union v6addr *dst)
{
 return skb_load_bytes(ctx, off + __builtin_offsetof(struct ipv6hdr, saddr), dst->addr,
         sizeof(((struct ipv6hdr *)((void *)0))->saddr));
}


static inline __attribute__((always_inline)) int ipv6_store_saddr(struct __sk_buff *ctx, __u8 *addr,
         int off)
{
 return skb_store_bytes(ctx, off + __builtin_offsetof(struct ipv6hdr, saddr), addr, 16, 0);
}

static inline __attribute__((always_inline)) int ipv6_load_daddr(struct __sk_buff *ctx, int off,
        union v6addr *dst)
{
 return skb_load_bytes(ctx, off + __builtin_offsetof(struct ipv6hdr, daddr), dst->addr,
         sizeof(((struct ipv6hdr *)((void *)0))->daddr));
}


static inline __attribute__((always_inline)) int
ipv6_store_daddr(struct __sk_buff *ctx, const __u8 *addr, int off)
{
 return skb_store_bytes(ctx, off + __builtin_offsetof(struct ipv6hdr, daddr), addr, 16, 0);
}

static inline __attribute__((always_inline)) int ipv6_load_nexthdr(struct __sk_buff *ctx, int off,
          __u8 *nexthdr)
{
 return skb_load_bytes(ctx, off + __builtin_offsetof(struct ipv6hdr, nexthdr), nexthdr,
         sizeof(__u8));
}


static inline __attribute__((always_inline)) int ipv6_store_nexthdr(struct __sk_buff *ctx, __u8 *nexthdr,
           int off)
{
 return skb_store_bytes(ctx, off + __builtin_offsetof(struct ipv6hdr, nexthdr), nexthdr,
         sizeof(__u8), 0);
}

static inline __attribute__((always_inline)) int ipv6_load_paylen(struct __sk_buff *ctx, int off,
         __be16 *len)
{
 return skb_load_bytes(ctx, off + __builtin_offsetof(struct ipv6hdr, payload_len),
         len, sizeof(*len));
}


static inline __attribute__((always_inline)) int ipv6_store_paylen(struct __sk_buff *ctx, int off,
          __be16 *len)
{
 return skb_store_bytes(ctx, off + __builtin_offsetof(struct ipv6hdr, payload_len),
          len, sizeof(*len), 0);
}

static inline __attribute__((always_inline)) __be32 ipv6_pseudohdr_checksum(struct ipv6hdr *hdr,
            __u8 next_hdr,
            __u16 payload_len, __be32 sum)
{
 __be32 len = (__builtin_constant_p((__u32)payload_len) ? ((__u32)( ((__u32)((__u32)payload_len) << (32 -(0 +1)*8) >> (32 -8) << (3*8)) | ((__u32)((__u32)payload_len) << (32 -(1 +1)*8) >> (32 -8) << (2*8)) | ((__u32)((__u32)payload_len) << (32 -(2 +1)*8) >> (32 -8) << (1*8)) | ((__u32)((__u32)payload_len) << (32 -(3 +1)*8) >> (32 -8) << (0*8)))) : __builtin_bswap32((__u32)payload_len));
 __be32 nexthdr = (__builtin_constant_p((__u32)next_hdr) ? ((__u32)( ((__u32)((__u32)next_hdr) << (32 -(0 +1)*8) >> (32 -8) << (3*8)) | ((__u32)((__u32)next_hdr) << (32 -(1 +1)*8) >> (32 -8) << (2*8)) | ((__u32)((__u32)next_hdr) << (32 -(2 +1)*8) >> (32 -8) << (1*8)) | ((__u32)((__u32)next_hdr) << (32 -(3 +1)*8) >> (32 -8) << (0*8)))) : __builtin_bswap32((__u32)next_hdr));

 sum = csum_diff(((void *)0), 0, &hdr->saddr, sizeof(struct in6_addr), sum);
 sum = csum_diff(((void *)0), 0, &hdr->daddr, sizeof(struct in6_addr), sum);
 sum = csum_diff(((void *)0), 0, &len, sizeof(len), sum);
 sum = csum_diff(((void *)0), 0, &nexthdr, sizeof(nexthdr), sum);

 return sum;
}




static inline __attribute__((always_inline)) int ipv6_addr_is_mapped(const union v6addr *addr)
{
 return addr->p.p1 == 0 && addr->p.p2 == 0 && addr->p.p3 == 0xFFFF0000;
}


static inline __attribute__((always_inline)) fraginfo_t
ipv6_get_fraginfo(struct __sk_buff *ctx, const struct ipv6hdr *ip6)
{
 int l3_off = (int)((void *)ip6 - ctx_data(ctx));
 int i, len = sizeof(struct ipv6hdr);
 __u8 nh = ip6->nexthdr;

#pragma unroll
 for (i = 0; i < 4; i++) {
  __u8 newnh = nh;
  int hdrlen = ipv6_skip_exthdr(ctx, &newnh, l3_off + len);

  if (hdrlen < 0)
   return hdrlen;

  if (!hdrlen) {





   return 0;
  }

  if (nh == 44) {
   struct ipv6_frag_hdr frag;

   if (skb_load_bytes(ctx, l3_off + len, &frag, sizeof(frag)) < 0)
    return -134;

   return ipfrag_encode_ipv6(&frag);
  }

  len += hdrlen;
  nh = newnh;
 }


 return -156;
}


static inline __attribute__((always_inline)) int
ipv6_frag_get_l4ports(const struct ipv6_frag_id *frag_id,
        struct ipv6_frag_l4ports *ports)
{
 struct ipv6_frag_l4ports *tmp;

 tmp = map_lookup_elem(&cilium_ipv6_frag_datagrams, frag_id);
 if (!tmp)
  return -175;

 memcpy(ports, tmp, sizeof(*ports));
 return 0;
}

static inline __attribute__((always_inline)) int
ipv6_handle_fragmentation(struct __sk_buff *ctx,
     const struct ipv6hdr *ip6,
     fraginfo_t fraginfo,
     int l4_off,
     enum ct_dir ct_dir,
     struct ipv6_frag_l4ports *ports)
{



 union {
  __u64 diff;
  struct ipv6_frag_id frag_id;
  struct ipv6hdr ip6;
 } *u = (void *)ip6;
 __u64 backup = u->diff;
 int ret = 0;

 u->diff = 0;
 u->frag_id.id = ipfrag_get_id(fraginfo);
 u->frag_id.proto = ipfrag_get_protocol(fraginfo);


 if (__builtin_expect(!!(!ipfrag_has_l4_header(fraginfo)), 0)) {
  ret = ipv6_frag_get_l4ports(&u->frag_id, ports);
  goto out;
 }

 if (l4_load_ports(ctx, l4_off, (__be16 *)ports) < 0) {
  ret = -135;
  goto out;
 }

 if (__builtin_expect(!!(ipfrag_is_fragment(fraginfo)), 0)) {
  if (map_update_elem(&cilium_ipv6_frag_datagrams, &u->frag_id, ports, BPF_ANY))
   _update_metrics(ctx_full_len(ctx), ct_to_metrics_dir(ct_dir), 10, 447, (__u8)__id_for_file("ipv6.h"));

 }

out:
 u->diff = backup;
 return ret;
}


static inline __attribute__((always_inline)) int
ipv6_load_l4_ports(struct __sk_buff *ctx, struct ipv6hdr *ip6 __attribute__((__unused__)),
     fraginfo_t fraginfo, int l4_off, enum ct_dir dir __attribute__((__unused__)),
     __be16 *ports)
{

 return ipv6_handle_fragmentation(ctx, ip6, fraginfo, l4_off, dir,
      (struct ipv6_frag_l4ports *)ports);







 return 0;
}
# 11 "/var/lib/cilium/bpf/lib/classifiers.h" 2


typedef __u8 cls_flags_t;


enum {




 CLS_FLAG_IPV6 = (1 << 0),

 CLS_FLAG_L3_DEV = (1 << 1),

 CLS_FLAG_VXLAN = (1 << 2),

 CLS_FLAG_GENEVE = (1 << 3),
};
# 104 "/var/lib/cilium/bpf/lib/classifiers.h"
static inline __attribute__((always_inline)) cls_flags_t
ctx_classify(struct __sk_buff *ctx, __be16 proto, enum trace_point obs_point __attribute__((__unused__)))
{
 cls_flags_t flags = ((cls_flags_t)0);
 _Bool parse_overlay = false;
 void __attribute__((__unused__)) *data;
 void __attribute__((__unused__)) *data_end;
 struct ipv6hdr __attribute__((__unused__)) *ip6;
 struct iphdr __attribute__((__unused__)) *ip4;
 __be16 __attribute__((__unused__)) dport;
 __u8 __attribute__((__unused__)) l4_proto;
 int __attribute__((__unused__)) l3_hdrlen;





 if (!proto)
  proto = ctx_get_protocol(ctx);


 if (__config_eth_header_length == 0)
  flags |= CLS_FLAG_L3_DEV;


 if (proto == (__builtin_constant_p(0x86DD) ? ((__u16)( ((__u16)(0x86DD) << (16 -(0 +1)*8) >> (16 -8) << (1*8)) | ((__u16)(0x86DD) << (16 -(1 +1)*8) >> (16 -8) << (0*8)))) : __builtin_bswap16(0x86DD)))
  flags |= CLS_FLAG_IPV6;
# 152 "/var/lib/cilium/bpf/lib/classifiers.h"
 if (!parse_overlay)
  goto out;





 switch (proto) {

 case (__builtin_constant_p(0x86DD) ? ((__u16)( ((__u16)(0x86DD) << (16 -(0 +1)*8) >> (16 -8) << (1*8)) | ((__u16)(0x86DD) << (16 -(1 +1)*8) >> (16 -8) << (0*8)))) : __builtin_bswap16(0x86DD)):
  if (!__revalidate_data_pull(ctx, &data, &data_end, (void **)&ip6, __config_eth_header_length, sizeof(**&ip6), false))
   goto out;

  l4_proto = ip6->nexthdr;
  l3_hdrlen = sizeof(struct ipv6hdr);
  break;


 case (__builtin_constant_p(0x0800) ? ((__u16)( ((__u16)(0x0800) << (16 -(0 +1)*8) >> (16 -8) << (1*8)) | ((__u16)(0x0800) << (16 -(1 +1)*8) >> (16 -8) << (0*8)))) : __builtin_bswap16(0x0800)):
  if (!__revalidate_data_pull(ctx, &data, &data_end, (void **)&ip4, __config_eth_header_length, sizeof(**&ip4), false))
   goto out;

  l4_proto = ip4->protocol;
  l3_hdrlen = ipv4_hdrlen(ip4);
  break;

 default:
  goto out;
 }





 switch (l4_proto) {
 case IPPROTO_UDP:
  if (l4_load_port(ctx, __config_eth_header_length + l3_hdrlen + (__builtin_offsetof(struct udphdr, dest)), &dport) < 0)
   goto out;






  break;
 }

out:
 return flags;
}
# 216 "/var/lib/cilium/bpf/lib/classifiers.h"
static inline __attribute__((always_inline)) __u64
compute_capture_len(struct __sk_buff *ctx, __u64 monitor,
      cls_flags_t flags __attribute__((__unused__)),
      enum trace_point obs_point __attribute__((__unused__)))
{
 __u32 cap_len_default = __config_trace_payload_len;







 if (monitor == 0 || monitor == __config_trace_payload_len)
  monitor = cap_len_default;

 return ({ __u64 _x = (monitor); __u64 _y = (ctx_full_len(ctx)); (void) (&_x == &_y); _x < _y ? _x : _y; });
}
# 24 "/var/lib/cilium/bpf/lib/drop.h" 2



struct drop_notify {
 __u8 type; __u8 subtype; __u16 source; __u32 hash; __u32 len_orig; __u16 len_cap; __u16 version;
 __u32 src_label;
 __u32 dst_label;
 __u32 dst_id;
 __u16 line;
 __u8 file;
 __s8 ext_error;
 __u32 ifindex;
 __u8 flags;



 __u8 pad2[3];
};
# 61 "/var/lib/cilium/bpf/lib/drop.h"
__attribute__((section("tc" "/tail"), used)) __attribute__((btf_decl_tag("tail:cilium_calls/" "1")))
int tail_drop_notify(struct __sk_buff *ctx)
{

 __u32 error = ctx_load_meta(ctx, 2) & 0xFFFFFFFF;
 __u64 ctx_len = ctx_full_len(ctx);
 __u64 cap_len;
 __u32 meta4 = ctx_load_meta(ctx, 4);
 __u16 line = (__u16)(meta4 >> 16);
 __u8 file = (__u8)(meta4 >> 8);
 __u8 exitcode = (__u8)meta4;
 cls_flags_t flags = ((cls_flags_t)0);
 struct ratelimit_key rkey = {
  .usage = 2,
 };
 struct ratelimit_settings settings = {
  .topup_interval_ns = (1000ULL * 1000ULL * 1000UL),
 };
 struct drop_notify msg;

 if (0 > 0) {
  settings.bucket_size = 0;
  settings.tokens_per_topup = 0;
  if (!ratelimit_check_and_take(&rkey, &settings))
   return exitcode;
 }

 flags = ctx_classify(ctx, 0, TRACE_POINT_UNKNOWN);
 cap_len = compute_capture_len(ctx, 0, flags, TRACE_POINT_UNKNOWN);

 msg = (typeof(msg)) {
  .type = (CILIUM_NOTIFY_DROP), .subtype = ((__u8)error), .source = __config_host_ep_id, .hash = ctx->hash,
  .len_orig = ((__u32)ctx_len), .len_cap = ((__u16)cap_len), .version = (2),
  .src_label = ctx_load_meta(ctx, 0),
  .dst_label = ctx_load_meta(ctx, 1),
  .dst_id = ctx_load_meta(ctx, 3),
  .line = line,
  .file = file,
  .ext_error = (__s8)(__u8)(error >> 8),
  .ifindex = ctx_get_ifindex(ctx),
  .flags = flags,
 };

 skb_event_output(ctx, &cilium_events,
    (cap_len << 32) | BPF_F_CURRENT_CPU,
    &msg, sizeof(msg));

 return exitcode;
}
# 124 "/var/lib/cilium/bpf/lib/drop.h"
static inline __attribute__((always_inline)) int
_send_drop_notify(__u8 file, __u16 line, struct __sk_buff *ctx,
    __u32 src, __u32 dst, __u32 dst_id,
    __u32 reason, __u32 exitcode, enum metric_dir direction)
{
 int ret __attribute__((__unused__));


 if (!__builtin_constant_p(exitcode) || exitcode > 0xff ||
     !__builtin_constant_p(file) || file > 0xff ||
     !__builtin_constant_p(line) || line > 0xffff)
  __builtin_trap();


 if (dst_id != 0 && (!__builtin_constant_p(direction) || direction != METRIC_INGRESS))
  __builtin_trap();

 ctx_store_meta(ctx, 0, src);
 ctx_store_meta(ctx, 1, dst);
 ctx_store_meta(ctx, 2, reason);
 ctx_store_meta(ctx, 3, dst_id);
 ctx_store_meta(ctx, 4, exitcode | file << 8 | line << 16);

 _update_metrics(ctx_full_len(ctx), direction, (__u8)reason, line, file);
 ret = tail_call_internal(ctx, 1, ((void *)0));


 return exitcode;
}
# 11 "/var/lib/cilium/bpf/lib/arp.h" 2

struct arp_eth {
 unsigned char ar_sha[6];
 __be32 ar_sip;
 unsigned char ar_tha[6];
 __be32 ar_tip;
} __attribute__((packed));


static inline __attribute__((always_inline)) int arp_check(struct ethhdr *eth,
         const struct arphdr *arp,
         union macaddr *mac)
{
 union macaddr *dmac = (union macaddr *) &eth->h_dest;

 return arp->ar_op == (__builtin_constant_p(1) ? ((__u16)( ((__u16)(1) << (16 -(0 +1)*8) >> (16 -8) << (1*8)) | ((__u16)(1) << (16 -(1 +1)*8) >> (16 -8) << (0*8)))) : __builtin_bswap16(1)) &&
        arp->ar_hrd == (__builtin_constant_p(1) ? ((__u16)( ((__u16)(1) << (16 -(0 +1)*8) >> (16 -8) << (1*8)) | ((__u16)(1) << (16 -(1 +1)*8) >> (16 -8) << (0*8)))) : __builtin_bswap16(1)) &&
        (eth_is_bcast(dmac) || !eth_addrcmp(dmac, mac));
}

static inline __attribute__((always_inline)) int
arp_prepare_response(struct __sk_buff *ctx, union macaddr *smac, __be32 sip,
       union macaddr *dmac, __be32 tip)
{
 __be16 arpop = (__builtin_constant_p(2) ? ((__u16)( ((__u16)(2) << (16 -(0 +1)*8) >> (16 -8) << (1*8)) | ((__u16)(2) << (16 -(1 +1)*8) >> (16 -8) << (0*8)))) : __builtin_bswap16(2));

 if (eth_store_saddr(ctx, smac->addr, 0) < 0 ||
     eth_store_daddr(ctx, dmac->addr, 0) < 0 ||
     skb_store_bytes(ctx, 20, &arpop, sizeof(arpop), 0) < 0 ||

     skb_store_bytes(ctx, 22, smac, 6, 0) < 0 ||
     skb_store_bytes(ctx, 28, &sip, sizeof(sip), 0) < 0 ||
     skb_store_bytes(ctx, 32, dmac, 6, 0) < 0 ||
     skb_store_bytes(ctx, 38, &tip, sizeof(tip), 0) < 0)
  return -141;

 return 0;
}

static inline __attribute__((always_inline)) _Bool
arp_validate(const struct __sk_buff *ctx, union macaddr *mac,
      union macaddr *smac, __be32 *sip, __be32 *tip)
{
 void *data_end = (void *) (long) ctx->data_end;
 void *data = (void *) (long) ctx->data;
 struct arphdr *arp = data + __config_eth_header_length;
 struct ethhdr *eth = data;
 struct arp_eth *arp_eth;

 if (data + __config_eth_header_length + sizeof(*arp) + sizeof(*arp_eth) > data_end)
  return false;

 if (!arp_check(eth, arp, mac))
  return false;

 arp_eth = data + __config_eth_header_length + sizeof(*arp);
 *smac = *(union macaddr *) &eth->h_source;
 *sip = arp_eth->ar_sip;
 *tip = arp_eth->ar_tip;

 return true;
}

static inline __attribute__((always_inline)) int
arp_respond(struct __sk_buff *ctx, union macaddr *smac, __be32 sip,
     union macaddr *dmac, __be32 tip, int direction)
{
 int ret = arp_prepare_response(ctx, smac, sip, dmac, tip);

 if (__builtin_expect(!!(ret != 0), 0))
  goto error;

 cilium_dbg_capture(ctx, DBG_CAPTURE_DELIVERY,
      ctx_get_ifindex(ctx));
 return ctx_redirect(ctx, ctx_get_ifindex(ctx), direction);

error:
 return _send_drop_notify((__u8)__id_for_file("arp.h"), 88, ctx, 0, 0, 0, ({ typeof(ret) __err = (ret); (__u8)(__err > 0 ? __err : -__err); }), 2, METRIC_EGRESS);
}
# 31 "/var/lib/cilium/bpf/bpf_host.c" 2


# 1 "/var/lib/cilium/bpf/lib/icmp6.h" 1
# 12 "/var/lib/cilium/bpf/lib/icmp6.h"
# 1 "/var/lib/cilium/bpf/lib/eps.h" 1
# 11 "/var/lib/cilium/bpf/lib/eps.h"
struct {
 int(*(type))[BPF_MAP_TYPE_HASH];
 typeof(struct endpoint_key) *(key);
 typeof(struct endpoint_info) *(value);
 int(*(pinning))[1];
 int(*(max_entries))[65535];
 int(*(map_flags))[BPF_F_NO_PREALLOC];
} cilium_lxc __attribute__((section(".maps"), used));

static inline __attribute__((always_inline)) __attribute__((__unused__)) struct endpoint_info *
__lookup_ip6_endpoint(const union v6addr *ip6)
{
 struct endpoint_key key = {};

 key.ip6 = *ip6;
 key.family = 2;

 return map_lookup_elem(&cilium_lxc, &key);
}

static inline __attribute__((always_inline)) __attribute__((__unused__)) struct endpoint_info *
lookup_ip6_endpoint(const struct ipv6hdr *ip6)
{
 return __lookup_ip6_endpoint((union v6addr *)&ip6->daddr);
}

static inline __attribute__((always_inline)) __attribute__((__unused__)) struct endpoint_info *
__lookup_ip4_endpoint(__u32 ip)
{
 struct endpoint_key key = {};

 key.ip4 = ip;
 key.family = 1;

 return map_lookup_elem(&cilium_lxc, &key);
}

static inline __attribute__((always_inline)) __attribute__((__unused__)) struct endpoint_info *
lookup_ip4_endpoint(const struct iphdr *ip4)
{
 return __lookup_ip4_endpoint(ip4->daddr);
}

struct ipcache_key {
 struct bpf_lpm_trie_key lpm_key;
 __u16 cluster_id;
 __u8 pad1;
 __u8 family;
 union {
  struct {
   __u32 ip4;
   __u32 pad4;
   __u32 pad5;
   __u32 pad6;
  };
  union v6addr ip6;
 };
} __attribute__((packed));


struct {
 int(*(type))[BPF_MAP_TYPE_LPM_TRIE];
 typeof(struct ipcache_key) *(key);
 typeof(struct remote_endpoint_info) *(value);
 int(*(pinning))[1];
 int(*(max_entries))[512000];
 int(*(map_flags))[BPF_F_NO_PREALLOC];
} cilium_ipcache_v2 __attribute__((section(".maps"), used));
# 88 "/var/lib/cilium/bpf/lib/eps.h"
static inline __attribute__((always_inline)) __attribute__((__unused__)) struct remote_endpoint_info *
ipcache_lookup6(const void *map, const union v6addr *addr,
  __u32 prefix, __u32 cluster_id)
{
 struct ipcache_key key = {
  .lpm_key = { ((8 * (sizeof(struct ipcache_key) - sizeof(struct bpf_lpm_trie_key) - sizeof(union v6addr))) + (prefix)), {} },
  .family = 2,
  .ip6 = *addr,
 };


 if (cluster_id > 0xffff)
  return ((void *)0);

 key.cluster_id = (__u16)cluster_id;

 ipv6_addr_clear_suffix(&key.ip6, prefix);
 return map_lookup_elem(map, &key);
}



static inline __attribute__((always_inline)) __attribute__((__unused__)) struct remote_endpoint_info *
ipcache_lookup4(const void *map, __be32 addr, __u32 prefix, __u32 cluster_id)
{
 struct ipcache_key key = {
  .lpm_key = { ((8 * (sizeof(struct ipcache_key) - sizeof(struct bpf_lpm_trie_key) - sizeof(union v6addr))) + (prefix)), {} },
  .family = 1,
  .ip4 = addr,
 };


 if (cluster_id > 0xffff)
  return ((void *)0);

 key.cluster_id = (__u16)cluster_id;

 key.ip4 &= (__builtin_constant_p(prefix <= 0 ? 0 : prefix < 32 ? ((1<<prefix) - 1) << (32-prefix) : 0xFFFFFFFF) ? ((__u32)( ((__u32)(prefix <= 0 ? 0 : prefix < 32 ? ((1<<prefix) - 1) << (32-prefix) : 0xFFFFFFFF) << (32 -(0 +1)*8) >> (32 -8) << (3*8)) | ((__u32)(prefix <= 0 ? 0 : prefix < 32 ? ((1<<prefix) - 1) << (32-prefix) : 0xFFFFFFFF) << (32 -(1 +1)*8) >> (32 -8) << (2*8)) | ((__u32)(prefix <= 0 ? 0 : prefix < 32 ? ((1<<prefix) - 1) << (32-prefix) : 0xFFFFFFFF) << (32 -(2 +1)*8) >> (32 -8) << (1*8)) | ((__u32)(prefix <= 0 ? 0 : prefix < 32 ? ((1<<prefix) - 1) << (32-prefix) : 0xFFFFFFFF) << (32 -(3 +1)*8) >> (32 -8) << (0*8)))) : __builtin_bswap32(prefix <= 0 ? 0 : prefix < 32 ? ((1<<prefix) - 1) << (32-prefix) : 0xFFFFFFFF));
 return map_lookup_elem(map, &key);
}
# 13 "/var/lib/cilium/bpf/lib/icmp6.h" 2
# 37 "/var/lib/cilium/bpf/lib/icmp6.h"
static inline __attribute__((always_inline)) int icmp6_load_type(struct __sk_buff *ctx, int l4_off, __u8 *type)
{
 return skb_load_bytes(ctx, l4_off + __builtin_offsetof(struct icmp6hdr, icmp6_type), type, sizeof(*type));
}

static inline __attribute__((always_inline))
int icmp6_send_reply(struct __sk_buff *ctx, int nh_off, union v6addr new_sip)
{
 union macaddr smac, dmac = __config_interface_mac;
 const int csum_off = nh_off + (sizeof(struct ipv6hdr) + __builtin_offsetof(struct icmp6hdr, icmp6_cksum));
 union v6addr sip, dip;
 __be32 sum;

 if (ipv6_load_saddr(ctx, nh_off, &sip) < 0 ||
     ipv6_load_daddr(ctx, nh_off, &dip) < 0)
  return -134;


 if (ipv6_store_saddr(ctx, new_sip.addr, nh_off) < 0)
  return -141;

 if (ipv6_store_daddr(ctx, sip.addr, nh_off) < 0)
  return -141;


 sum = csum_diff(sip.addr, 16, new_sip.addr, 16, 0);
 if (l4_csum_replace(ctx, csum_off, 0, sum, (1ULL << 4)) < 0)
  return -154;

 sum = csum_diff(dip.addr, 16, sip.addr, 16, 0);
 if (l4_csum_replace(ctx, csum_off, 0, sum, (1ULL << 4)) < 0)
  return -154;


 if (eth_load_saddr(ctx, smac.addr, 0) < 0)
  return -134;

 if (eth_store_daddr(ctx, smac.addr, 0) < 0 ||
     eth_store_saddr(ctx, dmac.addr, 0) < 0)
  return -141;

 cilium_dbg_capture(ctx, DBG_CAPTURE_DELIVERY, ctx_get_ifindex(ctx));

 return redirect_self(ctx);
}

static inline __attribute__((always_inline))
int icmp6_ndisc_adv_addopt(struct __sk_buff *ctx)
{
 struct ipv6hdr *ip6;
 void *data, *data_end;
 __u64 *opt;

 if (skb_change_tail(ctx, (__u32)(ctx_full_len(ctx) + 8), 0) < 0)
  return -134;

 if (!__revalidate_data_pull(ctx, &data, &data_end, (void **)&ip6, __config_eth_header_length, sizeof(**&ip6), false))
  return -134;

 ip6->payload_len = (__builtin_constant_p((__builtin_constant_p(ip6->payload_len) ? ((__u16)( ((__u16)(ip6->payload_len) << (16 -(0 +1)*8) >> (16 -8) << (1*8)) | ((__u16)(ip6->payload_len) << (16 -(1 +1)*8) >> (16 -8) << (0*8)))) : __builtin_bswap16(ip6->payload_len)) + 8) ? ((__u16)( ((__u16)((__builtin_constant_p(ip6->payload_len) ? ((__u16)( ((__u16)(ip6->payload_len) << (16 -(0 +1)*8) >> (16 -8) << (1*8)) | ((__u16)(ip6->payload_len) << (16 -(1 +1)*8) >> (16 -8) << (0*8)))) : __builtin_bswap16(ip6->payload_len)) + 8) << (16 -(0 +1)*8) >> (16 -8) << (1*8)) | ((__u16)((__builtin_constant_p(ip6->payload_len) ? ((__u16)( ((__u16)(ip6->payload_len) << (16 -(0 +1)*8) >> (16 -8) << (1*8)) | ((__u16)(ip6->payload_len) << (16 -(1 +1)*8) >> (16 -8) << (0*8)))) : __builtin_bswap16(ip6->payload_len)) + 8) << (16 -(1 +1)*8) >> (16 -8) << (0*8)))) : __builtin_bswap16((__builtin_constant_p(ip6->payload_len) ? ((__u16)( ((__u16)(ip6->payload_len) << (16 -(0 +1)*8) >> (16 -8) << (1*8)) | ((__u16)(ip6->payload_len) << (16 -(1 +1)*8) >> (16 -8) << (0*8)))) : __builtin_bswap16(ip6->payload_len)) + 8));



 opt = (__u64 *)((void *)(ip6 + 1) + sizeof(struct icmp6hdr)
       + sizeof(union v6addr));
 if ((void *)(opt + 1) > data_end)
  return -134;
 *opt = 0x0ULL;

 return 0;
}
# 118 "/var/lib/cilium/bpf/lib/icmp6.h"
static inline __attribute__((always_inline))
int icmp6_send_ndisc_adv(struct __sk_buff *ctx, int nh_off,
    const union macaddr *mac, _Bool to_router)
{
 struct icmp6hdr icmp6hdr __attribute__((aligned(8))) = {}, icmp6hdr_old __attribute__((aligned(8)));
 __u8 opts[8], opts_old[8];
 const int csum_off = nh_off + (sizeof(struct ipv6hdr) + __builtin_offsetof(struct icmp6hdr, icmp6_cksum));
 union v6addr target_ip;
 __be32 sum;
# 139 "/var/lib/cilium/bpf/lib/icmp6.h"
 if (skb_load_bytes(ctx, nh_off + (sizeof(struct ipv6hdr) + sizeof(struct icmp6hdr) + sizeof(struct in6_addr)), opts_old,
      sizeof(opts_old)) < 0) {
  if (icmp6_ndisc_adv_addopt(ctx) < 0)
   return -134;
 }

 if (skb_load_bytes(ctx, nh_off + sizeof(struct ipv6hdr), &icmp6hdr_old,
      sizeof(icmp6hdr_old)) < 0)
  return -134;


 icmp6hdr.icmp6_type = 136;
 icmp6hdr.icmp6_code = 0;
 icmp6hdr.icmp6_cksum = icmp6hdr_old.icmp6_cksum;
 icmp6hdr.icmp6_dataun.un_data32[0] = 0;

 icmp6hdr.icmp6_dataun.u_nd_advt.solicited = 1;
 if (to_router) {
  icmp6hdr.icmp6_dataun.u_nd_advt.router = 1;
  icmp6hdr.icmp6_dataun.u_nd_advt.override = 0;
 } else {
  icmp6hdr.icmp6_dataun.u_nd_advt.router = 0;
  icmp6hdr.icmp6_dataun.u_nd_advt.override = 1;
 }


 if (skb_load_bytes(ctx, nh_off + sizeof(struct ipv6hdr) + sizeof(icmp6hdr),
      &target_ip,
      sizeof(target_ip)) < 0)
  return -141;

 if (skb_store_bytes(ctx, nh_off + sizeof(struct ipv6hdr), &icmp6hdr,
       sizeof(icmp6hdr), 0) < 0)
  return -141;


 sum = csum_diff(&icmp6hdr_old, sizeof(icmp6hdr_old),
   &icmp6hdr, sizeof(icmp6hdr), 0);
 if (l4_csum_replace(ctx, csum_off, 0, sum, (1ULL << 4)) < 0)
  return -154;


 if (skb_load_bytes(ctx, nh_off + (sizeof(struct ipv6hdr) + sizeof(struct icmp6hdr) + sizeof(struct in6_addr)), opts_old,
      sizeof(opts_old)) < 0)
  return -134;

 opts[0] = 2;
 opts[1] = 1;
 opts[2] = mac->addr[0];
 opts[3] = mac->addr[1];
 opts[4] = mac->addr[2];
 opts[5] = mac->addr[3];
 opts[6] = mac->addr[4];
 opts[7] = mac->addr[5];


 if (skb_store_bytes(ctx, nh_off + (sizeof(struct ipv6hdr) + sizeof(struct icmp6hdr) + sizeof(struct in6_addr)), opts, sizeof(opts), 0) < 0)
  return -141;


 sum = csum_diff(opts_old, sizeof(opts_old), opts, sizeof(opts), 0);
 if (l4_csum_replace(ctx, csum_off, 0, sum, (1ULL << 4)) < 0)
  return -154;

 return icmp6_send_reply(ctx, nh_off, target_ip);
}

static inline __attribute__((always_inline)) __be32 compute_icmp6_csum(char data[80], __u16 payload_len,
       struct ipv6hdr *ipv6hdr)
{
 __be32 sum;


 sum = csum_diff(((void *)0), 0, data, payload_len, 0);
 sum = ipv6_pseudohdr_checksum(ipv6hdr, 58, payload_len,
          sum);
 return sum;
}

static inline __attribute__((always_inline)) int __icmp6_send_time_exceeded(struct __sk_buff *ctx,
            int nh_off)
{

 char data[80] = {};
 struct icmp6hdr *icmp6hoplim;
 struct ipv6hdr *ipv6hdr;
 char *upper;
 const int csum_off = nh_off + (sizeof(struct ipv6hdr) + __builtin_offsetof(struct icmp6hdr, icmp6_cksum));
 __be32 sum = 0;
 __u16 payload_len = 0;
 __u8 icmp6_nexthdr = 58;
 int trimlen;





 union v6addr router_ip = __config_router_ipv6;


 icmp6hoplim = (struct icmp6hdr *)data;
 ipv6hdr = (struct ipv6hdr *)(data + 8);
 upper = (data + 48);


 icmp6hoplim->icmp6_type = 3;
 icmp6hoplim->icmp6_code = 0;
 icmp6hoplim->icmp6_cksum = 0;
 icmp6hoplim->icmp6_dataun.un_data32[0] = 0;

 cilium_dbg(ctx, DBG_ICMP6_TIME_EXCEEDED, 0, 0);


 if (skb_load_bytes(ctx, nh_off, ipv6hdr, sizeof(*ipv6hdr)) < 0)
  return -134;

 if (ipv6_store_nexthdr(ctx, &icmp6_nexthdr, nh_off) < 0)
  return -141;


 switch (ipv6hdr->nexthdr) {
 case 58:



 case IPPROTO_UDP:
  if (skb_load_bytes(ctx, nh_off + sizeof(struct ipv6hdr),
       upper, 8) < 0)
   return -134;
  sum = compute_icmp6_csum(data, 56, ipv6hdr);
  payload_len = (__builtin_constant_p(56) ? ((__u16)( ((__u16)(56) << (16 -(0 +1)*8) >> (16 -8) << (1*8)) | ((__u16)(56) << (16 -(1 +1)*8) >> (16 -8) << (0*8)))) : __builtin_bswap16(56));
  trimlen = 56 - (__builtin_constant_p(ipv6hdr->payload_len) ? ((__u16)( ((__u16)(ipv6hdr->payload_len) << (16 -(0 +1)*8) >> (16 -8) << (1*8)) | ((__u16)(ipv6hdr->payload_len) << (16 -(1 +1)*8) >> (16 -8) << (0*8)))) : __builtin_bswap16(ipv6hdr->payload_len));
  if (skb_change_tail(ctx, (__u32)(ctx_full_len(ctx) + trimlen), 0) < 0)
   return -141;

  if (skb_store_bytes(ctx, nh_off + sizeof(struct ipv6hdr),
        data, 56, 0) < 0)
   return -141;
  if (ipv6_store_paylen(ctx, nh_off, &payload_len) < 0)
   return -141;

  break;

 case IPPROTO_TCP:
  if (skb_load_bytes(ctx, nh_off + sizeof(struct ipv6hdr),
       upper, 20) < 0)
   return -134;
  sum = compute_icmp6_csum(data, 68, ipv6hdr);
  payload_len = (__builtin_constant_p(68) ? ((__u16)( ((__u16)(68) << (16 -(0 +1)*8) >> (16 -8) << (1*8)) | ((__u16)(68) << (16 -(1 +1)*8) >> (16 -8) << (0*8)))) : __builtin_bswap16(68));

  trimlen = 68 - (__builtin_constant_p(ipv6hdr->payload_len) ? ((__u16)( ((__u16)(ipv6hdr->payload_len) << (16 -(0 +1)*8) >> (16 -8) << (1*8)) | ((__u16)(ipv6hdr->payload_len) << (16 -(1 +1)*8) >> (16 -8) << (0*8)))) : __builtin_bswap16(ipv6hdr->payload_len));
  if (skb_change_tail(ctx, (__u32)(ctx_full_len(ctx) + trimlen), 0) < 0)
   return -141;
  if (skb_store_bytes(ctx, nh_off + sizeof(struct ipv6hdr),
        data, 68, 0) < 0)
   return -141;
  if (ipv6_store_paylen(ctx, nh_off, &payload_len) < 0)
   return -141;

  break;
 default:
  return -142;
 }

 if (l4_csum_replace(ctx, csum_off, 0, sum, (1ULL << 4)) < 0)
  return -154;

 return icmp6_send_reply(ctx, nh_off, router_ip);
}


__attribute__((section("tc" "/tail"), used)) __attribute__((btf_decl_tag("tail:cilium_calls/" "5")))
int tail_icmp6_send_time_exceeded(struct __sk_buff *ctx __attribute__((__unused__)))
{
 int ret, nh_off = ctx_load_and_clear_meta(ctx, 0);
 enum metric_dir direction = (enum metric_dir)ctx_load_meta(ctx, 1);

 ret = __icmp6_send_time_exceeded(ctx, nh_off);
 if ((__builtin_expect(!!((ret < 0) || (ret == 2)), 0)))
  return _send_drop_notify((__u8)__id_for_file("icmp6.h"), 318, ctx, 0, 0, 0, ({ typeof(ret) __err = (ret); (__u8)(__err > 0 ? __err : -__err); }), 2, direction);
 return ret;
}
# 331 "/var/lib/cilium/bpf/lib/icmp6.h"
static inline __attribute__((always_inline)) int icmp6_send_time_exceeded(struct __sk_buff *ctx,
          int nh_off, enum metric_dir direction)
{
 ctx_store_meta(ctx, 0, nh_off);
 ctx_store_meta(ctx, 1, direction);

 return tail_call_internal(ctx, 5, ((void *)0));
}


static inline __attribute__((always_inline)) int __icmp6_handle_ns(struct __sk_buff *ctx, int nh_off)
{
 union v6addr target, router = __config_router_ipv6;
 struct endpoint_info *ep;
 union macaddr router_mac = __config_interface_mac;

 if (skb_load_bytes(ctx, nh_off + (sizeof(struct ipv6hdr) + sizeof(struct icmp6hdr)), target.addr,
      sizeof(((struct ipv6hdr *)((void *)0))->saddr)) < 0)
  return -134;

 cilium_dbg(ctx, DBG_ICMP6_NS, target.p.p3, target.p.p4);

 if (ipv6_addr_equals(&target, &router)) {
  return icmp6_send_ndisc_adv(ctx, nh_off, &router_mac, true);
 }

 ep = __lookup_ip6_endpoint(&target);
 if (ep) {
  if (ep->flags & 1) {
# 372 "/var/lib/cilium/bpf/lib/icmp6.h"
   return 0;
  }
  return icmp6_send_ndisc_adv(ctx, nh_off, &router_mac, false);
 }


 return 0;
}


__attribute__((section("tc" "/tail"), used)) __attribute__((btf_decl_tag("tail:cilium_calls/" "4")))
int tail_icmp6_handle_ns(struct __sk_buff *ctx)
{
 int ret, nh_off = ctx_load_and_clear_meta(ctx, 0);
 enum metric_dir direction = (enum metric_dir)ctx_load_meta(ctx, 1);

 ret = __icmp6_handle_ns(ctx, nh_off);
 if ((__builtin_expect(!!((ret < 0) || (ret == 2)), 0)))
  return _send_drop_notify((__u8)__id_for_file("icmp6.h"), 390, ctx, 0, 0, 0, ({ typeof(ret) __err = (ret); (__u8)(__err > 0 ? __err : -__err); }), 2, direction);
 return ret;
}
# 406 "/var/lib/cilium/bpf/lib/icmp6.h"
static inline __attribute__((always_inline)) int icmp6_handle_ns(struct __sk_buff *ctx, int nh_off,
        enum metric_dir direction,
        __s8 *ext_err)
{
 ctx_store_meta(ctx, 0, nh_off);
 ctx_store_meta(ctx, 1, direction);

 return tail_call_internal(ctx, 4, ext_err);
}

static inline __attribute__((always_inline)) _Bool
is_icmp6_ndp(struct __sk_buff *ctx, const struct ipv6hdr *ip6, int nh_off)
{
 __u8 type;

 if (ip6->nexthdr != 58)
  return false;

 if (icmp6_load_type(ctx, nh_off + sizeof(struct ipv6hdr), &type) < 0)
  return false;

 return (type == 135 || type == 136);
}

static inline __attribute__((always_inline)) int icmp6_ndp_handle(struct __sk_buff *ctx, int nh_off,
         enum metric_dir direction,
         __s8 *ext_err)
{
 __u8 type;

 if (icmp6_load_type(ctx, nh_off + sizeof(struct ipv6hdr), &type) < 0)
  return -134;

 cilium_dbg(ctx, DBG_ICMP6_HANDLE, type, 0);
 if (type == 135)
  return icmp6_handle_ns(ctx, nh_off, direction, ext_err);




 return 0;
}

static inline __attribute__((always_inline)) int
icmp6_host_handle(struct __sk_buff *ctx, int l4_off, __s8 *ext_err, _Bool handle_ns)
{
 __u8 type;

 if (icmp6_load_type(ctx, l4_off, &type) < 0)
  return -134;

 if (type == 135 && handle_ns)
  return icmp6_handle_ns(ctx, __config_eth_header_length, METRIC_INGRESS, ext_err);
# 523 "/var/lib/cilium/bpf/lib/icmp6.h"
 return 0;

}

static inline __attribute__((always_inline))
_Bool icmp6_ndisc_validate(struct __sk_buff *ctx, const struct ipv6hdr *ip6,
     const union macaddr *iface_mac, union v6addr *tip)
{
 __u8 nexthdr = ip6->nexthdr;
 struct icmp6hdr *icmp;
 int l4_off = ipv6_hdrlen(ctx, &nexthdr);
 struct ethhdr *eth = ctx_data(ctx);
 union macaddr *dmac;

 if ((void *)eth + __config_eth_header_length > ctx_data_end(ctx))
  return false;

 dmac = (union macaddr *)&eth->h_dest;

 if (l4_off < 0 || nexthdr != 58)
  return false;

 icmp = (struct icmp6hdr *)((__u8 *)ip6 + l4_off);
 if ((void *)icmp + sizeof(*icmp) + sizeof(*tip) > ctx_data_end(ctx))
  return false;

 if (icmp->icmp6_type != 135)
  return false;

 *tip = *(union v6addr *)(icmp + 1);

 if (!ipv6_is_sol_mc_mac(tip, dmac) && eth_addrcmp(dmac, iface_mac) != 0)
  return false;

 return true;
}
# 34 "/var/lib/cilium/bpf/bpf_host.c" 2


# 1 "/var/lib/cilium/bpf/lib/proxy.h" 1





# 1 "/var/lib/cilium/bpf/lib/conntrack.h" 1






# 1 "/var/lib/cilium/bpf/include/linux/icmp.h" 1
# 69 "/var/lib/cilium/bpf/include/linux/icmp.h"
struct icmphdr {
  __u8 type;
  __u8 code;
  __sum16 checksum;
  union {
 struct {
  __be16 id;
  __be16 sequence;
 } echo;
 __be32 gateway;
 struct {
  __be16 __unused;
  __be16 mtu;
 } frag;
  } un;
};
# 93 "/var/lib/cilium/bpf/include/linux/icmp.h"
struct icmp_filter {
 __u32 data;
};
# 8 "/var/lib/cilium/bpf/lib/conntrack.h" 2
# 17 "/var/lib/cilium/bpf/lib/conntrack.h"
# 1 "/var/lib/cilium/bpf/lib/signal.h" 1








struct {
 int(*(type))[BPF_MAP_TYPE_PERF_EVENT_ARRAY];
 int(*(key_size))[sizeof(__u32)];
 int(*(value_size))[sizeof(__u32)];
 int(*(pinning))[1];
} cilium_signals __attribute__((section(".maps"), used));

enum {
 SIGNAL_NAT_FILL_UP = 0,
 SIGNAL_CT_FILL_UP,
 SIGNAL_AUTH_REQUIRED,
};

enum {
 SIGNAL_PROTO_V4 = 0,
 SIGNAL_PROTO_V6,
};

struct signal_msg {
 __u32 signal_nr;
 union {
  struct {
   __u32 proto;
  };
  struct auth_key auth;
 };
};
# 52 "/var/lib/cilium/bpf/lib/signal.h"
static inline __attribute__((always_inline)) void send_signal_nat_fill_up(struct __sk_buff *ctx,
          __u32 proto)
{
 { struct signal_msg msg = { .signal_nr = (SIGNAL_NAT_FILL_UP), .proto = (proto), }; skb_event_output((ctx), &cilium_signals, BPF_F_CURRENT_CPU, &msg, sizeof(msg.signal_nr) + sizeof(msg.proto)); };
}

static inline __attribute__((always_inline)) void send_signal_ct_fill_up(struct __sk_buff *ctx,
         __u32 proto)
{
 { struct signal_msg msg = { .signal_nr = (SIGNAL_CT_FILL_UP), .proto = (proto), }; skb_event_output((ctx), &cilium_signals, BPF_F_CURRENT_CPU, &msg, sizeof(msg.signal_nr) + sizeof(msg.proto)); };
}

static inline __attribute__((always_inline)) void send_signal_auth_required(struct __sk_buff *ctx,
            const struct auth_key *auth)
{
 { struct signal_msg msg = { .signal_nr = (SIGNAL_AUTH_REQUIRED), .auth = (*auth), }; skb_event_output((ctx), &cilium_signals, BPF_F_CURRENT_CPU, &msg, sizeof(msg.signal_nr) + sizeof(msg.auth)); };
}
# 18 "/var/lib/cilium/bpf/lib/conntrack.h" 2



__attribute__((section(".rodata.config"), used)) __attribute__((btf_decl_tag("kind:object"))) __attribute__((btf_decl_tag("Pass traffic with extended IP protocols"))) volatile const _Bool __config_enable_extended_ip_protocols;

enum ct_action {
 ACTION_UNSPEC,
 ACTION_CREATE,
 ACTION_CLOSE,
};

enum ct_scope {
 SCOPE_FORWARD,
 SCOPE_REVERSE,
 SCOPE_BIDIR,
};

enum ct_entry_type {
 CT_ENTRY_ANY = 0,
 CT_ENTRY_NODEPORT = (1 << 0),
 CT_ENTRY_DSR = (1 << 1),
 CT_ENTRY_SVC = (1 << 2),
};


struct ct_buffer4 {
 struct ipv4_ct_tuple tuple;
 struct ct_state ct_state;
 __u32 monitor;
 int ret;
 int l4_off;
};



struct ct_buffer6 {
 struct ipv6_ct_tuple tuple;
 struct ct_state ct_state;
 __u32 monitor;
 int ret;
 int l4_off;
};


static inline __attribute__((always_inline)) enum ct_action ct_tcp_select_action(union tcp_flags flags)
{
 if (__builtin_expect(!!(flags.value & (TCP_FLAG_RST | TCP_FLAG_FIN)), 0))
  return ACTION_CLOSE;

 if (__builtin_expect(!!((flags.value & TCP_FLAG_SYN) && !(flags.value & TCP_FLAG_ACK)), 0))
  return ACTION_CREATE;

 return ACTION_UNSPEC;
}

static inline __attribute__((always_inline)) _Bool ct_entry_seen_both_syns(const struct ct_entry *entry)
{
 _Bool rx_syn = entry->rx_flags_seen & TCP_FLAG_SYN;
 _Bool tx_syn = entry->tx_flags_seen & TCP_FLAG_SYN;

 return rx_syn && tx_syn;
}
# 100 "/var/lib/cilium/bpf/lib/conntrack.h"
static inline __attribute__((always_inline)) __u32 __ct_update_timeout(struct ct_entry *entry,
       __u32 lifetime, enum ct_dir dir,
       union tcp_flags flags,
       __u8 report_mask)
{
 __u32 now = (__u32)({ __u64 __x = ktime_get_ns() / (1000ULL * 1000ULL * 1000UL); __x; });
 __u8 accumulated_flags;
 __u8 seen_flags = flags.lower_bits & report_mask;
 __u32 last_report;

 ({ typeof(entry->lifetime) __val = (now + lifetime); (*(volatile typeof(entry->lifetime) *)&entry->lifetime) = (__val); bpf_barrier(); __val; });

 if (dir == CT_INGRESS) {
  accumulated_flags = ({ typeof(entry->rx_flags_seen) __val = (*(volatile typeof(entry->rx_flags_seen) *)&entry->rx_flags_seen); bpf_barrier(); __val; });
  last_report = ({ typeof(entry->last_rx_report) __val = (*(volatile typeof(entry->last_rx_report) *)&entry->last_rx_report); bpf_barrier(); __val; });
 } else {
  accumulated_flags = ({ typeof(entry->tx_flags_seen) __val = (*(volatile typeof(entry->tx_flags_seen) *)&entry->tx_flags_seen); bpf_barrier(); __val; });
  last_report = ({ typeof(entry->last_tx_report) __val = (*(volatile typeof(entry->last_tx_report) *)&entry->last_tx_report); bpf_barrier(); __val; });
 }
 seen_flags |= accumulated_flags;
# 151 "/var/lib/cilium/bpf/lib/conntrack.h"
 if (last_report + (5) < now ||
     accumulated_flags != seen_flags) {

  if (dir == CT_INGRESS) {
   ({ typeof(entry->rx_flags_seen) __val = (seen_flags); (*(volatile typeof(entry->rx_flags_seen) *)&entry->rx_flags_seen) = (__val); bpf_barrier(); __val; });
   ({ typeof(entry->last_rx_report) __val = (now); (*(volatile typeof(entry->last_rx_report) *)&entry->last_rx_report) = (__val); bpf_barrier(); __val; });
  } else {
   ({ typeof(entry->tx_flags_seen) __val = (seen_flags); (*(volatile typeof(entry->tx_flags_seen) *)&entry->tx_flags_seen) = (__val); bpf_barrier(); __val; });
   ({ typeof(entry->last_tx_report) __val = (now); (*(volatile typeof(entry->last_tx_report) *)&entry->last_tx_report) = (__val); bpf_barrier(); __val; });
  }
  return __config_trace_payload_len;
 }
 return 0;
}







static inline __attribute__((always_inline)) __u32 ct_update_timeout(struct ct_entry *entry,
            _Bool tcp, enum ct_dir dir,
            union tcp_flags seen_flags)
{
 __u32 lifetime = dir == CT_SERVICE ?
    (60) :
    (60);
 _Bool syn = seen_flags.value & TCP_FLAG_SYN;

 if (tcp) {
  entry->seen_non_syn |= !syn;
  if (entry->seen_non_syn) {
   lifetime = dir == CT_SERVICE ?
       (8000) :
       (8000);
  } else {
   lifetime = (60);
  }
 }

 return __ct_update_timeout(entry, lifetime, dir, seen_flags,
       0x00ff);
}

static inline __attribute__((always_inline)) void
ct_lookup_fill_state(struct ct_state *state, const struct ct_entry *entry,
       enum ct_dir dir, _Bool syn)
{
 state->rev_nat_index = entry->rev_nat_index;
 if (dir == CT_SERVICE) {
  state->backend_id = (__u32)entry->backend_id;
  state->syn = syn;
 } else if (dir == CT_INGRESS || dir == CT_EGRESS) {



  state->node_port = entry->node_port;
  state->dsr_internal = entry->dsr_internal;
  state->proxy_redirect = entry->proxy_redirect;
  state->from_l7lb = entry->from_l7lb;
  state->from_tunnel = entry->from_tunnel;
 }
}

static inline __attribute__((always_inline)) void ct_reset_seen_flags(struct ct_entry *entry)
{
 entry->rx_flags_seen = 0;
 entry->tx_flags_seen = 0;
}

static inline __attribute__((always_inline)) void ct_reset_closing(struct ct_entry *entry)
{
 entry->rx_closing = 0;
 entry->tx_closing = 0;
}

static inline __attribute__((always_inline)) _Bool ct_entry_alive(const struct ct_entry *entry)
{
 return !entry->rx_closing || !entry->tx_closing;
}

static inline __attribute__((always_inline)) _Bool ct_entry_closing(const struct ct_entry *entry)
{
 return entry->tx_closing || entry->rx_closing;
}

static inline __attribute__((always_inline)) _Bool
ct_entry_expired_rebalance(const struct ct_entry *entry)
{
 __u32 wait_time = (60);




 return ({ typeof(entry->last_tx_report) __val = (*(volatile typeof(entry->last_tx_report) *)&entry->last_tx_report); bpf_barrier(); __val; }) + wait_time <= ({ __u64 __x = ktime_get_ns() / (1000ULL * 1000ULL * 1000UL); __x; });
}

static inline __attribute__((always_inline)) _Bool
ct_entry_matches_types(const struct ct_entry *entry __attribute__((__unused__)),
         __u32 ct_entry_types, const struct ct_state *state)
{
 if (ct_entry_types == CT_ENTRY_ANY)
  return true;


 if ((ct_entry_types & CT_ENTRY_SVC) &&
     entry->rev_nat_index == state->rev_nat_index)
  return true;
# 278 "/var/lib/cilium/bpf/lib/conntrack.h"
 return false;
}





static inline __attribute__((always_inline)) enum ct_status
__ct_lookup(const void *map, struct __sk_buff *ctx, const void *tuple,
     enum ct_action action, enum ct_dir dir, __u32 ct_entry_types,
     struct ct_state *ct_state, _Bool is_tcp, union tcp_flags seen_flags,
     __u32 *monitor)
{
 _Bool syn = seen_flags.value & TCP_FLAG_SYN;
 struct ct_entry *entry;

 entry = map_lookup_elem(map, tuple);
 if (entry) {
  if (!ct_entry_matches_types(entry, ct_entry_types, ct_state))
   goto ct_new;

  cilium_dbg(ctx, DBG_CT_MATCH, entry->lifetime, entry->rev_nat_index);
  if (dir == CT_SERVICE && syn &&
      ct_entry_closing(entry) &&
      ct_entry_expired_rebalance(entry))
   goto ct_new;

  if (ct_entry_alive(entry))
   *monitor = ct_update_timeout(entry, is_tcp, dir, seen_flags);





  switch (action) {
  case ACTION_CREATE:
   if (__builtin_expect(!!(ct_entry_closing(entry)), 0)) {
    ct_reset_closing(entry);
    ct_reset_seen_flags(entry);
    entry->seen_non_syn = false;

    *monitor = ct_update_timeout(entry, is_tcp, dir, seen_flags);




    return CT_NEW;
   }
   break;

  case ACTION_CLOSE:
   switch (dir) {
   case CT_SERVICE:




    entry->rx_closing = 1;
    entry->tx_closing = 1;
    break;
   default:



    if (!ct_entry_seen_both_syns(entry) &&
        (seen_flags.value & TCP_FLAG_RST)) {
     entry->rx_closing = 1;
     entry->tx_closing = 1;
    } else if (dir == CT_INGRESS) {
     entry->rx_closing = 1;
    } else {
     entry->tx_closing = 1;
    }
   }
   if (ct_state)
    ct_state->closing = 1;

   *monitor = __config_trace_payload_len;
   if (ct_entry_alive(entry))
    break;
   __ct_update_timeout(entry, (10),
         dir, seen_flags, 0x00ff);
   break;
  default:
   break;
  }


  if (ct_state)
   ct_lookup_fill_state(ct_state, entry, dir, syn);

  return CT_ESTABLISHED;
 }

ct_new: __attribute__((__unused__));
 *monitor = __config_trace_payload_len;
 return CT_NEW;
}

static inline __attribute__((always_inline)) __u8
ct_lookup_select_tuple_type(enum ct_dir dir, enum ct_scope scope)
{
 if (dir == CT_SERVICE)
  return 4;

 switch (scope) {
 case SCOPE_FORWARD:
  return (dir == CT_EGRESS) ? 0 : 1;
 case SCOPE_BIDIR:



 case SCOPE_REVERSE:
  return (dir == CT_EGRESS) ? 1 : 0;
 }
}
# 428 "/var/lib/cilium/bpf/lib/conntrack.h"
static inline __attribute__((always_inline)) int
ipv6_extract_tuple(struct __sk_buff *ctx, struct ipv6_ct_tuple *tuple)
{
 void *data, *data_end;
 struct ipv6hdr *ip6;
 fraginfo_t fraginfo;
 int ret;

 if (!__revalidate_data_pull(ctx, &data, &data_end, (void **)&ip6, __config_eth_header_length, sizeof(**&ip6), false))
  return -134;

 tuple->nexthdr = ip6->nexthdr;
 ipv6_addr_copy(&tuple->daddr, (union v6addr *)&ip6->daddr);
 ipv6_addr_copy(&tuple->saddr, (union v6addr *)&ip6->saddr);

 ret = ipv6_hdrlen_with_fraginfo(ctx, &tuple->nexthdr, &fraginfo);
 if (ret < 0)
  return ret;

 if (__builtin_expect(!!(tuple->nexthdr != IPPROTO_TCP && tuple->nexthdr != IPPROTO_UDP), 0))




  return -137;

 return ipv6_load_l4_ports(ctx, ip6, fraginfo, __config_eth_header_length + ret,
      CT_EGRESS, &tuple->dport);
}

static inline __attribute__((always_inline)) void ct_flip_tuple_dir6(struct ipv6_ct_tuple *tuple)
{
 if (tuple->flags & 1)
  tuple->flags &= ~1;
 else
  tuple->flags |= 1;
}

static inline __attribute__((always_inline)) void
ipv6_ct_tuple_swap_addrs(struct ipv6_ct_tuple *tuple)
{
 union v6addr tmp_addr = {};

 ipv6_addr_copy(&tmp_addr, &tuple->saddr);
 ipv6_addr_copy(&tuple->saddr, &tuple->daddr);
 ipv6_addr_copy(&tuple->daddr, &tmp_addr);
}

static inline __attribute__((always_inline)) void
ipv6_ct_tuple_swap_ports(struct ipv6_ct_tuple *tuple)
{
 __be16 tmp;






 tmp = tuple->sport;
 tuple->sport = tuple->dport;
 tuple->dport = tmp;
}

static inline __attribute__((always_inline)) void
__ipv6_ct_tuple_reverse(struct ipv6_ct_tuple *tuple)
{
 ipv6_ct_tuple_swap_addrs(tuple);
 ipv6_ct_tuple_swap_ports(tuple);
}

static inline __attribute__((always_inline)) void
ipv6_ct_tuple_reverse(struct ipv6_ct_tuple *tuple)
{
 __ipv6_ct_tuple_reverse(tuple);
 ct_flip_tuple_dir6(tuple);
}

static inline __attribute__((always_inline)) union v6addr
ipv6_ct_reverse_tuple_saddr(const struct ipv6_ct_tuple *rtuple)
{
 return rtuple->daddr;
}

static inline __attribute__((always_inline)) union v6addr
ipv6_ct_reverse_tuple_daddr(const struct ipv6_ct_tuple *rtuple)
{
 return rtuple->saddr;
}

static inline __attribute__((always_inline)) int
ct_extract_ports6(struct __sk_buff *ctx, struct ipv6hdr *ip6, fraginfo_t fraginfo,
    int off, enum ct_dir dir, struct ipv6_ct_tuple *tuple)
{
 switch (tuple->nexthdr) {
 case 58: {
  __be16 identifier = 0;
  __u8 type;






  if (__builtin_expect(!!(ipfrag_is_fragment(fraginfo)), 0))
   return -134;

  if (skb_load_bytes(ctx, off, &type, 1) < 0)
   return -135;
  if ((type == 128 || type == 129) &&
      skb_load_bytes(ctx, off + __builtin_offsetof(struct icmp6hdr, icmp6_dataun.u_echo.identifier),

        &identifier, 2) < 0)
   return -135;

  tuple->sport = 0;
  tuple->dport = 0;

  switch (type) {
  case 1:
  case 2:
  case 3:
  case 4:
   tuple->flags |= 2;
   break;

  case 129:
   tuple->sport = identifier;
   break;

  case 128:
   tuple->dport = identifier;
   __attribute__((fallthrough));
  default:
   break;
  }
  break;
 }


 case IPPROTO_TCP:
 case IPPROTO_UDP:




  return ipv6_load_l4_ports(ctx, ip6, fraginfo, off,
       dir, &tuple->dport);
 default:

  if (__config_enable_extended_ip_protocols) {
   tuple->sport = 0;
   tuple->dport = 0;
   break;
  }

  return -137;
 }

 return 0;
}


static inline __attribute__((always_inline)) _Bool ct_is_reply6(const void *map, struct ipv6_ct_tuple *tuple) { __u8 flags = tuple->flags; _Bool is_reply = false; tuple->flags = 1; if (map_lookup_elem(map, tuple)) is_reply = true; tuple->flags = flags; return is_reply; }

static inline __attribute__((always_inline)) int
__ct_lookup6(const void *map, struct ipv6_ct_tuple *tuple, struct __sk_buff *ctx,
      fraginfo_t fraginfo, int l4_off, enum ct_dir dir, enum ct_scope scope,
      __u32 ct_entry_types, struct ct_state *ct_state, __u32 *monitor)
{
 _Bool is_tcp = tuple->nexthdr == IPPROTO_TCP;
 union tcp_flags tcp_flags = { .value = 0 };
 enum ct_action action;
 enum ct_status ret;


 if (__builtin_expect(!!(ipfrag_is_fragment(fraginfo)), 0))
  _update_metrics(ctx_full_len(ctx), ct_to_metrics_dir(dir), 9, 604, (__u8)__id_for_file("conntrack.h"));


 if (is_tcp && ipfrag_has_l4_header(fraginfo)) {
  if (l4_load_tcp_flags(ctx, l4_off, &tcp_flags) < 0)
   return -135;

  action = ct_tcp_select_action(tcp_flags);
 } else {
  action = ACTION_UNSPEC;
 }

 cilium_dbg3(ctx, DBG_CT_LOOKUP6_1, (__u32)tuple->saddr.p.p4, (__u32)tuple->daddr.p.p4,
      ((__builtin_constant_p(tuple->sport) ? ((__u16)( ((__u16)(tuple->sport) << (16 -(0 +1)*8) >> (16 -8) << (1*8)) | ((__u16)(tuple->sport) << (16 -(1 +1)*8) >> (16 -8) << (0*8)))) : __builtin_bswap16(tuple->sport)) << 16) | (__builtin_constant_p(tuple->dport) ? ((__u16)( ((__u16)(tuple->dport) << (16 -(0 +1)*8) >> (16 -8) << (1*8)) | ((__u16)(tuple->dport) << (16 -(1 +1)*8) >> (16 -8) << (0*8)))) : __builtin_bswap16(tuple->dport)));
 cilium_dbg3(ctx, DBG_CT_LOOKUP6_2, (tuple->nexthdr << 8) | tuple->flags,
      dir, scope);

 switch (scope) {
 case SCOPE_REVERSE:
 case SCOPE_BIDIR:

  ret = __ct_lookup(map, ctx, tuple, action, dir, ct_entry_types,
      ct_state, is_tcp, tcp_flags, monitor);
  if (ret != CT_NEW) {
   if (__builtin_expect(!!(tuple->flags & 2), 0))
    ret = CT_RELATED;
   else
    ret = CT_REPLY;
   goto out;
  }

  if (scope != SCOPE_BIDIR)
   goto out;


  ipv6_ct_tuple_reverse(tuple);
  __attribute__((fallthrough));
 case SCOPE_FORWARD:
  ret = __ct_lookup(map, ctx, tuple, action, dir, ct_entry_types,
      ct_state, is_tcp, tcp_flags, monitor);
 }

out:
 cilium_dbg(ctx, DBG_CT_VERDICT, ret,
     ct_state ? ct_state->rev_nat_index : 0);
 return ret;
}


static inline __attribute__((always_inline)) int
ct_lazy_lookup6(const void *map, struct ipv6_ct_tuple *tuple, struct __sk_buff *ctx,
  fraginfo_t fraginfo, int l4_off, enum ct_dir dir, enum ct_scope scope,
  __u32 ct_entry_types, struct ct_state *ct_state, __u32 *monitor)
{
 tuple->flags = ct_lookup_select_tuple_type(dir, scope);

 return __ct_lookup6(map, tuple, ctx, fraginfo, l4_off, dir,
       scope, ct_entry_types, ct_state, monitor);
}


static inline __attribute__((always_inline)) int ct_lookup6(const void *map,
          struct ipv6_ct_tuple *tuple,
          struct __sk_buff *ctx, struct ipv6hdr *ip6,
          int l4_off, enum ct_dir dir, enum ct_scope scope,
          struct ct_state *ct_state,
          __u32 *monitor)
{
 fraginfo_t fraginfo;
 int ret;

 fraginfo = ipv6_get_fraginfo(ctx, ip6);
 if (fraginfo < 0)
  return (int)fraginfo;

 tuple->flags = ct_lookup_select_tuple_type(dir, scope);

 ret = ct_extract_ports6(ctx, ip6, fraginfo, l4_off, dir, tuple);
 if (ret < 0)
  return ret;

 if (scope == SCOPE_FORWARD)
  __ipv6_ct_tuple_reverse(tuple);

 return __ct_lookup6(map, tuple, ctx, fraginfo, l4_off, dir,
       scope, CT_ENTRY_ANY, ct_state, monitor);
}

static inline __attribute__((always_inline)) int
ipv4_extract_tuple(struct __sk_buff *ctx, struct ipv4_ct_tuple *tuple)
{
 void *data, *data_end;
 struct iphdr *ip4;
 fraginfo_t fraginfo;

 if (!__revalidate_data_pull(ctx, &data, &data_end, (void **)&ip4, __config_eth_header_length, sizeof(**&ip4), false))
  return -134;

 fraginfo = ipfrag_encode_ipv4(ip4);

 tuple->nexthdr = ip4->protocol;

 if (__builtin_expect(!!(tuple->nexthdr != IPPROTO_TCP && tuple->nexthdr != IPPROTO_UDP), 0))




  return -137;

 tuple->daddr = ip4->daddr;
 tuple->saddr = ip4->saddr;

 return ipv4_load_l4_ports(ctx, ip4, fraginfo, __config_eth_header_length + ipv4_hdrlen(ip4),
      CT_EGRESS, &tuple->dport);
}

static inline __attribute__((always_inline)) void ct_flip_tuple_dir4(struct ipv4_ct_tuple *tuple)
{
 if (tuple->flags & 1)
  tuple->flags &= ~1;
 else
  tuple->flags |= 1;
}

static inline __attribute__((always_inline)) void
ipv4_ct_tuple_swap_addrs(struct ipv4_ct_tuple *tuple)
{
 __be32 tmp_addr = tuple->saddr;

 tuple->saddr = tuple->daddr;
 tuple->daddr = tmp_addr;
}

static inline __attribute__((always_inline)) void
ipv4_ct_tuple_swap_ports(struct ipv4_ct_tuple *tuple)
{
 __be16 tmp;






 tmp = tuple->sport;
 tuple->sport = tuple->dport;
 tuple->dport = tmp;
}

static inline __attribute__((always_inline)) void
__ipv4_ct_tuple_reverse(struct ipv4_ct_tuple *tuple)
{
 ipv4_ct_tuple_swap_addrs(tuple);
 ipv4_ct_tuple_swap_ports(tuple);
}

static inline __attribute__((always_inline)) void
ipv4_ct_tuple_reverse(struct ipv4_ct_tuple *tuple)
{
 __ipv4_ct_tuple_reverse(tuple);
 ct_flip_tuple_dir4(tuple);
}

static inline __attribute__((always_inline)) __be32
ipv4_ct_reverse_tuple_saddr(const struct ipv4_ct_tuple *rtuple)
{
 return rtuple->daddr;
}

static inline __attribute__((always_inline)) __be32
ipv4_ct_reverse_tuple_daddr(const struct ipv4_ct_tuple *rtuple)
{
 return rtuple->saddr;
}

static inline __attribute__((always_inline)) int
ct_extract_ports4(struct __sk_buff *ctx, struct iphdr *ip4, fraginfo_t fraginfo,
    int off, enum ct_dir dir, struct ipv4_ct_tuple *tuple)
{
 switch (tuple->nexthdr) {
 case IPPROTO_ICMP: {
  __be16 identifier = 0;
  __u8 type;






  if (__builtin_expect(!!(ipfrag_is_fragment(fraginfo)), 0))
   return -134;

  if (skb_load_bytes(ctx, off, &type, 1) < 0)
   return -135;
  if ((type == 8 || type == 0) &&
      skb_load_bytes(ctx, off + __builtin_offsetof(struct icmphdr, un.echo.id),
       &identifier, 2) < 0)
   return -135;

  tuple->sport = 0;
  tuple->dport = 0;

  switch (type) {
  case 3:
  case 11:
  case 12:
   tuple->flags |= 2;
   break;

  case 0:
   tuple->sport = identifier;
   break;
  case 8:
   tuple->dport = identifier;
   __attribute__((fallthrough));
  default:
   break;
  }
  break;
 }


 case IPPROTO_TCP:
 case IPPROTO_UDP:



  return ipv4_load_l4_ports(ctx, ip4, fraginfo, off,
       dir, &tuple->dport);
 default:

  if (__config_enable_extended_ip_protocols) {
   tuple->sport = 0;
   tuple->dport = 0;
   break;
  }

  return -137;
 }

 return 0;
}


static inline __attribute__((always_inline)) _Bool ct_is_reply4(const void *map, struct ipv4_ct_tuple *tuple) { __u8 flags = tuple->flags; _Bool is_reply = false; tuple->flags = 1; if (map_lookup_elem(map, tuple)) is_reply = true; tuple->flags = flags; return is_reply; }

static inline __attribute__((always_inline)) int
__ct_lookup4(const void *map, struct ipv4_ct_tuple *tuple, struct __sk_buff *ctx,
      fraginfo_t fraginfo, int l4_off, enum ct_dir dir, enum ct_scope scope,
      __u32 ct_entry_types, struct ct_state *ct_state, __u32 *monitor)
{
 _Bool is_tcp = tuple->nexthdr == IPPROTO_TCP;
 union tcp_flags tcp_flags = { .value = 0 };
 enum ct_action action;
 enum ct_status ret;


 if (__builtin_expect(!!(ipfrag_is_fragment(fraginfo)), 0))
  _update_metrics(ctx_full_len(ctx), ct_to_metrics_dir(dir), 9, 861, (__u8)__id_for_file("conntrack.h"));


 if (is_tcp && ipfrag_has_l4_header(fraginfo)) {
  if (l4_load_tcp_flags(ctx, l4_off, &tcp_flags) < 0)
   return -135;

  action = ct_tcp_select_action(tcp_flags);
 } else {
  action = ACTION_UNSPEC;
 }


 cilium_dbg3(ctx, DBG_CT_LOOKUP4_1, tuple->saddr, tuple->daddr,
      ((__builtin_constant_p(tuple->sport) ? ((__u16)( ((__u16)(tuple->sport) << (16 -(0 +1)*8) >> (16 -8) << (1*8)) | ((__u16)(tuple->sport) << (16 -(1 +1)*8) >> (16 -8) << (0*8)))) : __builtin_bswap16(tuple->sport)) << 16) | (__builtin_constant_p(tuple->dport) ? ((__u16)( ((__u16)(tuple->dport) << (16 -(0 +1)*8) >> (16 -8) << (1*8)) | ((__u16)(tuple->dport) << (16 -(1 +1)*8) >> (16 -8) << (0*8)))) : __builtin_bswap16(tuple->dport)));
 cilium_dbg3(ctx, DBG_CT_LOOKUP4_2, (tuple->nexthdr << 8) | tuple->flags,
      dir, scope);


 switch (scope) {
 case SCOPE_REVERSE:
 case SCOPE_BIDIR:

  ret = __ct_lookup(map, ctx, tuple, action, dir, ct_entry_types,
      ct_state, is_tcp, tcp_flags, monitor);
  if (ret != CT_NEW) {
   if (__builtin_expect(!!(tuple->flags & 2), 0))
    ret = CT_RELATED;
   else
    ret = CT_REPLY;
   goto out;
  }

  if (scope != SCOPE_BIDIR)
   goto out;


  ipv4_ct_tuple_reverse(tuple);
  __attribute__((fallthrough));
 case SCOPE_FORWARD:
  ret = __ct_lookup(map, ctx, tuple, action, dir, ct_entry_types,
      ct_state, is_tcp, tcp_flags, monitor);
 }

out:
 cilium_dbg(ctx, DBG_CT_VERDICT, ret,
     ct_state ? ct_state->rev_nat_index : 0);
 return ret;
}
# 933 "/var/lib/cilium/bpf/lib/conntrack.h"
static inline __attribute__((always_inline)) int
ct_lazy_lookup4(const void *map, struct ipv4_ct_tuple *tuple, struct __sk_buff *ctx,
  fraginfo_t fraginfo, int l4_off, enum ct_dir dir, enum ct_scope scope,
  __u32 ct_entry_types, struct ct_state *ct_state, __u32 *monitor)
{
 tuple->flags = ct_lookup_select_tuple_type(dir, scope);

 return __ct_lookup4(map, tuple, ctx, fraginfo, l4_off, dir,
       scope, ct_entry_types, ct_state, monitor);
}


static inline __attribute__((always_inline)) int ct_lookup4(const void *map,
          struct ipv4_ct_tuple *tuple,
          struct __sk_buff *ctx, struct iphdr *ip4,
          int off, enum ct_dir dir, enum ct_scope scope,
          struct ct_state *ct_state, __u32 *monitor)
{
 fraginfo_t fraginfo;
 int ret;

 fraginfo = ipfrag_encode_ipv4(ip4);

 tuple->flags = ct_lookup_select_tuple_type(dir, scope);

 ret = ct_extract_ports4(ctx, ip4, fraginfo, off, dir, tuple);
 if (ret < 0)
  return ret;

 if (scope == SCOPE_FORWARD)
  __ipv4_ct_tuple_reverse(tuple);

 return __ct_lookup4(map, tuple, ctx, fraginfo, off, dir,
       scope, CT_ENTRY_ANY, ct_state, monitor);
}

static inline __attribute__((always_inline)) void
ct_create_fill_entry(struct ct_entry *entry, const struct ct_state *state,
       enum ct_dir dir)
{
 entry->rev_nat_index = state->rev_nat_index;
 entry->src_sec_id = state->src_sec_id;

 if (dir == CT_SERVICE) {
  entry->backend_id = state->backend_id;
 } else if (dir == CT_INGRESS || dir == CT_EGRESS) {



  entry->node_port = state->node_port;
  entry->dsr_internal = state->dsr_internal;
  entry->from_tunnel = state->from_tunnel;



  entry->proxy_redirect = state->proxy_redirect;
  entry->from_l7lb = state->from_l7lb;
 }
}


static inline __attribute__((always_inline)) int ct_create6(const void *map_main, const void *map_related,
          struct ipv6_ct_tuple *tuple,
          struct __sk_buff *ctx, const enum ct_dir dir,
          const struct ct_state *ct_state, __s8 *ext_err)
{

 struct ct_entry entry = { };
 _Bool is_tcp = tuple->nexthdr == IPPROTO_TCP;
 union tcp_flags seen_flags = { .value = 0 };
 int err;

 if (ct_state)
  ct_create_fill_entry(&entry, ct_state, dir);

 seen_flags.value |= is_tcp ? TCP_FLAG_SYN : 0;
 ct_update_timeout(&entry, is_tcp, dir, seen_flags);

 cilium_dbg3(ctx, DBG_CT_CREATED6, entry.rev_nat_index,
      entry.src_sec_id, 0);

 if (map_related != ((void *)0)) {

  struct ipv6_ct_tuple icmp_tuple = {
   .nexthdr = 58,
   .sport = 0,
   .dport = 0,
   .flags = tuple->flags | 2,
  };

  ipv6_addr_copy(&icmp_tuple.daddr, &tuple->daddr);
  ipv6_addr_copy(&icmp_tuple.saddr, &tuple->saddr);

  err = map_update_elem(map_related, &icmp_tuple, &entry, 0);
  if (__builtin_expect(!!(err < 0), 0))
   goto err_ct_fill_up;
 }






 err = map_update_elem(map_main, tuple, &entry, 0);
 if (__builtin_expect(!!(err < 0), 0))
  goto err_ct_fill_up;

 return 0;

err_ct_fill_up:
 if (ext_err)
  *ext_err = (__s8)err;
 send_signal_ct_fill_up(ctx, SIGNAL_PROTO_V6);
 return -155;
}

static inline __attribute__((always_inline)) int ct_create4(const void *map_main,
          const void *map_related,
          struct ipv4_ct_tuple *tuple,
          struct __sk_buff *ctx, const enum ct_dir dir,
          const struct ct_state *ct_state,
          __s8 *ext_err)
{

 struct ct_entry entry = { };
 _Bool is_tcp = tuple->nexthdr == IPPROTO_TCP;
 union tcp_flags seen_flags = { .value = 0 };
 int err;

 if (ct_state)
  ct_create_fill_entry(&entry, ct_state, dir);

 seen_flags.value |= is_tcp ? TCP_FLAG_SYN : 0;
 ct_update_timeout(&entry, is_tcp, dir, seen_flags);

 cilium_dbg3(ctx, DBG_CT_CREATED4, entry.rev_nat_index,
      entry.src_sec_id, 0);

 if (map_related != ((void *)0)) {

  struct ipv4_ct_tuple icmp_tuple = {
   .daddr = tuple->daddr,
   .saddr = tuple->saddr,
   .nexthdr = IPPROTO_ICMP,
   .sport = 0,
   .dport = 0,
   .flags = tuple->flags | 2,
  };

  err = map_update_elem(map_related, &icmp_tuple, &entry, 0);
  if (__builtin_expect(!!(err < 0), 0))
   goto err_ct_fill_up;
 }
# 1096 "/var/lib/cilium/bpf/lib/conntrack.h"
 err = map_update_elem(map_main, tuple, &entry, 0);
 if (__builtin_expect(!!(err < 0), 0))
  goto err_ct_fill_up;

 return 0;

err_ct_fill_up:
 if (ext_err)
  *ext_err = (__s8)err;
 send_signal_ct_fill_up(ctx, SIGNAL_PROTO_V4);
 return -155;
}
# 1124 "/var/lib/cilium/bpf/lib/conntrack.h"
static inline __attribute__((always_inline)) _Bool
__ct_has_nodeport_egress_entry(const struct ct_entry *entry,
          __u16 *rev_nat_index, _Bool check_dsr)
{
 if (entry->node_port) {
  if (rev_nat_index)
   *rev_nat_index = entry->rev_nat_index;
  return true;
 }

 return check_dsr && entry->dsr_internal;
}
# 1146 "/var/lib/cilium/bpf/lib/conntrack.h"
static inline __attribute__((always_inline)) _Bool
ct_has_nodeport_egress_entry4(const void *map,
         struct ipv4_ct_tuple *ingress_tuple,
         __u16 *rev_nat_index, _Bool check_dsr)
{
 __u8 prev_flags = ingress_tuple->flags;
 struct ct_entry *entry;

 ingress_tuple->flags = 0;
 entry = map_lookup_elem(map, ingress_tuple);
 ingress_tuple->flags = prev_flags;

 if (!entry)
  return false;

 return __ct_has_nodeport_egress_entry(entry, rev_nat_index, check_dsr);
}

static inline __attribute__((always_inline)) _Bool
ct_has_dsr_egress_entry4(const void *map, struct ipv4_ct_tuple *ingress_tuple)
{
 __u8 prev_flags = ingress_tuple->flags;
 struct ct_entry *entry;

 ingress_tuple->flags = 0;
 entry = map_lookup_elem(map, ingress_tuple);
 ingress_tuple->flags = prev_flags;

 if (entry)
  return entry->dsr_internal;

 return 0;
}

static inline __attribute__((always_inline)) _Bool
ct_has_nodeport_egress_entry6(const void *map,
         struct ipv6_ct_tuple *ingress_tuple,
         __u16 *rev_nat_index, _Bool check_dsr)
{
 __u8 prev_flags = ingress_tuple->flags;
 struct ct_entry *entry;

 ingress_tuple->flags = 0;
 entry = map_lookup_elem(map, ingress_tuple);
 ingress_tuple->flags = prev_flags;

 if (!entry)
  return false;

 return __ct_has_nodeport_egress_entry(entry, rev_nat_index, check_dsr);
}

static inline __attribute__((always_inline)) _Bool
ct_has_dsr_egress_entry6(const void *map, struct ipv6_ct_tuple *ingress_tuple)
{
 __u8 prev_flags = ingress_tuple->flags;
 struct ct_entry *entry;

 ingress_tuple->flags = 0;
 entry = map_lookup_elem(map, ingress_tuple);
 ingress_tuple->flags = prev_flags;

 if (entry)
  return entry->dsr_internal;

 return 0;
}

static inline __attribute__((always_inline)) void
ct_update_svc_entry(const void *map, const void *tuple,
      __u32 backend_id, __u16 rev_nat_index)
{
 struct ct_entry *entry;

 entry = map_lookup_elem(map, tuple);
 if (!entry)
  return;

 entry->backend_id = backend_id;
 entry->rev_nat_index = rev_nat_index;
}

static inline __attribute__((always_inline)) void
ct_update_dsr(const void *map, const void *tuple, const _Bool dsr)
{
 struct ct_entry *entry;

 entry = map_lookup_elem(map, tuple);
 if (!entry)
  return;

 entry->dsr_internal = dsr;
}
# 7 "/var/lib/cilium/bpf/lib/proxy.h" 2
# 202 "/var/lib/cilium/bpf/lib/proxy.h"
static inline __attribute__((always_inline)) int
__ctx_redirect_to_proxy(struct __sk_buff *ctx, void *tuple __attribute__((__unused__)),
   __be16 proxy_port, _Bool from_host __attribute__((__unused__)),
   _Bool ipv4 __attribute__((__unused__)))
{
 int result __attribute__((__unused__)) = 0;






  ctx->mark = 0x0200 | proxy_port << 16;

 cilium_dbg_capture(ctx, DBG_CAPTURE_PROXY_PRE, proxy_port);
# 238 "/var/lib/cilium/bpf/lib/proxy.h"
 return result;
}


static inline __attribute__((always_inline)) int
ctx_redirect_to_proxy4(struct __sk_buff *ctx, void *tuple __attribute__((__unused__)),
         __be16 proxy_port, _Bool from_host __attribute__((__unused__)))
{
 return __ctx_redirect_to_proxy(ctx, tuple, proxy_port, from_host, true);
}



static inline __attribute__((always_inline)) int
ctx_redirect_to_proxy6(struct __sk_buff *ctx, void *tuple __attribute__((__unused__)),
         __be16 proxy_port, _Bool from_host __attribute__((__unused__)))
{
 return __ctx_redirect_to_proxy(ctx, tuple, proxy_port, from_host, false);
}
# 350 "/var/lib/cilium/bpf/lib/proxy.h"
static inline __attribute__((always_inline)) int
ctx_redirect_to_proxy_first(struct __sk_buff *ctx, __be16 proxy_port)
{
 int ret = 0;







 cilium_dbg_capture(ctx, DBG_CAPTURE_PROXY_POST, proxy_port);
 ctx->mark = 0x0200 | (proxy_port << 16);
 skb_change_type(ctx, 0);
 return ret;
}
# 375 "/var/lib/cilium/bpf/lib/proxy.h"
static inline __attribute__((always_inline)) int
ctx_redirect_to_proxy_host_egress(struct __sk_buff *ctx, __be16 proxy_port)
{
 union macaddr mac = {.addr={0x26,0xce,0x18,0xe5,0xc6,0x69}};

 ctx->mark = 0x0200 | proxy_port << 16;

 cilium_dbg_capture(ctx, DBG_CAPTURE_PROXY_PRE, proxy_port);

 if (eth_store_daddr(ctx, (__u8 *)&mac, 0) < 0)
  return -141;

 return ctx_redirect(ctx, 6, BPF_F_INGRESS);
}




static inline __attribute__((always_inline)) _Bool tc_index_from_ingress_proxy(struct __sk_buff *ctx)
{
 volatile __u32 tc_index = ctx->tc_index;





 return tc_index & 1;
}




static inline __attribute__((always_inline)) _Bool tc_index_from_egress_proxy(struct __sk_buff *ctx)
{
 volatile __u32 tc_index = ctx->tc_index;





 return tc_index & 2;
}
# 37 "/var/lib/cilium/bpf/bpf_host.c" 2
# 1 "/var/lib/cilium/bpf/lib/policy.h" 1
# 17 "/var/lib/cilium/bpf/lib/policy.h"
struct {
 int(*(type))[BPF_MAP_TYPE_LRU_PERCPU_HASH];
 typeof(struct policy_stats_key) *(key);
 typeof(struct policy_stats_value) *(value);
 int(*(pinning))[1];
 int(*(max_entries))[65536];
 int(*(map_flags))[BPF_F_NO_COMMON_LRU];
} cilium_policystats __attribute__((section(".maps"), used));

static inline __attribute__((always_inline)) void
__policy_account(__u32 remote_id, __u8 egress, __u8 proto, __be16 dport, __u8 lpm_prefix_length,
   __u64 bytes)
{
 struct policy_stats_value *value;
 struct policy_stats_key stats_key = {
  .endpoint_id = __config_host_ep_id,
  .pad1 = 0,
  .prefix_len = lpm_prefix_length,
  .sec_label = remote_id,
  .egress = egress,
  .pad = 0,
 };






 if (lpm_prefix_length <= 8) {
  if (lpm_prefix_length < 8) {

   proto = 0;
  }
  dport = 0;
 } else if (lpm_prefix_length < (8 + 16)) {
  dport &= (__builtin_constant_p((__u16)(0xffff << ((8 + 16) - lpm_prefix_length))) ? ((__u16)( ((__u16)((__u16)(0xffff << ((8 + 16) - lpm_prefix_length))) << (16 -(0 +1)*8) >> (16 -8) << (1*8)) | ((__u16)((__u16)(0xffff << ((8 + 16) - lpm_prefix_length))) << (16 -(1 +1)*8) >> (16 -8) << (0*8)))) : __builtin_bswap16((__u16)(0xffff << ((8 + 16) - lpm_prefix_length))));
 }
 stats_key.protocol = proto;
 stats_key.dport = dport;

 value = map_lookup_elem(&cilium_policystats, &stats_key);

 if (value) {
  __sync_fetch_and_add(&value->packets, 1);
  __sync_fetch_and_add(&value->bytes, bytes);
 } else {
  struct policy_stats_value newval = { 1, bytes };

  map_update_elem(&cilium_policystats, &stats_key, &newval, BPF_NOEXIST);
 }
}


struct {
 int(*(type))[BPF_MAP_TYPE_LPM_TRIE];
 typeof(struct policy_key) *(key);
 typeof(struct policy_entry) *(value);
 int(*(pinning))[1];
 int(*(max_entries))[16384];
 int(*(map_flags))[BPF_F_NO_PREALLOC];
} cilium_policy_v2 __attribute__((section(".maps"), used));

static inline __attribute__((always_inline)) int
__policy_check(struct policy_entry *policy, const struct policy_entry *policy2, __s8 *ext_err,
        __u16 *proxy_port)
{




 __u8 auth_type;

 if (__builtin_expect(!!(policy->deny), 0))
  return -181;
# 99 "/var/lib/cilium/bpf/lib/policy.h"
 *proxy_port = policy->proxy_port;

 auth_type = policy->auth_type;
 if (__builtin_expect(!!(policy2 && policy2->auth_type > auth_type && !policy->has_explicit_auth_type), 0)) {
# 111 "/var/lib/cilium/bpf/lib/policy.h"
  auth_type = policy2->auth_type;
 }

 if (__builtin_expect(!!(auth_type), 0)) {
  if (ext_err)
   *ext_err = (__s8)auth_type;
  return -189;
 }
 return 0;
}

static inline __attribute__((always_inline)) int
__policy_can_access(const void *map, struct __sk_buff *ctx, __u32 local_id,
      __u32 remote_id, __u16 ethertype __attribute__((__unused__)), __be16 dport,
      __u8 proto, int off __attribute__((__unused__)), int dir,
      _Bool is_untracked_fragment, __u8 *match_type, __s8 *ext_err,
      __u16 *proxy_port)
{
 struct policy_entry *policy;
 struct policy_entry *l4policy;
 struct policy_key key = {
  .lpm_key = { (8 * (sizeof(struct policy_key) - sizeof(struct bpf_lpm_trie_key))), {} },
  .sec_label = remote_id,
  .egress = !dir,
  .pad = 0,
  .protocol = proto,
  .dport = dport,
 };
 __u8 p_len;


 switch (ethertype) {
 case 0x0800:
  if (proto == IPPROTO_ICMP) {
   struct icmphdr icmphdr __attribute__((aligned(8)));

   if (skb_load_bytes(ctx, off, &icmphdr, sizeof(icmphdr)) < 0)
    return -134;


   if (icmphdr.type == 3 &&
       icmphdr.code == 4) {
    *proxy_port = 0;
    return 0;
   }



   key.dport = (__builtin_constant_p((__u16)icmphdr.type) ? ((__u16)( ((__u16)((__u16)icmphdr.type) << (16 -(0 +1)*8) >> (16 -8) << (1*8)) | ((__u16)((__u16)icmphdr.type) << (16 -(1 +1)*8) >> (16 -8) << (0*8)))) : __builtin_bswap16((__u16)icmphdr.type));

  }
  break;
 case 0x86DD:

  if (proto == 58) {
   __u8 icmp_type;

   if (skb_load_bytes(ctx, off, &icmp_type, sizeof(icmp_type)) < 0)
    return -134;

   key.dport = (__builtin_constant_p((__u16)icmp_type) ? ((__u16)( ((__u16)((__u16)icmp_type) << (16 -(0 +1)*8) >> (16 -8) << (1*8)) | ((__u16)((__u16)icmp_type) << (16 -(1 +1)*8) >> (16 -8) << (0*8)))) : __builtin_bswap16((__u16)icmp_type));
  }

  break;
 default:
  break;
 }
# 194 "/var/lib/cilium/bpf/lib/policy.h"
 policy = map_lookup_elem(map, &key);


 if (__builtin_expect(!!(policy && policy->deny), 1)) {
  l4policy = ((void *)0);
  goto check_policy;
 }


 key.sec_label = 0;
 l4policy = map_lookup_elem(map, &key);







 if (l4policy &&
     (l4policy->deny || !policy ||
      l4policy->proxy_port_priority > policy->proxy_port_priority ||
      (l4policy->proxy_port_priority == policy->proxy_port_priority &&
       l4policy->lpm_prefix_length > policy->lpm_prefix_length)))
  goto check_l4_policy;


 if (__builtin_expect(!!(policy), 1))
  goto check_policy;

 if (is_untracked_fragment)
  return -157;

 return -133;

check_policy:
 cilium_dbg3(ctx, DBG_L4_CREATE, remote_id, local_id, dport << 16 | proto);
 p_len = policy->lpm_prefix_length;

 __policy_account(remote_id, key.egress, proto, dport, p_len, ctx_full_len(ctx));

 *match_type =
  p_len > 8 ? POLICY_MATCH_L3_L4 :
  p_len > 0 ? POLICY_MATCH_L3_PROTO :
  POLICY_MATCH_L3_ONLY;
 return __policy_check(policy, l4policy, ext_err, proxy_port);

check_l4_policy:
 p_len = l4policy->lpm_prefix_length;

 __policy_account(0, key.egress, proto, dport, p_len, ctx_full_len(ctx));

 *match_type =
  p_len == 0 ? POLICY_MATCH_ALL :
  p_len <= 8 ? POLICY_MATCH_PROTO_ONLY :
  POLICY_MATCH_L4_ONLY;
 return __policy_check(l4policy, policy, ext_err, proxy_port);
}
# 272 "/var/lib/cilium/bpf/lib/policy.h"
static inline __attribute__((always_inline)) int
policy_can_ingress(struct __sk_buff *ctx, const void *map, __u32 src_id, __u32 dst_id,
     __u16 ethertype, __be16 dport, __u8 proto, int l4_off,
     _Bool is_untracked_fragment, __u8 *match_type, __u8 *audited,
     __s8 *ext_err, __u16 *proxy_port)
{
 int ret;

 ret = __policy_can_access(map, ctx, dst_id, src_id, ethertype, dport,
      proto, l4_off, CT_INGRESS, is_untracked_fragment,
      match_type, ext_err, proxy_port);
 if (ret >= 0)
  return ret;

 cilium_dbg(ctx, DBG_POLICY_DENIED, src_id, dst_id);

 *audited = 0;







 return ret;
}

static inline __attribute__((always_inline)) int policy_can_ingress6(struct __sk_buff *ctx, const void *map,
            const struct ipv6_ct_tuple *tuple,
            int l4_off, _Bool is_untracked_fragment,
            __u32 src_id, __u32 dst_id,
            __u8 *match_type, __u8 *audited,
            __s8 *ext_err, __u16 *proxy_port)
{
 return policy_can_ingress(ctx, map, src_id, dst_id, 0x86DD, tuple->dport,
     tuple->nexthdr, l4_off, is_untracked_fragment,
     match_type, audited, ext_err, proxy_port);
}

static inline __attribute__((always_inline)) int policy_can_ingress4(struct __sk_buff *ctx,
  const void *map,
            const struct ipv4_ct_tuple *tuple,
            int l4_off, _Bool is_untracked_fragment,
            __u32 src_id, __u32 dst_id,
            __u8 *match_type, __u8 *audited,
            __s8 *ext_err, __u16 *proxy_port)
{
 return policy_can_ingress(ctx, map, src_id, dst_id, 0x0800, tuple->dport,
     tuple->nexthdr, l4_off, is_untracked_fragment,
     match_type, audited, ext_err, proxy_port);
}
# 331 "/var/lib/cilium/bpf/lib/policy.h"
static inline __attribute__((always_inline)) int
policy_can_egress(struct __sk_buff *ctx, const void *map, __u32 src_id, __u32 dst_id,
    __u16 ethertype, __be16 dport, __u8 proto, int l4_off, __u8 *match_type,
    __u8 *audited, __s8 *ext_err, __u16 *proxy_port)
{
 int ret;





 ret = __policy_can_access(map, ctx, src_id, dst_id, ethertype, dport,
      proto, l4_off, CT_EGRESS, false, match_type,
      ext_err, proxy_port);
 if (ret >= 0)
  return ret;
 cilium_dbg(ctx, DBG_POLICY_DENIED, src_id, dst_id);
 *audited = 0;






 return ret;
}

static inline __attribute__((always_inline)) int policy_can_egress6(struct __sk_buff *ctx, const void *map,
           const struct ipv6_ct_tuple *tuple,
           int l4_off, __u32 src_id, __u32 dst_id,
           __u8 *match_type, __u8 *audited, __s8 *ext_err,
           __u16 *proxy_port)
{
 return policy_can_egress(ctx, map, src_id, dst_id, 0x86DD, tuple->dport,
     tuple->nexthdr, l4_off, match_type, audited,
     ext_err, proxy_port);
}

static inline __attribute__((always_inline)) int policy_can_egress4(struct __sk_buff *ctx, const void *map,
           const struct ipv4_ct_tuple *tuple,
           int l4_off, __u32 src_id, __u32 dst_id,
           __u8 *match_type, __u8 *audited, __s8 *ext_err,
           __u16 *proxy_port)
{
 return policy_can_egress(ctx, map, src_id, dst_id, 0x0800, tuple->dport,
     tuple->nexthdr, l4_off, match_type, audited,
     ext_err, proxy_port);
}
# 38 "/var/lib/cilium/bpf/bpf_host.c" 2
# 1 "/var/lib/cilium/bpf/lib/trace.h" 1
# 34 "/var/lib/cilium/bpf/lib/trace.h"
enum trace_reason {
 TRACE_REASON_POLICY = CT_NEW,
 TRACE_REASON_CT_ESTABLISHED = CT_ESTABLISHED,
 TRACE_REASON_CT_REPLY = CT_REPLY,
 TRACE_REASON_CT_RELATED = CT_RELATED,
 TRACE_REASON_RESERVED,
 TRACE_REASON_UNKNOWN,
 TRACE_REASON_SRV6_ENCAP,
 TRACE_REASON_SRV6_DECAP,
 TRACE_REASON_ENCRYPT_OVERLAY,



 TRACE_REASON_ENCRYPTED = 0x80,
} __attribute__((packed));


enum {
 TRACE_AGGREGATE_NONE = 0,
 TRACE_AGGREGATE_RX = 1,
 TRACE_AGGREGATE_ACTIVE_CT = 3,
};
# 74 "/var/lib/cilium/bpf/lib/trace.h"
static inline __attribute__((always_inline)) void
_update_trace_metrics(struct __sk_buff *ctx, enum trace_point obs_point,
        enum trace_reason reason, __u16 line, __u8 file)
{
 __u8 encrypted;

 switch (obs_point) {
 case TRACE_TO_LXC:
  _update_metrics(ctx_full_len(ctx), METRIC_INGRESS,
    0, line, file);
  break;
 case TRACE_TO_HOST:
 case TRACE_TO_STACK:
 case TRACE_TO_OVERLAY:
 case TRACE_TO_NETWORK:
  _update_metrics(ctx_full_len(ctx), METRIC_EGRESS,
    0, line, file);
  break;
 case TRACE_FROM_HOST:
 case TRACE_FROM_STACK:
 case TRACE_FROM_OVERLAY:
 case TRACE_FROM_NETWORK:
  encrypted = reason & TRACE_REASON_ENCRYPTED;
  if (!encrypted)
   _update_metrics(ctx_full_len(ctx), METRIC_INGRESS,
     3, line, file);
  else
   _update_metrics(ctx_full_len(ctx), METRIC_INGRESS,
     4, line, file);
  break;
# 113 "/var/lib/cilium/bpf/lib/trace.h"
 case TRACE_FROM_LXC:
 case TRACE_FROM_PROXY:
 case TRACE_TO_PROXY:
  break;
# 131 "/var/lib/cilium/bpf/lib/trace.h"
 case TRACE_TO_CRYPTO:
 case TRACE_FROM_CRYPTO:
  __builtin_trap();
  break;

 case TRACE_POINT_UNKNOWN:
  __builtin_trap();
  break;
 }
}

struct trace_ctx {
 enum trace_reason reason;
 __u32 monitor;


};

struct trace_notify {
 __u8 type; __u8 subtype; __u16 source; __u32 hash; __u32 len_orig; __u16 len_cap; __u16 version;
 __u32 src_label;
 __u32 dst_label;
 __u16 dst_id;
 __u8 reason;
 __u8 flags;


 __u32 ifindex;
 union {
  struct {
   __be32 orig_ip4;
   __u32 orig_pad1;
   __u32 orig_pad2;
   __u32 orig_pad3;
  };
  union v6addr orig_ip6;
 };
};


static inline __attribute__((always_inline)) _Bool
emit_trace_notify(enum trace_point obs_point, __u32 monitor)
{
 if (3 >= TRACE_AGGREGATE_RX) {
  switch (obs_point) {
  case TRACE_FROM_LXC:
  case TRACE_FROM_PROXY:
  case TRACE_FROM_HOST:
  case TRACE_FROM_STACK:
  case TRACE_FROM_OVERLAY:
  case TRACE_FROM_CRYPTO:
  case TRACE_FROM_NETWORK:
   return false;
  default:
   break;
  }
 }
# 196 "/var/lib/cilium/bpf/lib/trace.h"
 if (3 >= TRACE_AGGREGATE_ACTIVE_CT && !monitor)
  return false;

 return true;
}

static inline __attribute__((always_inline)) void
_send_trace_notify(struct __sk_buff *ctx, enum trace_point obs_point,
     __u32 src, __u32 dst, __u16 dst_id, __u32 ifindex,
     enum trace_reason reason, __u32 monitor,
     __be16 proto, __u16 line, __u8 file)
{
 __u64 ctx_len = ctx_full_len(ctx);
 __u64 cap_len;
 struct ratelimit_key rkey = {
  .usage = 2,
 };
 struct ratelimit_settings settings = {
  .topup_interval_ns = (1000ULL * 1000ULL * 1000UL),
 };
 struct trace_notify msg __attribute__((aligned(8)));
 cls_flags_t flags = ((cls_flags_t)0);

 _update_trace_metrics(ctx, obs_point, reason, line, file);

 if (!emit_trace_notify(obs_point, monitor))
  return;

 if (0 > 0) {
  settings.bucket_size = 0;
  settings.tokens_per_topup = 0;
  if (!ratelimit_check_and_take(&rkey, &settings))
   return;
 }

 flags = ctx_classify(ctx, proto, obs_point);
 cap_len = compute_capture_len(ctx, monitor, flags, obs_point);

 msg = (typeof(msg)) {
  .type = (CILIUM_NOTIFY_TRACE), .subtype = (obs_point), .source = __config_host_ep_id, .hash = ctx->hash,
  .len_orig = ((__u32)ctx_len), .len_cap = ((__u16)cap_len), .version = (1),
  .src_label = src,
  .dst_label = dst,
  .dst_id = dst_id,
  .reason = reason,
  .flags = flags,
  .ifindex = ifindex,
 };
 memset(&msg.orig_ip6, 0, sizeof(union v6addr));

 skb_event_output(ctx, &cilium_events,
    (cap_len << 32) | BPF_F_CURRENT_CPU,
    &msg, sizeof(msg));
}

static inline __attribute__((always_inline)) void
_send_trace_notify4(struct __sk_buff *ctx, enum trace_point obs_point,
      __u32 src, __u32 dst, __be32 orig_addr, __u16 dst_id,
      __u32 ifindex, enum trace_reason reason, __u32 monitor,
      __u16 line, __u8 file)
{
 __u64 ctx_len = ctx_full_len(ctx);
 __u64 cap_len;
 struct ratelimit_key rkey = {
  .usage = 2,
 };
 struct ratelimit_settings settings = {
  .topup_interval_ns = (1000ULL * 1000ULL * 1000UL),
 };
 struct trace_notify msg __attribute__((aligned(8)));
 cls_flags_t flags = ((cls_flags_t)0);

 _update_trace_metrics(ctx, obs_point, reason, line, file);

 if (!emit_trace_notify(obs_point, monitor))
  return;

 if (0 > 0) {
  settings.bucket_size = 0;
  settings.tokens_per_topup = 0;
  if (!ratelimit_check_and_take(&rkey, &settings))
   return;
 }

 flags = ctx_classify(ctx, (__builtin_constant_p(0x0800) ? ((__u16)( ((__u16)(0x0800) << (16 -(0 +1)*8) >> (16 -8) << (1*8)) | ((__u16)(0x0800) << (16 -(1 +1)*8) >> (16 -8) << (0*8)))) : __builtin_bswap16(0x0800)), obs_point);
 cap_len = compute_capture_len(ctx, monitor, flags, obs_point);

 msg = (typeof(msg)) {
  .type = (CILIUM_NOTIFY_TRACE), .subtype = (obs_point), .source = __config_host_ep_id, .hash = ctx->hash,
  .len_orig = ((__u32)ctx_len), .len_cap = ((__u16)cap_len), .version = (1),
  .src_label = src,
  .dst_label = dst,
  .dst_id = dst_id,
  .reason = reason,
  .ifindex = ifindex,
  .flags = flags,
  .orig_ip4 = orig_addr,
 };

 skb_event_output(ctx, &cilium_events,
    (cap_len << 32) | BPF_F_CURRENT_CPU,
    &msg, sizeof(msg));
}

static inline __attribute__((always_inline)) void
_send_trace_notify6(struct __sk_buff *ctx, enum trace_point obs_point,
      __u32 src, __u32 dst, const union v6addr *orig_addr,
      __u16 dst_id, __u32 ifindex, enum trace_reason reason,
      __u32 monitor, __u16 line, __u8 file)
{
 __u64 ctx_len = ctx_full_len(ctx);
 __u64 cap_len;
 struct ratelimit_key rkey = {
  .usage = 2,
 };
 struct ratelimit_settings settings = {
  .topup_interval_ns = (1000ULL * 1000ULL * 1000UL),
 };
 struct trace_notify msg __attribute__((aligned(8)));
 cls_flags_t flags = ((cls_flags_t)0);

 _update_trace_metrics(ctx, obs_point, reason, line, file);

 if (!emit_trace_notify(obs_point, monitor))
  return;

 if (0 > 0) {
  settings.bucket_size = 0;
  settings.tokens_per_topup = 0;
  if (!ratelimit_check_and_take(&rkey, &settings))
   return;
 }

 flags = ctx_classify(ctx, (__builtin_constant_p(0x86DD) ? ((__u16)( ((__u16)(0x86DD) << (16 -(0 +1)*8) >> (16 -8) << (1*8)) | ((__u16)(0x86DD) << (16 -(1 +1)*8) >> (16 -8) << (0*8)))) : __builtin_bswap16(0x86DD)), obs_point);
 cap_len = compute_capture_len(ctx, monitor, flags, obs_point);

 msg = (typeof(msg)) {
  .type = (CILIUM_NOTIFY_TRACE), .subtype = (obs_point), .source = __config_host_ep_id, .hash = ctx->hash,
  .len_orig = ((__u32)ctx_len), .len_cap = ((__u16)cap_len), .version = (1),
  .src_label = src,
  .dst_label = dst,
  .dst_id = dst_id,
  .reason = reason,
  .ifindex = ifindex,
  .flags = flags,
 };

 ipv6_addr_copy(&msg.orig_ip6, orig_addr);

 skb_event_output(ctx, &cilium_events,
    (cap_len << 32) | BPF_F_CURRENT_CPU,
    &msg, sizeof(msg));
}
# 39 "/var/lib/cilium/bpf/bpf_host.c" 2
# 1 "/var/lib/cilium/bpf/lib/identity.h" 1







static inline __attribute__((always_inline)) _Bool identity_in_range(__u32 identity, __u32 range_start, __u32 range_end)
{
 return range_start <= identity && identity <= range_end;
}




static inline __attribute__((always_inline)) _Bool identity_is_host(__u32 identity)
{
 return identity == 1;
}

static inline __attribute__((always_inline)) _Bool identity_is_remote_node(__u32 identity)
{
# 42 "/var/lib/cilium/bpf/lib/identity.h"
 return identity == 6 ||
  identity == 7 ||
  (identity & 0xFF000000) == 0x02000000;
}

static inline __attribute__((always_inline)) _Bool identity_is_node(__u32 identity)
{
 return identity_is_host(identity) || identity_is_remote_node(identity);
}
# 72 "/var/lib/cilium/bpf/lib/identity.h"
static inline __attribute__((always_inline)) _Bool identity_is_reserved(__u32 identity)
{

  return identity < 3 || identity_is_remote_node(identity) ||
   identity == 9 || identity == 10;



}
# 90 "/var/lib/cilium/bpf/lib/identity.h"
static inline __attribute__((always_inline)) _Bool identity_is_world_ipv4(__u32 identity)
{

  return identity == 2 || identity == 9;



}
# 107 "/var/lib/cilium/bpf/lib/identity.h"
static inline __attribute__((always_inline)) _Bool identity_is_world_ipv6(__u32 identity)
{

  return identity == 2 || identity == 10;



}





static inline __attribute__((always_inline)) _Bool identity_is_cidr_range(__u32 identity)
{
 return identity_in_range(identity, 16777217, 33554431);
}
# 145 "/var/lib/cilium/bpf/lib/identity.h"
static inline __attribute__((always_inline)) _Bool identity_is_cluster(__u32 identity)
{

 if (identity == 2 || identity == 9 || identity == 10)
  return false;





 if (identity_is_cidr_range(identity))
  return false;

 return true;
}


static inline __attribute__((always_inline)) __u32 inherit_identity_from_host(struct __sk_buff *ctx, __u32 *identity)
{
 __u32 magic = ctx->mark & 0x0F00;





 if (magic == 0x0A00) {
  *identity = get_identity(ctx);
  ctx->tc_index |= 1;




 } else if (magic == 0x0B00) {
  *identity = get_identity(ctx);
  ctx->tc_index |= 2;
 } else if (magic == 0x0F00) {
  *identity = get_identity(ctx);
 } else if (magic == 0x0C00) {
  *identity = 1;

 } else if (magic == 0x0E00) {
  *identity = ctx_load_meta(ctx, CB_CT_STATE);

 } else {

  __u16 proto = ctx_get_protocol(ctx);

  if (proto == (__builtin_constant_p(0x0800) ? ((__u16)( ((__u16)(0x0800) << (16 -(0 +1)*8) >> (16 -8) << (1*8)) | ((__u16)(0x0800) << (16 -(1 +1)*8) >> (16 -8) << (0*8)))) : __builtin_bswap16(0x0800)))
   *identity = 9;
  else if (proto == (__builtin_constant_p(0x86DD) ? ((__u16)( ((__u16)(0x86DD) << (16 -(0 +1)*8) >> (16 -8) << (1*8)) | ((__u16)(0x86DD) << (16 -(1 +1)*8) >> (16 -8) << (0*8)))) : __builtin_bswap16(0x86DD)))
   *identity = 10;
  else
   *identity = 2;



 }


 ctx->mark = 0;

 cilium_dbg(ctx, DBG_INHERIT_IDENTITY, *identity, 0);

 return magic;
}






static inline __attribute__((always_inline)) _Bool identity_is_local(__u32 identity)
{
 return (identity & 0xFF000000) != 0;
}
# 40 "/var/lib/cilium/bpf/bpf_host.c" 2

# 1 "/var/lib/cilium/bpf/lib/local_delivery.h" 1







# 1 "/var/lib/cilium/bpf/lib/l3.h" 1
# 10 "/var/lib/cilium/bpf/lib/l3.h"
# 1 "/var/lib/cilium/bpf/lib/icmp6.h" 1
# 11 "/var/lib/cilium/bpf/lib/l3.h" 2


static inline __attribute__((always_inline)) int ipv6_l3(struct __sk_buff *ctx, int l3_off,
       const __u8 *smac, const __u8 *dmac,
       __u8 __attribute__((__unused__)) direction)
{
 int ret;

 ret = ipv6_dec_hoplimit(ctx, l3_off);
 if ((__builtin_expect(!!((ret < 0) || (ret == 2)), 0))) {

  if (ret == -196)
   return icmp6_send_time_exceeded(ctx, l3_off, direction);

  return ret;
 }

 if (smac && eth_store_saddr(ctx, smac, 0) < 0)
  return -141;
 if (dmac && eth_store_daddr(ctx, dmac, 0) < 0)
  return -141;

 return 0;
}


static inline __attribute__((always_inline)) int ipv4_l3(struct __sk_buff *ctx, int l3_off,
       const __u8 *smac, const __u8 *dmac,
       struct iphdr *ip4)
{
 int ret;

 ret = ipv4_dec_ttl(ctx, l3_off, ip4);

 if ((__builtin_expect(!!((ret < 0) || (ret == 2)), 0)))
  return ret;

 if (smac && eth_store_saddr(ctx, smac, 0) < 0)
  return -141;
 if (dmac && eth_store_daddr(ctx, dmac, 0) < 0)
  return -141;

 return 0;
}
# 9 "/var/lib/cilium/bpf/lib/local_delivery.h" 2
# 1 "/var/lib/cilium/bpf/lib/token_bucket.h" 1
# 55 "/var/lib/cilium/bpf/lib/token_bucket.h"
static inline __attribute__((always_inline)) int
accept(struct __sk_buff *ctx __attribute__((__unused__)), __u32 ep_id __attribute__((__unused__)))
{
 return 0;
}
# 10 "/var/lib/cilium/bpf/lib/local_delivery.h" 2


struct {
 int(*(type))[BPF_MAP_TYPE_PROG_ARRAY];
 typeof(__u32) *(key);
 typeof(__u32) *(value);
 int(*(pinning))[1];
 int(*(max_entries))[65535];
} cilium_egresscall_policy __attribute__((section(".maps"), used));

static inline __attribute__((always_inline)) __attribute__((warn_unused_result)) int
tail_call_egress_policy(struct __sk_buff *ctx, __u16 endpoint_id)
{
 tail_call_dynamic(ctx, &cilium_egresscall_policy, endpoint_id);

 return -203;
}


struct {
 int(*(type))[BPF_MAP_TYPE_PROG_ARRAY];
 typeof(__u32) *(key);
 typeof(__u32) *(value);
 int(*(pinning))[1];
 int(*(max_entries))[65535];
} cilium_call_policy __attribute__((section(".maps"), used));

static inline __attribute__((always_inline)) __attribute__((warn_unused_result)) int
tail_call_policy(struct __sk_buff *ctx, __u16 endpoint_id)
{
 if (__builtin_constant_p(endpoint_id)) {
  { if (!__builtin_constant_p(endpoint_id)) __builtin_trap(); asm volatile("r1 = %[ctx]\n\t" "r2 = " "cilium_call_policy" " ll\n\t" "r3 = %[slot_idx]\n\t" "call 12\n\t" :: [ctx]"r"(ctx), [slot_idx]"i"(endpoint_id) : "r0", "r1", "r2", "r3", "r4", "r5"); };
 } else {
  tail_call_dynamic(ctx, &cilium_call_policy, endpoint_id);
 }






 return -203;
}

static inline __attribute__((always_inline)) int redirect_ep(struct __sk_buff *ctx __attribute__((__unused__)),
           int ifindex __attribute__((__unused__)),
           _Bool needs_backlog __attribute__((__unused__)),
           _Bool from_tunnel)
{
# 75 "/var/lib/cilium/bpf/lib/local_delivery.h"
 if (needs_backlog || !0 ||
     ctx_get_ingress_ifindex(ctx) == 0) {
  return (int)ctx_redirect(ctx, ifindex, 0);
 }




 if (from_tunnel)
  skb_change_type(ctx, 0);

 return ctx_redirect_peer(ctx, ifindex, 0);
}
# 96 "/var/lib/cilium/bpf/lib/local_delivery.h"
static inline __attribute__((always_inline)) void
local_delivery_fill_meta(struct __sk_buff *ctx, __u32 seclabel,
    _Bool delivery_redirect, _Bool from_host,
    _Bool from_tunnel, __u32 cluster_id)
{
 ctx_store_meta(ctx, CB_SRC_LABEL, seclabel);
 ctx_store_meta(ctx, CB_1, delivery_redirect ? 1 : 0);
 ctx_store_meta(ctx, CB_3, from_host ? 1 : 0);
 ctx_store_meta(ctx, CB_CT_STATE, from_tunnel ? 1 : 0);
 ctx_store_meta(ctx, CB_2, cluster_id);
}

static inline __attribute__((always_inline)) int
local_delivery(struct __sk_buff *ctx, __u32 seclabel,
        __u32 magic __attribute__((__unused__)),
        const struct endpoint_info *ep __attribute__((__unused__)),
        __u8 direction __attribute__((__unused__)),
        _Bool from_host __attribute__((__unused__)),
        _Bool from_tunnel __attribute__((__unused__)), __u32 cluster_id __attribute__((__unused__)))
{






 _update_metrics(ctx_full_len(ctx), direction, 0, 122, (__u8)__id_for_file("local_delivery.h"));


 if (direction == METRIC_INGRESS && !from_host) {



  int ret;

  ret = accept(ctx, ep->lxc_id);
  if ((__builtin_expect(!!((ret < 0) || (ret == 2)), 0)))
   return ret;
 }
# 143 "/var/lib/cilium/bpf/lib/local_delivery.h"
 set_identity_mark(ctx, seclabel, magic);
# 153 "/var/lib/cilium/bpf/lib/local_delivery.h"
 if (from_tunnel) {
  skb_change_type(ctx, 0);
  return 0;
 }


 return redirect_ep(ctx, ep->ifindex, from_host, from_tunnel);






}







static inline __attribute__((always_inline)) int ipv6_local_delivery(struct __sk_buff *ctx, int l3_off,
            __u32 seclabel, __u32 magic,
            const struct endpoint_info *ep,
            __u8 direction, _Bool from_host,
            _Bool from_tunnel)
{
 mac_t router_mac = ep->node_mac;
 mac_t lxc_mac = ep->mac;
 int ret;

 cilium_dbg(ctx, DBG_LOCAL_DELIVERY, ep->lxc_id, seclabel);

 ret = ipv6_l3(ctx, l3_off, (__u8 *)&router_mac, (__u8 *)&lxc_mac, direction);
 if (ret != 0)
  return ret;

 return local_delivery(ctx, seclabel, magic, ep, direction, from_host,
         from_tunnel, 0);
}







static inline __attribute__((always_inline)) int ipv4_local_delivery(struct __sk_buff *ctx, int l3_off,
            __u32 seclabel, __u32 magic,
            struct iphdr *ip4,
            const struct endpoint_info *ep,
            __u8 direction, _Bool from_host,
            _Bool from_tunnel, __u32 cluster_id)
{
 mac_t router_mac = ep->node_mac;
 mac_t lxc_mac = ep->mac;
 int ret;

 cilium_dbg(ctx, DBG_LOCAL_DELIVERY, ep->lxc_id, seclabel);

 ret = ipv4_l3(ctx, l3_off, (__u8 *)&router_mac, (__u8 *)&lxc_mac, ip4);
 if (ret != 0)
  return ret;

 return local_delivery(ctx, seclabel, magic, ep, direction, from_host,
         from_tunnel, cluster_id);
}
# 42 "/var/lib/cilium/bpf/bpf_host.c" 2

# 1 "/var/lib/cilium/bpf/lib/encap.h" 1







# 1 "/var/lib/cilium/bpf/lib/hash.h" 1






# 1 "/var/lib/cilium/bpf/lib/jhash.h" 1
# 13 "/var/lib/cilium/bpf/lib/jhash.h"
static inline __attribute__((always_inline)) __u32 rol32(__u32 word, __u32 shift)
{
 return (word << shift) | (word >> ((-shift) & 31));
}
# 39 "/var/lib/cilium/bpf/lib/jhash.h"
static inline __attribute__((always_inline)) __u32 jhash(const void *key, __u32 length,
       __u32 initval)
{
 const unsigned char *k = key;
 __u32 a, b, c;

 if (!__builtin_constant_p(length))
  __builtin_trap();

 a = b = c = 0xdeadbeef + length + initval;

 while (length > 12) {
  a += *(__u32 *)(k);
  b += *(__u32 *)(k + 4);
  c += *(__u32 *)(k + 8);

  { a -= c; a ^= rol32(c, 4); c += b; b -= a; b ^= rol32(a, 6); a += c; c -= b; c ^= rol32(b, 8); b += a; a -= c; a ^= rol32(c, 16); c += b; b -= a; b ^= rol32(a, 19); a += c; c -= b; c ^= rol32(b, 4); b += a; };
  length -= 12;
  k += 12;
 }

 switch (length) {
 case 12: c += (__u32)k[11] << 24; __attribute__((fallthrough));
 case 11: c += (__u32)k[10] << 16; __attribute__((fallthrough));
 case 10: c += (__u32)k[9] << 8; __attribute__((fallthrough));
 case 9: c += (__u32)k[8]; __attribute__((fallthrough));
 case 8: b += (__u32)k[7] << 24; __attribute__((fallthrough));
 case 7: b += (__u32)k[6] << 16; __attribute__((fallthrough));
 case 6: b += (__u32)k[5] << 8; __attribute__((fallthrough));
 case 5: b += (__u32)k[4]; __attribute__((fallthrough));
 case 4: a += (__u32)k[3] << 24; __attribute__((fallthrough));
 case 3: a += (__u32)k[2] << 16; __attribute__((fallthrough));
 case 2: a += (__u32)k[1] << 8; __attribute__((fallthrough));
 case 1: a += (__u32)k[0];

  { c ^= b; c -= rol32(b, 14); a ^= c; a -= rol32(c, 11); b ^= a; b -= rol32(a, 25); c ^= b; c -= rol32(b, 16); a ^= c; a -= rol32(c, 4); b ^= a; b -= rol32(a, 14); c ^= b; c -= rol32(b, 24); };
  break;
 case 0:
  break;
 }

 return c;
}

static inline __attribute__((always_inline)) __u32 __jhash_nwords(__u32 a, __u32 b, __u32 c,
         __u32 initval)
{
 a += initval;
 b += initval;
 c += initval;
 { c ^= b; c -= rol32(b, 14); a ^= c; a -= rol32(c, 11); b ^= a; b -= rol32(a, 25); c ^= b; c -= rol32(b, 16); a ^= c; a -= rol32(c, 4); b ^= a; b -= rol32(a, 14); c ^= b; c -= rol32(b, 24); };
 return c;
}

static inline __attribute__((always_inline)) __u32 jhash_3words(__u32 a, __u32 b, __u32 c,
       __u32 initval)
{
 return __jhash_nwords(a, b, c, initval + 0xdeadbeef + (3 << 2));
}

static inline __attribute__((always_inline)) __u32 jhash_2words(__u32 a, __u32 b, __u32 initval)
{
 return __jhash_nwords(a, b, 0, initval + 0xdeadbeef + (2 << 2));
}

static inline __attribute__((always_inline)) __u32 jhash_1word(__u32 a, __u32 initval)
{
 return __jhash_nwords(a, 0, 0, initval + 0xdeadbeef + (1 << 2));
}
# 8 "/var/lib/cilium/bpf/lib/hash.h" 2




static inline __attribute__((always_inline)) __u32
__hash_from_tuple_v4(const struct ipv4_ct_tuple *tuple, __be16 sport, __be16 dport)
{
 return jhash_3words(tuple->saddr, ((__u32)dport << 16) | sport,
       tuple->nexthdr, 1910299206);
}

static inline __attribute__((always_inline)) __u32 hash_from_tuple_v4(const struct ipv4_ct_tuple *tuple)
{
 return __hash_from_tuple_v4(tuple, tuple->sport, tuple->dport);
}

static inline __attribute__((always_inline)) __u32
__hash_from_tuple_v6(const struct ipv6_ct_tuple *tuple, __be16 sport, __be16 dport)
{
 __u32 a, b, c;

 a = tuple->saddr.p.p1;
 b = tuple->saddr.p.p2;
 c = tuple->saddr.p.p3;
 { a -= c; a ^= rol32(c, 4); c += b; b -= a; b ^= rol32(a, 6); a += c; c -= b; c ^= rol32(b, 8); b += a; a -= c; a ^= rol32(c, 16); c += b; b -= a; b ^= rol32(a, 19); a += c; c -= b; c ^= rol32(b, 4); b += a; };
 a += tuple->saddr.p.p4;
 b += ((__u32)dport << 16) | sport;
 c += tuple->nexthdr;
 { a -= c; a ^= rol32(c, 4); c += b; b -= a; b ^= rol32(a, 6); a += c; c -= b; c ^= rol32(b, 8); b += a; a -= c; a ^= rol32(c, 16); c += b; b -= a; b ^= rol32(a, 19); a += c; c -= b; c ^= rol32(b, 4); b += a; };
 a += 2454738568;
 { c ^= b; c -= rol32(b, 14); a ^= c; a -= rol32(c, 11); b ^= a; b -= rol32(a, 25); c ^= b; c -= rol32(b, 16); a ^= c; a -= rol32(c, 4); b ^= a; b -= rol32(a, 14); c ^= b; c -= rol32(b, 24); };
 return c;
}

static inline __attribute__((always_inline)) __u32 hash_from_tuple_v6(const struct ipv6_ct_tuple *tuple)
{
 return __hash_from_tuple_v6(tuple, tuple->sport, tuple->dport);
}
# 9 "/var/lib/cilium/bpf/lib/encap.h" 2
# 44 "/var/lib/cilium/bpf/bpf_host.c" 2
# 1 "/var/lib/cilium/bpf/lib/nat.h" 1
# 19 "/var/lib/cilium/bpf/lib/nat.h"
# 1 "/var/lib/cilium/bpf/lib/conntrack_map.h" 1
# 10 "/var/lib/cilium/bpf/lib/conntrack_map.h"
struct {
 int(*(type))[BPF_MAP_TYPE_LRU_HASH];
 typeof(struct ipv6_ct_tuple) *(key);
 typeof(struct ct_entry) *(value);
 int(*(pinning))[1];
 int(*(max_entries))[131072];
 int(*(map_flags))[0];
} cilium_ct6_global __attribute__((section(".maps"), used));

struct {
 int(*(type))[BPF_MAP_TYPE_LRU_HASH];
 typeof(struct ipv6_ct_tuple) *(key);
 typeof(struct ct_entry) *(value);
 int(*(pinning))[1];
 int(*(max_entries))[65536];
 int(*(map_flags))[0];
} cilium_ct_any6_global __attribute__((section(".maps"), used));
# 72 "/var/lib/cilium/bpf/lib/conntrack_map.h"
static inline __attribute__((always_inline)) void *
get_ct_map6(const struct ipv6_ct_tuple *tuple)
{
 if (tuple->nexthdr == IPPROTO_TCP)
  return &cilium_ct6_global;

 return &cilium_ct_any6_global;
}

static inline __attribute__((always_inline)) void *
get_cluster_ct_map6(const struct ipv6_ct_tuple *tuple, __u32 cluster_id __attribute__((__unused__)))
{
# 93 "/var/lib/cilium/bpf/lib/conntrack_map.h"
 return get_ct_map6(tuple);
}

static inline __attribute__((always_inline)) void *
get_cluster_ct_any_map6(__u32 cluster_id __attribute__((__unused__)))
{




 return &cilium_ct_any6_global;
}



struct {
 int(*(type))[BPF_MAP_TYPE_LRU_HASH];
 typeof(struct ipv4_ct_tuple) *(key);
 typeof(struct ct_entry) *(value);
 int(*(pinning))[1];
 int(*(max_entries))[131072];
 int(*(map_flags))[0];
} cilium_ct4_global __attribute__((section(".maps"), used));

struct {
 int(*(type))[BPF_MAP_TYPE_LRU_HASH];
 typeof(struct ipv4_ct_tuple) *(key);
 typeof(struct ct_entry) *(value);
 int(*(pinning))[1];
 int(*(max_entries))[65536];
 int(*(map_flags))[0];
} cilium_ct_any4_global __attribute__((section(".maps"), used));
# 179 "/var/lib/cilium/bpf/lib/conntrack_map.h"
static inline __attribute__((always_inline)) void *
get_ct_map4(const struct ipv4_ct_tuple *tuple)
{
 if (tuple->nexthdr == IPPROTO_TCP)
  return &cilium_ct4_global;

 return &cilium_ct_any4_global;
}

static inline __attribute__((always_inline)) void *
get_cluster_ct_map4(const struct ipv4_ct_tuple *tuple, __u32 cluster_id __attribute__((__unused__)))
{
# 200 "/var/lib/cilium/bpf/lib/conntrack_map.h"
 return get_ct_map4(tuple);
}

static inline __attribute__((always_inline)) void *
get_cluster_ct_any_map4(__u32 cluster_id __attribute__((__unused__)))
{




 return &cilium_ct_any4_global;
}
# 20 "/var/lib/cilium/bpf/lib/nat.h" 2
# 1 "/var/lib/cilium/bpf/lib/egress_gateway.h" 1





# 1 "/var/lib/cilium/bpf/lib/fib.h" 1
# 10 "/var/lib/cilium/bpf/lib/fib.h"
# 1 "/var/lib/cilium/bpf/lib/neigh.h" 1
# 49 "/var/lib/cilium/bpf/lib/neigh.h"
static inline __attribute__((always_inline)) union macaddr *
neigh_lookup_ip6(const union v6addr *addr __attribute__((__unused__)))
{
 return ((void *)0);
}
# 93 "/var/lib/cilium/bpf/lib/neigh.h"
static inline __attribute__((always_inline)) union macaddr *
neigh_lookup_ip4(const __be32 *addr __attribute__((__unused__)))
{
 return ((void *)0);
}
# 11 "/var/lib/cilium/bpf/lib/fib.h" 2


static inline __attribute__((always_inline)) int
add_l2_hdr(struct __sk_buff *ctx __attribute__((__unused__)))
{
 __u16 proto = ctx_get_protocol(ctx);

 if (ctx_change_head(ctx, 14, 0))
  return -134;
 if (eth_store_proto(ctx, proto, 0) < 0)
  return -141;

 return 0;
}

static inline __attribute__((always_inline)) int
maybe_add_l2_hdr(struct __sk_buff *ctx __attribute__((__unused__)),
   __u32 ifindex __attribute__((__unused__)),
   _Bool *l2_hdr_required __attribute__((__unused__)))
{
 if (false) {



  *l2_hdr_required = false;
 } else if (__config_eth_header_length == 0) {



  return add_l2_hdr(ctx);
 }
 return 0;
}

static inline __attribute__((always_inline)) _Bool fib_ok(int ret)
{
 return __builtin_expect(!!(ret == 7 || ret == 7), 1);
}
# 77 "/var/lib/cilium/bpf/lib/fib.h"
static inline __attribute__((always_inline)) int
fib_do_redirect(struct __sk_buff *ctx, const _Bool needs_l2_check,
  const struct bpf_fib_lookup_padded *fib_params,
  _Bool allow_neigh_map, int fib_result, __u32 oif, __s8 *ext_err)
{

 if (needs_l2_check) {
  _Bool l2_hdr_required = true;
  int ret;

  ret = maybe_add_l2_hdr(ctx, oif, &l2_hdr_required);
  if (ret != 0)
   return ret;
  if (!l2_hdr_required)
   goto out_send;
 }


 switch (fib_result) {
 case BPF_FIB_LKUP_RET_SUCCESS:
  if (eth_store_daddr(ctx, fib_params->l.dmac, 0) < 0)
   return -141;
  if (eth_store_saddr(ctx, fib_params->l.smac, 0) < 0)
   return -141;
  break;
 case BPF_FIB_LKUP_RET_NO_NEIGH:




  if (neigh_resolver_available()) {
   if (fib_params) {
    struct bpf_redir_neigh nh_params;

    nh_params.nh_family = fib_params->l.family;
    __bpf_memcpy_builtin(&nh_params.ipv6_nh,
           &fib_params->l.ipv6_dst,
           sizeof(nh_params.ipv6_nh));

    return (int)redirect_neigh(oif, &nh_params,
          sizeof(nh_params), 0);
   }

   return (int)redirect_neigh(oif, ((void *)0), 0, 0);
  } else {
   union macaddr smac = ({ union macaddr __mac = {.addr = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0}}; switch (oif) { case 3: {union macaddr __tmp = {.addr = {0xca,0x69,0xa,0xdf,0xa0,0x47}}; __mac=__tmp;} break; } __mac; });
   union macaddr *dmac = ((void *)0);

   if (allow_neigh_map) {




    dmac = fib_params->l.family == 2 ?
     neigh_lookup_ip4(&fib_params->l.ipv4_dst) :
     neigh_lookup_ip6((void *)&fib_params->l.ipv6_dst);
   }

   if (!dmac) {
    *ext_err = 100;
    return -169;
   }
   if (eth_store_daddr_aligned(ctx, dmac->addr, 0) < 0)
    return -141;
   if (eth_store_saddr_aligned(ctx, smac.addr, 0) < 0)
    return -141;
  }
 };
out_send:
 return (int)ctx_redirect(ctx, oif, 0);
}

static inline __attribute__((always_inline)) int
fib_redirect(struct __sk_buff *ctx, const _Bool needs_l2_check,
      struct bpf_fib_lookup_padded *fib_params __attribute__((__unused__)),
      _Bool use_neigh_map, __s8 *ext_err __attribute__((__unused__)), int *oif)
{
 if (!0 || !neigh_resolver_available()) {
  int ret;

  ret = (int)fib_lookup(ctx, &fib_params->l, sizeof(fib_params->l), 0);
  switch (ret) {
  case BPF_FIB_LKUP_RET_SUCCESS:
  case BPF_FIB_LKUP_RET_NO_NEIGH:
   break;
  default:
   *ext_err = (__s8)ret;
   return -169;
  }

  *oif = fib_params->l.ifindex;

  return fib_do_redirect(ctx, needs_l2_check, fib_params, use_neigh_map,
           ret, *oif, ext_err);
 }





 return fib_do_redirect(ctx, needs_l2_check, ((void *)0), use_neigh_map,
          BPF_FIB_LKUP_RET_NO_NEIGH, *oif, ext_err);
}
# 188 "/var/lib/cilium/bpf/lib/fib.h"
static inline __attribute__((always_inline)) int
fib_lookup_v6(struct __sk_buff *ctx, struct bpf_fib_lookup_padded *fib_params,
       const struct in6_addr *ipv6_src, const struct in6_addr *ipv6_dst,
       int flags)
{
 fib_params->l.family = 10;
 fib_params->l.ifindex = ctx_get_ifindex(ctx);

 ipv6_addr_copy((union v6addr *)&fib_params->l.ipv6_src,
         (union v6addr *)ipv6_src);
 ipv6_addr_copy((union v6addr *)&fib_params->l.ipv6_dst,
         (union v6addr *)ipv6_dst);

 return (int)fib_lookup(ctx, &fib_params->l, sizeof(fib_params->l), flags);
};

static inline __attribute__((always_inline)) int
fib_redirect_v6(struct __sk_buff *ctx, int l3_off,
  struct ipv6hdr *ip6 __attribute__((__unused__)), const _Bool needs_l2_check,
  _Bool allow_neigh_map, __s8 *ext_err __attribute__((__unused__)), int *oif)
{
 struct bpf_fib_lookup_padded fib_params __attribute__((__unused__)) = {0};
 int ret;

 if (!0 || !neigh_resolver_available()) {
  int fib_result;

  fib_result = fib_lookup_v6(ctx, &fib_params, &ip6->saddr, &ip6->daddr, 0);
  switch (fib_result) {
  case BPF_FIB_LKUP_RET_SUCCESS:
  case BPF_FIB_LKUP_RET_NO_NEIGH:
   break;
  default:
   *ext_err = (__s8)fib_result;
   return -169;
  }

  *oif = fib_params.l.ifindex;

  ret = ipv6_l3(ctx, l3_off, ((void *)0), ((void *)0), METRIC_EGRESS);
  if (__builtin_expect(!!(ret != 0), 0))
   return ret;

  return fib_do_redirect(ctx, needs_l2_check, &fib_params, allow_neigh_map,
           fib_result, *oif, ext_err);
 }

 ret = ipv6_l3(ctx, l3_off, ((void *)0), ((void *)0), METRIC_EGRESS);
 if (__builtin_expect(!!(ret != 0), 0))
  return ret;





 return fib_do_redirect(ctx, needs_l2_check, ((void *)0), allow_neigh_map,
          BPF_FIB_LKUP_RET_NO_NEIGH, *oif, ext_err);
}
# 255 "/var/lib/cilium/bpf/lib/fib.h"
static inline __attribute__((always_inline)) int
fib_lookup_v4(struct __sk_buff *ctx, struct bpf_fib_lookup_padded *fib_params,
       __be32 ipv4_src, __be32 ipv4_dst, int flags) {
 fib_params->l.family = 2;
 fib_params->l.ifindex = ctx_get_ifindex(ctx);
 fib_params->l.ipv4_src = ipv4_src;
 fib_params->l.ipv4_dst = ipv4_dst;

 return (int)fib_lookup(ctx, &fib_params->l, sizeof(fib_params->l), flags);
}

static inline __attribute__((always_inline)) int
fib_redirect_v4(struct __sk_buff *ctx, int l3_off,
  struct iphdr *ip4 __attribute__((__unused__)), const _Bool needs_l2_check,
  _Bool allow_neigh_map, __s8 *ext_err __attribute__((__unused__)), int *oif)
{
 struct bpf_fib_lookup_padded fib_params __attribute__((__unused__)) = {0};
 int ret;

 if (!0 || !neigh_resolver_available()) {
  int fib_result;

  fib_result = fib_lookup_v4(ctx, &fib_params, ip4->saddr, ip4->daddr, 0);
  switch (fib_result) {
  case BPF_FIB_LKUP_RET_SUCCESS:
  case BPF_FIB_LKUP_RET_NO_NEIGH:
   break;
  default:
   *ext_err = (__s8)fib_result;
   return -169;
  }

  *oif = fib_params.l.ifindex;

  ret = ipv4_l3(ctx, l3_off, ((void *)0), ((void *)0), ip4);
  if (__builtin_expect(!!(ret != 0), 0))
   return ret;

  return fib_do_redirect(ctx, needs_l2_check, &fib_params, allow_neigh_map,
           fib_result, *oif, ext_err);
 }

 ret = ipv4_l3(ctx, l3_off, ((void *)0), ((void *)0), ip4);
 if (__builtin_expect(!!(ret != 0), 0))
  return ret;





 return fib_do_redirect(ctx, needs_l2_check, ((void *)0), allow_neigh_map,
          BPF_FIB_LKUP_RET_NO_NEIGH, *oif, ext_err);
}
# 7 "/var/lib/cilium/bpf/lib/egress_gateway.h" 2
# 21 "/var/lib/cilium/bpf/lib/nat.h" 2

# 1 "/var/lib/cilium/bpf/lib/icmp6.h" 1
# 23 "/var/lib/cilium/bpf/lib/nat.h" 2
# 1 "/var/lib/cilium/bpf/lib/nat_46x64.h" 1
# 15 "/var/lib/cilium/bpf/lib/nat_46x64.h"
static inline __attribute__((always_inline)) __attribute__((__unused__)) _Bool is_v4_in_v6(const union v6addr *daddr)
{

 union v6addr dprobe = {
  .addr[10] = 0xff,
  .addr[11] = 0xff,
 };
 union v6addr dmasked = {
  .d.d1 = daddr->d.d1,
 };

 dmasked.p.p3 = daddr->p.p3;
 return ipv6_addr_equals(&dprobe, &dmasked);
}

static inline __attribute__((always_inline)) __attribute__((__unused__)) _Bool is_v4_in_v6_rfc6052(const union v6addr *daddr)
{
 union v6addr dprobe = {
  .addr[0] = 0,
  .addr[1] = 0,
  .addr[2] = 0,
  .addr[3] = 0,
 };
 union v6addr dmasked = {
  .d.d1 = daddr->d.d1,
 };

 dmasked.p.p3 = daddr->p.p3;
 return ipv6_addr_equals(&dprobe, &dmasked);
}

static inline __attribute__((always_inline)) __attribute__((__unused__))
void build_v4_in_v6(union v6addr *daddr, __be32 v4)
{
 memset(daddr, 0, sizeof(*daddr));
 daddr->addr[10] = 0xff;
 daddr->addr[11] = 0xff;
 daddr->p.p4 = v4;
}

static inline __attribute__((always_inline)) __attribute__((__unused__))
void build_v4_in_v6_rfc6052(union v6addr *daddr, __be32 v4)
{
 memset(daddr, 0, sizeof(*daddr));
 daddr->addr[0] = 0;
 daddr->addr[1] = 0;
 daddr->addr[2] = 0;
 daddr->addr[3] = 0;
 daddr->p.p4 = v4;
}

static inline __attribute__((always_inline)) __attribute__((__unused__))
void build_v4_from_v6(const union v6addr *v6, __be32 *daddr)
{
 *daddr = v6->p.p4;
}

static inline __attribute__((always_inline)) int get_csum_offset(__u8 protocol)
{
 int csum_off;

 switch (protocol) {
 case IPPROTO_TCP:
  csum_off = (__builtin_offsetof(struct tcphdr, check));
  break;
 case IPPROTO_UDP:
  csum_off = (__builtin_offsetof(struct udphdr, check));
  break;






 case IPPROTO_ICMP:
  csum_off = (__builtin_offsetof(struct icmphdr, checksum));
  break;
 case 58:
  csum_off = (__builtin_offsetof(struct icmp6hdr, icmp6_cksum));
  break;
 default:
  return -142;
 }

 return csum_off;
}

static inline __attribute__((always_inline)) int icmp4_to_icmp6(struct __sk_buff *ctx, int nh_off)
{
 struct icmphdr icmp4 __attribute__((aligned(8)));
 struct icmp6hdr icmp6 __attribute__((aligned(8))) = {};

 if (skb_load_bytes(ctx, nh_off, &icmp4, sizeof(icmp4)) < 0)
  return -134;
 icmp6.icmp6_cksum = icmp4.checksum;
 switch (icmp4.type) {
 case 8:
  icmp6.icmp6_type = 128;
  icmp6.icmp6_dataun.u_echo.identifier = icmp4.un.echo.id;
  icmp6.icmp6_dataun.u_echo.sequence = icmp4.un.echo.sequence;
  break;
 case 0:
  icmp6.icmp6_type = 129;
  icmp6.icmp6_dataun.u_echo.identifier = icmp4.un.echo.id;
  icmp6.icmp6_dataun.u_echo.sequence = icmp4.un.echo.sequence;
  break;
 case 3:
  icmp6.icmp6_type = 1;
  switch (icmp4.code) {
  case 0:
  case 1:
   icmp6.icmp6_code = 0;
   break;
  case 2:
   icmp6.icmp6_type = 4;
   icmp6.icmp6_code = 1;
   icmp6.icmp6_dataun.un_data32[0] = 6;
   break;
  case 3:
   icmp6.icmp6_code = 4;
   break;
  case 4:
   icmp6.icmp6_type = 2;
   icmp6.icmp6_code = 0;

   if (icmp4.un.frag.mtu)
    icmp6.icmp6_dataun.un_data32[0] = (__builtin_constant_p((__builtin_constant_p(icmp4.un.frag.mtu) ? ((__u16)( ((__u16)(icmp4.un.frag.mtu) << (16 -(0 +1)*8) >> (16 -8) << (1*8)) | ((__u16)(icmp4.un.frag.mtu) << (16 -(1 +1)*8) >> (16 -8) << (0*8)))) : __builtin_bswap16(icmp4.un.frag.mtu))) ? ((__u32)( ((__u32)((__builtin_constant_p(icmp4.un.frag.mtu) ? ((__u16)( ((__u16)(icmp4.un.frag.mtu) << (16 -(0 +1)*8) >> (16 -8) << (1*8)) | ((__u16)(icmp4.un.frag.mtu) << (16 -(1 +1)*8) >> (16 -8) << (0*8)))) : __builtin_bswap16(icmp4.un.frag.mtu))) << (32 -(0 +1)*8) >> (32 -8) << (3*8)) | ((__u32)((__builtin_constant_p(icmp4.un.frag.mtu) ? ((__u16)( ((__u16)(icmp4.un.frag.mtu) << (16 -(0 +1)*8) >> (16 -8) << (1*8)) | ((__u16)(icmp4.un.frag.mtu) << (16 -(1 +1)*8) >> (16 -8) << (0*8)))) : __builtin_bswap16(icmp4.un.frag.mtu))) << (32 -(1 +1)*8) >> (32 -8) << (2*8)) | ((__u32)((__builtin_constant_p(icmp4.un.frag.mtu) ? ((__u16)( ((__u16)(icmp4.un.frag.mtu) << (16 -(0 +1)*8) >> (16 -8) << (1*8)) | ((__u16)(icmp4.un.frag.mtu) << (16 -(1 +1)*8) >> (16 -8) << (0*8)))) : __builtin_bswap16(icmp4.un.frag.mtu))) << (32 -(2 +1)*8) >> (32 -8) << (1*8)) | ((__u32)((__builtin_constant_p(icmp4.un.frag.mtu) ? ((__u16)( ((__u16)(icmp4.un.frag.mtu) << (16 -(0 +1)*8) >> (16 -8) << (1*8)) | ((__u16)(icmp4.un.frag.mtu) << (16 -(1 +1)*8) >> (16 -8) << (0*8)))) : __builtin_bswap16(icmp4.un.frag.mtu))) << (32 -(3 +1)*8) >> (32 -8) << (0*8)))) : __builtin_bswap32((__builtin_constant_p(icmp4.un.frag.mtu) ? ((__u16)( ((__u16)(icmp4.un.frag.mtu) << (16 -(0 +1)*8) >> (16 -8) << (1*8)) | ((__u16)(icmp4.un.frag.mtu) << (16 -(1 +1)*8) >> (16 -8) << (0*8)))) : __builtin_bswap16(icmp4.un.frag.mtu))));
   else
    icmp6.icmp6_dataun.un_data32[0] = (__builtin_constant_p(1500) ? ((__u32)( ((__u32)(1500) << (32 -(0 +1)*8) >> (32 -8) << (3*8)) | ((__u32)(1500) << (32 -(1 +1)*8) >> (32 -8) << (2*8)) | ((__u32)(1500) << (32 -(2 +1)*8) >> (32 -8) << (1*8)) | ((__u32)(1500) << (32 -(3 +1)*8) >> (32 -8) << (0*8)))) : __builtin_bswap32(1500));
   break;
  case 5:
   icmp6.icmp6_code = 0;
   break;
  case 6:
  case 7:
  case 8:
  case 11:
  case 12:
   icmp6.icmp6_code = 0;
   break;
  case 9:
  case 10:
  case 13:
   icmp6.icmp6_code = 1;
   break;
  default:
   return -143;
  }
  break;
 case 11:
  icmp6.icmp6_type = 3;
  break;
 case 12:
  icmp6.icmp6_type = 4;

  icmp6.icmp6_dataun.un_data32[0] = 6;
  break;
 default:
  return -144;
 }
 if (skb_store_bytes(ctx, nh_off, &icmp6, sizeof(icmp6), 0) < 0)
  return -141;
 icmp4.checksum = 0;
 icmp6.icmp6_cksum = 0;
 return csum_diff(&icmp4, sizeof(icmp4), &icmp6, sizeof(icmp6), 0);
}

static inline __attribute__((always_inline)) int icmp6_to_icmp4(struct __sk_buff *ctx, int nh_off)
{
 struct icmphdr icmp4 __attribute__((aligned(8))) = {};
 struct icmp6hdr icmp6 __attribute__((aligned(8)));
 __u32 mtu;

 if (skb_load_bytes(ctx, nh_off, &icmp6, sizeof(icmp6)) < 0)
  return -134;
 icmp4.checksum = icmp6.icmp6_cksum;
 switch (icmp6.icmp6_type) {
 case 128:
  icmp4.type = 8;
  icmp4.un.echo.id = icmp6.icmp6_dataun.u_echo.identifier;
  icmp4.un.echo.sequence = icmp6.icmp6_dataun.u_echo.sequence;
  break;
 case 129:
  icmp4.type = 0;
  icmp4.un.echo.id = icmp6.icmp6_dataun.u_echo.identifier;
  icmp4.un.echo.sequence = icmp6.icmp6_dataun.u_echo.sequence;
  break;
 case 1:
  icmp4.type = 3;
  switch (icmp6.icmp6_code) {
  case 0:
  case 2:
  case 3:
   icmp4.code = 1;
   break;
  case 1:
   icmp4.code = 10;
   break;
  case 4:
   icmp4.code = 3;
   break;
  default:
   return -145;
  }
  break;
 case 2:
  icmp4.type = 3;
  icmp4.code = 4;

  if (icmp6.icmp6_dataun.un_data32[0]) {
   mtu = (__builtin_constant_p(icmp6.icmp6_dataun.un_data32[0]) ? ((__u32)( ((__u32)(icmp6.icmp6_dataun.un_data32[0]) << (32 -(0 +1)*8) >> (32 -8) << (3*8)) | ((__u32)(icmp6.icmp6_dataun.un_data32[0]) << (32 -(1 +1)*8) >> (32 -8) << (2*8)) | ((__u32)(icmp6.icmp6_dataun.un_data32[0]) << (32 -(2 +1)*8) >> (32 -8) << (1*8)) | ((__u32)(icmp6.icmp6_dataun.un_data32[0]) << (32 -(3 +1)*8) >> (32 -8) << (0*8)))) : __builtin_bswap32(icmp6.icmp6_dataun.un_data32[0]));
   icmp4.un.frag.mtu = (__builtin_constant_p((__u16)mtu) ? ((__u16)( ((__u16)((__u16)mtu) << (16 -(0 +1)*8) >> (16 -8) << (1*8)) | ((__u16)((__u16)mtu) << (16 -(1 +1)*8) >> (16 -8) << (0*8)))) : __builtin_bswap16((__u16)mtu));
  } else {
   icmp4.un.frag.mtu = (__builtin_constant_p(1500) ? ((__u16)( ((__u16)(1500) << (16 -(0 +1)*8) >> (16 -8) << (1*8)) | ((__u16)(1500) << (16 -(1 +1)*8) >> (16 -8) << (0*8)))) : __builtin_bswap16(1500));
  }
  break;
 case 3:
  icmp4.type = 11;
  icmp4.code = icmp6.icmp6_code;
  break;
 case 4:
  switch (icmp6.icmp6_code) {
  case 0:
   icmp4.type = 12;
   icmp4.code = 0;
   break;
  case 1:
   icmp4.type = 3;
   icmp4.code = 2;
   break;
  default:
   return -145;
  }
  break;
 default:
  return -146;
 }
 if (skb_store_bytes(ctx, nh_off, &icmp4, sizeof(icmp4), 0) < 0)
  return -141;
 icmp4.checksum = 0;
 icmp6.icmp6_cksum = 0;
 return csum_diff(&icmp6, sizeof(icmp6), &icmp4, sizeof(icmp4), 0);
}

static inline __attribute__((always_inline)) int ipv4_to_ipv6(struct __sk_buff *ctx, int nh_off,
     const union v6addr *src6,
     const union v6addr *dst6)
{
 __be16 protocol = (__builtin_constant_p(0x86DD) ? ((__u16)( ((__u16)(0x86DD) << (16 -(0 +1)*8) >> (16 -8) << (1*8)) | ((__u16)(0x86DD) << (16 -(1 +1)*8) >> (16 -8) << (0*8)))) : __builtin_bswap16(0x86DD));
 __u64 csum_flags = (1ULL << 4);
 struct ipv6hdr v6 = {};
 struct iphdr v4;
 int csum_off;
 __be32 csum;
 __be16 v4hdr_len;

 if (skb_load_bytes(ctx, nh_off, &v4, sizeof(v4)) < 0)
  return -134;
 if (ipv4_hdrlen(&v4) != sizeof(v4))
  return -156;
 v6.version = 0x6;
 v6.saddr.in6_u.u6_addr32[0] = src6->p.p1;
 v6.saddr.in6_u.u6_addr32[1] = src6->p.p2;
 v6.saddr.in6_u.u6_addr32[2] = src6->p.p3;
 v6.saddr.in6_u.u6_addr32[3] = src6->p.p4;
 v6.daddr.in6_u.u6_addr32[0] = dst6->p.p1;
 v6.daddr.in6_u.u6_addr32[1] = dst6->p.p2;
 v6.daddr.in6_u.u6_addr32[2] = dst6->p.p3;
 v6.daddr.in6_u.u6_addr32[3] = dst6->p.p4;
 if (v4.protocol == IPPROTO_ICMP)
  v6.nexthdr = 58;
 else
  v6.nexthdr = v4.protocol;
 v6.hop_limit = v4.ttl;
 v4hdr_len = (__be16)(v4.ihl << 2);
 v6.payload_len = (__builtin_constant_p((__builtin_constant_p(v4.tot_len) ? ((__u16)( ((__u16)(v4.tot_len) << (16 -(0 +1)*8) >> (16 -8) << (1*8)) | ((__u16)(v4.tot_len) << (16 -(1 +1)*8) >> (16 -8) << (0*8)))) : __builtin_bswap16(v4.tot_len)) - v4hdr_len) ? ((__u16)( ((__u16)((__builtin_constant_p(v4.tot_len) ? ((__u16)( ((__u16)(v4.tot_len) << (16 -(0 +1)*8) >> (16 -8) << (1*8)) | ((__u16)(v4.tot_len) << (16 -(1 +1)*8) >> (16 -8) << (0*8)))) : __builtin_bswap16(v4.tot_len)) - v4hdr_len) << (16 -(0 +1)*8) >> (16 -8) << (1*8)) | ((__u16)((__builtin_constant_p(v4.tot_len) ? ((__u16)( ((__u16)(v4.tot_len) << (16 -(0 +1)*8) >> (16 -8) << (1*8)) | ((__u16)(v4.tot_len) << (16 -(1 +1)*8) >> (16 -8) << (0*8)))) : __builtin_bswap16(v4.tot_len)) - v4hdr_len) << (16 -(1 +1)*8) >> (16 -8) << (0*8)))) : __builtin_bswap16((__builtin_constant_p(v4.tot_len) ? ((__u16)( ((__u16)(v4.tot_len) << (16 -(0 +1)*8) >> (16 -8) << (1*8)) | ((__u16)(v4.tot_len) << (16 -(1 +1)*8) >> (16 -8) << (0*8)))) : __builtin_bswap16(v4.tot_len)) - v4hdr_len));
 if (skb_change_proto(ctx, (__builtin_constant_p(0x86DD) ? ((__u16)( ((__u16)(0x86DD) << (16 -(0 +1)*8) >> (16 -8) << (1*8)) | ((__u16)(0x86DD) << (16 -(1 +1)*8) >> (16 -8) << (0*8)))) : __builtin_bswap16(0x86DD)), 0) < 0)
  return -141;
 if (skb_store_bytes(ctx, nh_off, &v6, sizeof(v6), 0) < 0 ||
     skb_store_bytes(ctx, nh_off - 2, &protocol, 2, 0) < 0)
  return -141;
 if (v4.protocol == IPPROTO_ICMP) {
  csum = icmp4_to_icmp6(ctx, nh_off + sizeof(v6));
  csum = ipv6_pseudohdr_checksum(&v6, 58,
            (__builtin_constant_p(v6.payload_len) ? ((__u16)( ((__u16)(v6.payload_len) << (16 -(0 +1)*8) >> (16 -8) << (1*8)) | ((__u16)(v6.payload_len) << (16 -(1 +1)*8) >> (16 -8) << (0*8)))) : __builtin_bswap16(v6.payload_len)), csum);
 } else {
  csum = 0;
  csum = csum_diff(&v4.saddr, 4, &v6.saddr, 16, csum);
  csum = csum_diff(&v4.daddr, 4, &v6.daddr, 16, csum);
  if (v4.protocol == IPPROTO_UDP)
   csum_flags |= BPF_F_MARK_MANGLED_0;
 }
 csum_off = get_csum_offset(v6.nexthdr);
 if (csum_off < 0)
  return csum_off;
 csum_off += sizeof(struct ipv6hdr);
 if (l4_csum_replace(ctx, nh_off + csum_off, 0, csum, (__u32)csum_flags) < 0)
  return -154;
 return 0;
}

static inline __attribute__((always_inline)) int ipv6_to_ipv4(struct __sk_buff *ctx,
     __be32 src4, __be32 dst4)
{
 __be16 protocol = (__builtin_constant_p(0x0800) ? ((__u16)( ((__u16)(0x0800) << (16 -(0 +1)*8) >> (16 -8) << (1*8)) | ((__u16)(0x0800) << (16 -(1 +1)*8) >> (16 -8) << (0*8)))) : __builtin_bswap16(0x0800));
 __u64 csum_flags = (1ULL << 4);
 int csum_off, nh_off = __config_eth_header_length;
 struct ipv6hdr v6;
 struct iphdr v4 = {};
 __be32 csum = 0;

 if (skb_load_bytes(ctx, nh_off, &v6, sizeof(v6)) < 0)
  return -134;

 if (ipv6_hdrlen(ctx, &v6.nexthdr) != sizeof(v6))
  return -156;
 v4.ihl = 0x5;
 v4.version = 0x4;
 v4.saddr = src4;
 v4.daddr = dst4;
 if (v6.nexthdr == 58)
  v4.protocol = IPPROTO_ICMP;
 else
  v4.protocol = v6.nexthdr;
 v4.ttl = v6.hop_limit;
 v4.tot_len = (__builtin_constant_p((__builtin_constant_p(v6.payload_len) ? ((__u16)( ((__u16)(v6.payload_len) << (16 -(0 +1)*8) >> (16 -8) << (1*8)) | ((__u16)(v6.payload_len) << (16 -(1 +1)*8) >> (16 -8) << (0*8)))) : __builtin_bswap16(v6.payload_len)) + sizeof(v4)) ? ((__u16)( ((__u16)((__builtin_constant_p(v6.payload_len) ? ((__u16)( ((__u16)(v6.payload_len) << (16 -(0 +1)*8) >> (16 -8) << (1*8)) | ((__u16)(v6.payload_len) << (16 -(1 +1)*8) >> (16 -8) << (0*8)))) : __builtin_bswap16(v6.payload_len)) + sizeof(v4)) << (16 -(0 +1)*8) >> (16 -8) << (1*8)) | ((__u16)((__builtin_constant_p(v6.payload_len) ? ((__u16)( ((__u16)(v6.payload_len) << (16 -(0 +1)*8) >> (16 -8) << (1*8)) | ((__u16)(v6.payload_len) << (16 -(1 +1)*8) >> (16 -8) << (0*8)))) : __builtin_bswap16(v6.payload_len)) + sizeof(v4)) << (16 -(1 +1)*8) >> (16 -8) << (0*8)))) : __builtin_bswap16((__builtin_constant_p(v6.payload_len) ? ((__u16)( ((__u16)(v6.payload_len) << (16 -(0 +1)*8) >> (16 -8) << (1*8)) | ((__u16)(v6.payload_len) << (16 -(1 +1)*8) >> (16 -8) << (0*8)))) : __builtin_bswap16(v6.payload_len)) + sizeof(v4)));
 csum_off = __builtin_offsetof(struct iphdr, check);
 csum = csum_diff(((void *)0), 0, &v4, sizeof(v4), csum);
 if (skb_change_proto(ctx, (__builtin_constant_p(0x0800) ? ((__u16)( ((__u16)(0x0800) << (16 -(0 +1)*8) >> (16 -8) << (1*8)) | ((__u16)(0x0800) << (16 -(1 +1)*8) >> (16 -8) << (0*8)))) : __builtin_bswap16(0x0800)), 0) < 0)
  return -141;
 if (skb_store_bytes(ctx, nh_off, &v4, sizeof(v4), 0) < 0 ||
     skb_store_bytes(ctx, nh_off - 2, &protocol, 2, 0) < 0)
  return -141;
 if (ipv4_csum_update_by_diff(ctx, nh_off, csum) < 0)
  return -153;
 if (v6.nexthdr == 58) {
  __be32 csum1 = 0;

  csum = icmp6_to_icmp4(ctx, nh_off + sizeof(v4));
  csum1 = ipv6_pseudohdr_checksum(&v6, 58,
      (__builtin_constant_p(v6.payload_len) ? ((__u16)( ((__u16)(v6.payload_len) << (16 -(0 +1)*8) >> (16 -8) << (1*8)) | ((__u16)(v6.payload_len) << (16 -(1 +1)*8) >> (16 -8) << (0*8)))) : __builtin_bswap16(v6.payload_len)), 0);
  csum = csum_sub(csum, csum1);
 } else {
  csum = 0;
  csum = csum_diff(&v6.saddr, 16, &v4.saddr, 4, csum);
  csum = csum_diff(&v6.daddr, 16, &v4.daddr, 4, csum);
  if (v4.protocol == IPPROTO_UDP)
   csum_flags |= BPF_F_MARK_MANGLED_0;
 }
 csum_off = get_csum_offset(v4.protocol);
 if (csum_off < 0)
  return csum_off;
 csum_off += sizeof(struct iphdr);
 if (l4_csum_replace(ctx, nh_off + csum_off, 0, csum, (__u32)csum_flags) < 0)
  return -154;
 return 0;
}

static inline __attribute__((always_inline)) int
nat46_rfc6052(struct __sk_buff *ctx __attribute__((__unused__)),
       const struct iphdr *ip4 __attribute__((__unused__)),
       int l3_off __attribute__((__unused__)))
{
 union v6addr src6, dst6;

 build_v4_in_v6_rfc6052(&src6, ip4->saddr);
 build_v4_in_v6_rfc6052(&dst6, ip4->daddr);

 return ipv4_to_ipv6(ctx, l3_off, &src6, &dst6);
}

static inline __attribute__((always_inline)) int
nat64_rfc6052(struct __sk_buff *ctx __attribute__((__unused__)),
       const struct ipv6hdr *ip6 __attribute__((__unused__)))
{
 __be32 src4, dst4;

 build_v4_from_v6((const union v6addr *)&ip6->saddr, &src4);
 build_v4_from_v6((const union v6addr *)&ip6->daddr, &dst4);

 return ipv6_to_ipv4(ctx, src4, dst4);
}




static inline __attribute__((always_inline)) _Bool nat46x64_cb_route(struct __sk_buff *ctx)
{
 return ctx_load_meta(ctx, CB_1) == 2;
}

static inline __attribute__((always_inline)) _Bool nat46x64_cb_xlate(struct __sk_buff *ctx)
{
 return ctx_load_meta(ctx, CB_1) == 1;
}
# 24 "/var/lib/cilium/bpf/lib/nat.h" 2
# 1 "/var/lib/cilium/bpf/lib/stubs.h" 1
# 25 "/var/lib/cilium/bpf/lib/nat.h" 2


__attribute__((section(".rodata.config"), used)) __attribute__((btf_decl_tag("kind:object"))) __attribute__((btf_decl_tag("Masquerade address for IPv4 traffic"))) volatile const union v4addr __config_nat_ipv4_masquerade;
__attribute__((section(".rodata.config"), used)) __attribute__((btf_decl_tag("kind:object"))) __attribute__((btf_decl_tag("Masquerade address for IPv6 traffic"))) volatile const union v6addr __config_nat_ipv6_masquerade;

enum nat_dir {
 NAT_DIR_EGRESS = 0,
 NAT_DIR_INGRESS = 1,
} __attribute__((packed));

struct nat_entry {
 __u64 created;
 __u64 needs_ct;
 __u64 pad1;
 __u64 pad2;
};
# 52 "/var/lib/cilium/bpf/lib/nat.h"
static inline __attribute__((always_inline)) __u16 __snat_clamp_port_range(__u16 start, __u16 end,
           __u16 val)
{

 __u32 n = (__u32)(end - start) + 1;
 __u32 m = (__u32)(val) * n;

 return start + (m >> 16);
}





static inline __attribute__((always_inline)) __attribute__((__unused__)) __u16
__snat_try_keep_port(__u16 start, __u16 end, __u16 val)
{
 return val >= start && val <= end ? val :
        __snat_clamp_port_range(start, end, (__u16)get_prandom_u32());
}

static inline __attribute__((always_inline)) __attribute__((__unused__)) void *
__snat_lookup(const void *map, const void *tuple)
{
 return map_lookup_elem(map, tuple);
}

static inline __attribute__((always_inline)) __attribute__((__unused__)) int
__snat_create(const void *map, const void *tuple, const void *state)
{
 return map_update_elem(map, tuple, state, BPF_NOEXIST);
}

static inline __attribute__((always_inline)) __attribute__((__unused__)) int
__snat_delete(const void *map, const void *tuple)
{
 return map_delete_elem(map, tuple);
}

struct ipv4_nat_entry {
 struct nat_entry common;
 union {
  struct lb4_reverse_nat nat_info;
  struct {
   __be32 to_saddr;
   __be16 to_sport;
  };
  struct {
   __be32 to_daddr;
   __be16 to_dport;
  };
 };
};

struct ipv4_nat_target {
 __be32 addr;
 __u16 min_port;
 __u16 max_port;
 _Bool from_local_endpoint;
 _Bool egress_gateway;
 __u32 cluster_id;
 _Bool needs_ct;
 __u32 ifindex;
};
# 1145 "/var/lib/cilium/bpf/lib/nat.h"
static inline __attribute__((always_inline)) __attribute__((__unused__))
int snat_v4_nat(struct __sk_buff *ctx __attribute__((__unused__)),
  const struct ipv4_nat_target *target __attribute__((__unused__)))
{
 return 0;
}

static inline __attribute__((always_inline)) __attribute__((__unused__))
int snat_v4_rev_nat(struct __sk_buff *ctx __attribute__((__unused__)),
      const struct ipv4_nat_target *target __attribute__((__unused__)))
{
 return 0;
}


struct ipv6_nat_entry {
 struct nat_entry common;
 union {
  struct lb6_reverse_nat nat_info;
  struct {
   union v6addr to_saddr;
   __be16 to_sport;
  };
  struct {
   union v6addr to_daddr;
   __be16 to_dport;
  };
 };
};

struct ipv6_nat_target {
 union v6addr addr;
 __u16 min_port;
 __u16 max_port;
 _Bool from_local_endpoint;
 _Bool needs_ct;
 _Bool egress_gateway;
 __u32 ifindex;
};
# 2097 "/var/lib/cilium/bpf/lib/nat.h"
static inline __attribute__((always_inline)) __attribute__((__unused__))
int snat_v6_nat(struct __sk_buff *ctx __attribute__((__unused__)),
  const struct ipv6_nat_target *target __attribute__((__unused__)))
{
 return 0;
}

static inline __attribute__((always_inline)) __attribute__((__unused__))
int snat_v6_rev_nat(struct __sk_buff *ctx __attribute__((__unused__)),
      const struct ipv6_nat_target *target __attribute__((__unused__)))
{
 return 0;
}
# 2156 "/var/lib/cilium/bpf/lib/nat.h"
static inline __attribute__((always_inline)) _Bool
snat_v6_has_v4_match(const struct ipv4_ct_tuple *tuple4 __attribute__((__unused__)))
{
 return false;
}
# 45 "/var/lib/cilium/bpf/bpf_host.c" 2
# 1 "/var/lib/cilium/bpf/lib/lb.h" 1
# 20 "/var/lib/cilium/bpf/lib/lb.h"
struct {
 int(*(type))[BPF_MAP_TYPE_HASH];
 typeof(struct skip_lb6_key) *(key);
 typeof(__u8) *(value);
 int(*(pinning))[1];
 int(*(max_entries))[100];
 int(*(map_flags))[BPF_F_NO_PREALLOC];
} cilium_skip_lb6 __attribute__((section(".maps"), used));

struct {
 int(*(type))[BPF_MAP_TYPE_HASH];
 typeof(__u16) *(key);
 typeof(struct lb6_reverse_nat) *(value);
 int(*(pinning))[1];
 int(*(max_entries))[65536];
 int(*(map_flags))[BPF_F_NO_PREALLOC];
} cilium_lb6_reverse_nat __attribute__((section(".maps"), used));

struct {
 int(*(type))[BPF_MAP_TYPE_HASH];
 typeof(struct lb6_key) *(key);
 typeof(struct lb6_service) *(value);
 int(*(pinning))[1];
 int(*(max_entries))[65536];
 int(*(map_flags))[BPF_F_NO_PREALLOC];
} cilium_lb6_services_v2 __attribute__((section(".maps"), used));

struct {
 int(*(type))[BPF_MAP_TYPE_HASH];
 typeof(__u32) *(key);
 typeof(struct lb6_backend) *(value);
 int(*(pinning))[1];
 int(*(max_entries))[65536];
 int(*(map_flags))[BPF_F_NO_PREALLOC];
} cilium_lb6_backends_v3 __attribute__((section(".maps"), used));


struct {
 int(*(type))[BPF_MAP_TYPE_LRU_HASH];
 typeof(struct lb6_affinity_key) *(key);
 typeof(struct lb_affinity_val) *(value);
 int(*(pinning))[1];
 int(*(max_entries))[65536];
 int(*(map_flags))[0];
} cilium_lb6_affinity __attribute__((section(".maps"), used));
# 109 "/var/lib/cilium/bpf/lib/lb.h"
struct {
 int(*(type))[BPF_MAP_TYPE_HASH];
 typeof(struct skip_lb4_key) *(key);
 typeof(__u8) *(value);
 int(*(pinning))[1];
 int(*(max_entries))[100];
 int(*(map_flags))[BPF_F_NO_PREALLOC];
} cilium_skip_lb4 __attribute__((section(".maps"), used));

struct {
 int(*(type))[BPF_MAP_TYPE_HASH];
 typeof(__u16) *(key);
 typeof(struct lb4_reverse_nat) *(value);
 int(*(pinning))[1];
 int(*(max_entries))[65536];
 int(*(map_flags))[BPF_F_NO_PREALLOC];
} cilium_lb4_reverse_nat __attribute__((section(".maps"), used));

struct {
 int(*(type))[BPF_MAP_TYPE_HASH];
 typeof(struct lb4_key) *(key);
 typeof(struct lb4_service) *(value);
 int(*(pinning))[1];
 int(*(max_entries))[65536];
 int(*(map_flags))[BPF_F_NO_PREALLOC];
} cilium_lb4_services_v2 __attribute__((section(".maps"), used));

struct {
 int(*(type))[BPF_MAP_TYPE_HASH];
 typeof(__u32) *(key);
 typeof(struct lb4_backend) *(value);
 int(*(pinning))[1];
 int(*(max_entries))[65536];
 int(*(map_flags))[BPF_F_NO_PREALLOC];
} cilium_lb4_backends_v3 __attribute__((section(".maps"), used));


struct {
 int(*(type))[BPF_MAP_TYPE_LRU_HASH];
 typeof(struct lb4_affinity_key) *(key);
 typeof(struct lb_affinity_val) *(value);
 int(*(pinning))[1];
 int(*(max_entries))[65536];
 int(*(map_flags))[0];
} cilium_lb4_affinity __attribute__((section(".maps"), used));
# 200 "/var/lib/cilium/bpf/lib/lb.h"
struct {
 int(*(type))[BPF_MAP_TYPE_HASH];
 typeof(struct lb_affinity_match) *(key);
 typeof(__u8) *(value);
 int(*(pinning))[1];
 int(*(max_entries))[65536];
 int(*(map_flags))[BPF_F_NO_PREALLOC];
} cilium_lb_affinity_match __attribute__((section(".maps"), used));
# 220 "/var/lib/cilium/bpf/lib/lb.h"
static inline __attribute__((always_inline)) _Bool lb_is_svc_proto(__u8 proto)
{
 switch (proto) {
 case IPPROTO_TCP:
 case IPPROTO_UDP:



  return true;
 default:
  return false;
 }
}

static inline __attribute__((always_inline))
_Bool lb4_svc_is_loadbalancer(const struct lb4_service *svc __attribute__((__unused__)))
{
 return svc->flags & SVC_FLAG_LOADBALANCER;
}

static inline __attribute__((always_inline))
_Bool lb6_svc_is_loadbalancer(const struct lb6_service *svc __attribute__((__unused__)))
{
 return svc->flags & SVC_FLAG_LOADBALANCER;
}

static inline __attribute__((always_inline))
_Bool lb4_svc_is_nodeport(const struct lb4_service *svc __attribute__((__unused__)))
{



 return false;

}

static inline __attribute__((always_inline))
_Bool lb6_svc_is_nodeport(const struct lb6_service *svc __attribute__((__unused__)))
{



 return false;

}

static inline __attribute__((always_inline))
_Bool lb4_svc_is_external_ip(const struct lb4_service *svc __attribute__((__unused__)))
{
 return svc->flags & SVC_FLAG_EXTERNAL_IP;
}

static inline __attribute__((always_inline))
_Bool lb6_svc_is_external_ip(const struct lb6_service *svc __attribute__((__unused__)))
{
 return svc->flags & SVC_FLAG_EXTERNAL_IP;
}

static inline __attribute__((always_inline))
_Bool lb4_svc_is_hostport(const struct lb4_service *svc __attribute__((__unused__)))
{
 return svc->flags & SVC_FLAG_HOSTPORT;
}

static inline __attribute__((always_inline))
_Bool lb6_svc_is_hostport(const struct lb6_service *svc __attribute__((__unused__)))
{
 return svc->flags & SVC_FLAG_HOSTPORT;
}

static inline __attribute__((always_inline))
_Bool lb4_svc_is_loopback(const struct lb4_service *svc __attribute__((__unused__)))
{
 return svc->flags2 & SVC_FLAG_LOOPBACK;
}

static inline __attribute__((always_inline))
_Bool lb6_svc_is_loopback(const struct lb6_service *svc __attribute__((__unused__)))
{
 return svc->flags2 & SVC_FLAG_LOOPBACK;
}

static inline __attribute__((always_inline))
_Bool lb4_svc_has_src_range_check(const struct lb4_service *svc __attribute__((__unused__)))
{



 return false;

}

static inline __attribute__((always_inline))
_Bool lb6_svc_has_src_range_check(const struct lb6_service *svc __attribute__((__unused__)))
{



 return false;

}

static inline __attribute__((always_inline))
_Bool lb4_svc_is_two_scopes(const struct lb4_service *svc)
{
 return svc->flags2 & SVC_FLAG_TWO_SCOPES;
}

static inline __attribute__((always_inline))
_Bool lb6_svc_is_two_scopes(const struct lb6_service *svc)
{
 return svc->flags2 & SVC_FLAG_TWO_SCOPES;
}

static inline __attribute__((always_inline))
_Bool lb4_svc_is_affinity(const struct lb4_service *svc)
{
 return svc->flags & SVC_FLAG_AFFINITY;
}

static inline __attribute__((always_inline))
_Bool lb6_svc_is_affinity(const struct lb6_service *svc)
{
 return svc->flags & SVC_FLAG_AFFINITY;
}

static inline __attribute__((always_inline)) _Bool __lb_svc_is_routable(__u8 flags)
{
 return (flags & SVC_FLAG_ROUTABLE) != 0;
}

static inline __attribute__((always_inline))
_Bool lb4_svc_is_routable(const struct lb4_service *svc)
{
 return __lb_svc_is_routable(svc->flags);
}

static inline __attribute__((always_inline))
_Bool lb6_svc_is_routable(const struct lb6_service *svc)
{
 return __lb_svc_is_routable(svc->flags);
}
# 377 "/var/lib/cilium/bpf/lib/lb.h"
static inline __attribute__((always_inline))
_Bool __lb4_svc_is_l7_loadbalancer(const struct lb4_service *svc __attribute__((__unused__)))
{



 return false;

}

static inline __attribute__((always_inline))
_Bool lb4_svc_is_l7_punt_proxy(const struct lb4_service *svc __attribute__((__unused__)))
{
 return !lb4_svc_is_hostport(svc) && (svc->flags2 & SVC_FLAG_L7_DELEGATE);
}

static inline __attribute__((always_inline))
_Bool lb4_svc_is_l7_loadbalancer(const struct lb4_service *svc __attribute__((__unused__)))
{




 return false;

}

static inline __attribute__((always_inline))
_Bool __lb6_svc_is_l7_loadbalancer(const struct lb6_service *svc __attribute__((__unused__)))
{



 return false;

}

static inline __attribute__((always_inline))
_Bool lb6_svc_is_l7_punt_proxy(const struct lb6_service *svc __attribute__((__unused__)))
{
 return !lb6_svc_is_hostport(svc) && (svc->flags2 & SVC_FLAG_L7_DELEGATE);
}

static inline __attribute__((always_inline))
_Bool lb6_svc_is_l7_loadbalancer(const struct lb6_service *svc __attribute__((__unused__)))
{




 return false;

}

static inline __attribute__((always_inline)) int reverse_map_l4_port(struct __sk_buff *ctx, __u8 nexthdr,
            __be16 old_port, __be16 port, int l4_off,
            struct csum_offset *csum_off)
{
 switch (nexthdr) {
 case IPPROTO_TCP:
 case IPPROTO_UDP:



  if (port) {
   int ret;

   if (port != old_port) {







    ret = l4_modify_port(ctx, l4_off, (__builtin_offsetof(struct tcphdr, source)),
           csum_off, port, old_port);
    if ((__builtin_expect(!!((ret < 0) || (ret == 2)), 0)))
     return ret;
   }
  }
  break;

 case 58:
 case IPPROTO_ICMP:
  return 0;

 default:
  return -142;
 }

 return 0;
}

static inline __attribute__((always_inline)) int
lb_l4_xlate(struct __sk_buff *ctx, __u8 nexthdr __attribute__((__unused__)), int l4_off,
     struct csum_offset *csum_off, __be16 dport, __be16 backend_port)
{
 if (__builtin_expect(!!(backend_port), 1) && dport != backend_port) {
  int ret;
# 487 "/var/lib/cilium/bpf/lib/lb.h"
  ret = l4_modify_port(ctx, l4_off, (__builtin_offsetof(struct tcphdr, dest)), csum_off,
         backend_port, dport);
  if ((__builtin_expect(!!((ret < 0) || (ret == 2)), 0)))
   return ret;
 }

 return 0;
}


static inline __attribute__((always_inline)) int
ipv6_l4_csum_update(struct __sk_buff *ctx, int l4_off, union v6addr *old_addr,
      union v6addr *new_addr, struct csum_offset *csum_off,
      enum ct_dir dir)
{
 int flag = 0, ret;
 __be32 sum;

 sum = csum_diff(old_addr->addr, 16, new_addr->addr, 16, 0);





 ret = csum_l4_replace(ctx, l4_off, csum_off, 0, sum,
         (1ULL << 4) | BPF_F_IPV6);
 if (ret != -22)
  return ret;
# 526 "/var/lib/cilium/bpf/lib/lb.h"
 if (dir == CT_EGRESS)
  flag = (1ULL << 4);

 return csum_l4_replace(ctx, l4_off, csum_off, 0, sum, flag);
}

static inline __attribute__((always_inline)) int __lb6_rev_nat(struct __sk_buff *ctx, int l4_off,
      struct ipv6_ct_tuple *tuple,
      struct lb6_reverse_nat *nat,
      _Bool has_l4_header, enum ct_dir dir)
{
 union v6addr old_saddr __attribute__((aligned(8)));
 int ret;

                                                                    ;

 ipv6_addr_copy(&old_saddr, &tuple->saddr);
 ipv6_addr_copy(&tuple->saddr, &nat->address);

 ret = ipv6_store_saddr(ctx, nat->address.addr, __config_eth_header_length);
 if ((__builtin_expect(!!((ret < 0) || (ret == 2)), 0)))
  return -141;

 if (has_l4_header) {
  struct csum_offset csum_off = {};

  csum_l4_offset_and_flags(tuple->nexthdr, &csum_off);

  if (nat->port) {
   ret = reverse_map_l4_port(ctx, tuple->nexthdr, tuple->dport,
        nat->port, l4_off, &csum_off);
   if ((__builtin_expect(!!((ret < 0) || (ret == 2)), 0)))
    return ret;
  }

  if (csum_off.offset &&
      ipv6_l4_csum_update(ctx, l4_off, &old_saddr, &nat->address,
     &csum_off, dir) < 0)
   return -154;
 }

 return 0;
}

static inline __attribute__((always_inline)) struct lb6_reverse_nat *
lb6_lookup_rev_nat_entry(struct __sk_buff *ctx __attribute__((__unused__)), __u16 index)
{
                                                         ;

 return map_lookup_elem(&cilium_lb6_reverse_nat, &index);
}







static inline __attribute__((always_inline)) int lb6_rev_nat(struct __sk_buff *ctx, int l4_off, __u16 index,
           struct ipv6_ct_tuple *tuple, _Bool has_l4_header,
           enum ct_dir dir)
{
 struct lb6_reverse_nat *nat;

 nat = lb6_lookup_rev_nat_entry(ctx, index);
 if (nat == ((void *)0))
  return 0;

 return __lb6_rev_nat(ctx, l4_off, tuple, nat, has_l4_header, dir);
}

static inline __attribute__((always_inline)) void
lb6_key_set_protocol(struct lb6_key *key __attribute__((__unused__)),
       __u8 protocol __attribute__((__unused__)))
{
 key->proto = protocol;
}

static inline __attribute__((always_inline)) void
lb6_fill_key(struct lb6_key *key, struct ipv6_ct_tuple *tuple)
{
 lb6_key_set_protocol(key, tuple->nexthdr);
 ipv6_addr_copy(&key->address, &tuple->daddr);
 key->dport = tuple->sport;
}
# 626 "/var/lib/cilium/bpf/lib/lb.h"
static inline __attribute__((always_inline)) int
lb6_extract_tuple(struct __sk_buff *ctx, struct ipv6hdr *ip6, fraginfo_t fraginfo,
    int l4_off, struct ipv6_ct_tuple *tuple)
{
 ipv6_addr_copy(&tuple->daddr, (union v6addr *)&ip6->daddr);
 ipv6_addr_copy(&tuple->saddr, (union v6addr *)&ip6->saddr);

 switch (tuple->nexthdr) {
 case IPPROTO_TCP:
 case IPPROTO_UDP:



  return ipv6_load_l4_ports(ctx, ip6, fraginfo, l4_off,
       CT_EGRESS, &tuple->dport);
 case 58:
  return -159;
 default:
  return -142;
 }
}

static inline __attribute__((always_inline))
_Bool lb6_src_range_ok(const struct lb6_service *svc __attribute__((__unused__)),
        const union v6addr *saddr __attribute__((__unused__)))
{
# 670 "/var/lib/cilium/bpf/lib/lb.h"
 return true;

}

static inline __attribute__((always_inline)) _Bool
lb6_to_lb4_service(const struct lb6_service *svc __attribute__((__unused__)))
{



 return false;

}

static inline __attribute__((always_inline))
struct lb6_service *__lb6_lookup_service(struct lb6_key *key)
{
 struct lb6_service *svc;

 svc = map_lookup_elem(&cilium_lb6_services_v2, key);


 if (!svc && key->proto != 0) {
  key->proto = 0;
  svc = map_lookup_elem(&cilium_lb6_services_v2, key);
 }

 return svc;
}

static inline __attribute__((always_inline))
struct lb6_service *lb6_lookup_service(struct lb6_key *key,
           const _Bool scope_switch)
{
 __u8 orig_proto = key->proto;
 struct lb6_service *svc;

 key->backend_slot = 0;

 key->scope = 0;
 svc = __lb6_lookup_service(key);
 if (!svc)
  return ((void *)0);

 if (!scope_switch || !lb6_svc_is_two_scopes(svc))
  return svc;

 key->proto = orig_proto;
 key->scope = 1;
 return __lb6_lookup_service(key);
}

static inline __attribute__((always_inline)) struct lb6_backend *__lb6_lookup_backend(__u32 backend_id)
{
 return map_lookup_elem(&cilium_lb6_backends_v3, &backend_id);
}

static inline __attribute__((always_inline)) struct lb6_backend *
lb6_lookup_backend(struct __sk_buff *ctx __attribute__((__unused__)), __u32 backend_id)
{
 struct lb6_backend *backend;

 backend = __lb6_lookup_backend(backend_id);
 if (!backend)
                                                                ;

 return backend;
}

static inline __attribute__((always_inline))
struct lb6_service *__lb6_lookup_backend_slot(struct lb6_key *key)
{
 return map_lookup_elem(&cilium_lb6_services_v2, key);
}

static inline __attribute__((always_inline))
struct lb6_service *lb6_lookup_backend_slot(struct __sk_buff *ctx __attribute__((__unused__)),
         struct lb6_key *key, __u16 slot)
{
 struct lb6_service *svc;

 key->backend_slot = slot;

                                      ;

 svc = __lb6_lookup_backend_slot(key);
 if (svc)
  return svc;


                                      ;
 return ((void *)0);
}


static inline __attribute__((always_inline)) __u32
lb6_select_backend_id_random(struct __sk_buff *ctx,
        struct lb6_key *key,
        const struct ipv6_ct_tuple *tuple __attribute__((__unused__)),
        const struct lb6_service *svc)
{

 __u16 slot = (get_prandom_u32() % svc->count) + 1;
 struct lb6_service *be = lb6_lookup_backend_slot(ctx, key, slot);

 return be ? be->backend_id : 0;
}
# 846 "/var/lib/cilium/bpf/lib/lb.h"
static inline __attribute__((always_inline)) int lb6_xlate(struct __sk_buff *ctx, __u8 nexthdr,
         int l3_off, int l4_off,
         const struct lb6_key *key,
         const struct lb6_backend *backend,
         _Bool has_l4_header)
{
 const union v6addr *new_dst = &backend->address;
 struct csum_offset csum_off = {};

 if (has_l4_header)
  csum_l4_offset_and_flags(nexthdr, &csum_off);

 if (ipv6_store_daddr(ctx, new_dst->addr, l3_off) < 0)
  return -141;
 if (csum_off.offset) {
  __be32 sum = csum_diff(key->address.addr, 16, new_dst->addr,
           16, 0);

  if (csum_l4_replace(ctx, l4_off, &csum_off, 0, sum,
        (1ULL << 4)) < 0)
   return -154;
 }

 if (!has_l4_header)
  return 0;

 return lb_l4_xlate(ctx, nexthdr, l4_off, &csum_off, key->dport,
      backend->port);
}


static inline __attribute__((always_inline)) __u32 lb6_affinity_timeout(const struct lb6_service *svc)
{
 return svc->affinity_timeout & ((1 << 24) - 1);
}

static inline __attribute__((always_inline)) __u32
__lb6_affinity_backend_id(const struct lb6_service *svc, _Bool netns_cookie,
     union lb6_affinity_client_id *id)
{
 struct lb6_affinity_key key = {
  .rev_nat_id = svc->rev_nat_index,
  .netns_cookie = netns_cookie,
 };
 struct lb_affinity_val *val;

 if (netns_cookie)
  key.client_id.client_cookie = id->client_cookie;
 else
  ipv6_addr_copy_unaligned(&key.client_id.client_ip, &id->client_ip);

 val = map_lookup_elem(&cilium_lb6_affinity, &key);
 if (val != ((void *)0)) {
  __u32 now = (__u32)({ __u64 __x = ktime_get_ns() / (1000ULL * 1000ULL * 1000UL); __x; });
  struct lb_affinity_match match = {
   .rev_nat_id = svc->rev_nat_index,
   .backend_id = val->backend_id,
  };

  if (({ typeof(val->last_used) __val = (*(volatile typeof(val->last_used) *)&val->last_used); bpf_barrier(); __val; }) +
      (lb6_affinity_timeout(svc)) <= now) {
   map_delete_elem(&cilium_lb6_affinity, &key);
   return 0;
  }

  if (!map_lookup_elem(&cilium_lb_affinity_match, &match)) {
   map_delete_elem(&cilium_lb6_affinity, &key);
   return 0;
  }

  ({ typeof(val->last_used) __val = (now); (*(volatile typeof(val->last_used) *)&val->last_used) = (__val); bpf_barrier(); __val; });
  return val->backend_id;
 }

 return 0;
}

static inline __attribute__((always_inline)) __u32
lb6_affinity_backend_id_by_addr(const struct lb6_service *svc,
    union lb6_affinity_client_id *id)
{
 return __lb6_affinity_backend_id(svc, false, id);
}

static inline __attribute__((always_inline)) void
__lb6_update_affinity(const struct lb6_service *svc, _Bool netns_cookie,
        union lb6_affinity_client_id *id, __u32 backend_id)
{
 __u32 now = (__u32)({ __u64 __x = ktime_get_ns() / (1000ULL * 1000ULL * 1000UL); __x; });
 struct lb6_affinity_key key = {
  .rev_nat_id = svc->rev_nat_index,
  .netns_cookie = netns_cookie,
 };
 struct lb_affinity_val val = {
  .backend_id = backend_id,
  .last_used = now,
 };

 if (netns_cookie)
  key.client_id.client_cookie = id->client_cookie;
 else
  ipv6_addr_copy_unaligned(&key.client_id.client_ip, &id->client_ip);

 map_update_elem(&cilium_lb6_affinity, &key, &val, 0);
}

static inline __attribute__((always_inline)) void
lb6_update_affinity_by_addr(const struct lb6_service *svc,
       union lb6_affinity_client_id *id, __u32 backend_id)
{
 __lb6_update_affinity(svc, false, id, backend_id);
}


static inline __attribute__((always_inline)) __u32
lb6_affinity_backend_id_by_netns(const struct lb6_service *svc __attribute__((__unused__)),
     union lb6_affinity_client_id *id __attribute__((__unused__)))
{

 return __lb6_affinity_backend_id(svc, true, id);



}

static inline __attribute__((always_inline)) void
lb6_update_affinity_by_netns(const struct lb6_service *svc __attribute__((__unused__)),
        union lb6_affinity_client_id *id __attribute__((__unused__)),
        __u32 backend_id __attribute__((__unused__)))
{

 __lb6_update_affinity(svc, true, id, backend_id);

}

static inline __attribute__((always_inline)) int
lb6_to_lb4(struct __sk_buff *ctx __attribute__((__unused__)),
    const struct ipv6hdr *ip6 __attribute__((__unused__)))
{
# 993 "/var/lib/cilium/bpf/lib/lb.h"
 return -161;

}
# 1016 "/var/lib/cilium/bpf/lib/lb.h"
static inline __attribute__((always_inline)) int lb6_local(const void *map, struct __sk_buff *ctx,
         int l3_off, fraginfo_t fraginfo, int l4_off,
         struct lb6_key *key,
         struct ipv6_ct_tuple *tuple,
         const struct lb6_service *svc,
         struct ct_state *state,
         const _Bool skip_xlate,
         __s8 *ext_err,
         __net_cookie netns_cookie __attribute__((__unused__)))
{
 __u32 monitor;
 __u8 flags = tuple->flags;
 struct lb6_backend *backend;
 __u32 backend_id = 0;
 int ret;

 union lb6_affinity_client_id client_id;

 ipv6_addr_copy(&client_id.client_ip, &tuple->saddr);


 state->rev_nat_index = svc->rev_nat_index;


 ret = ct_lazy_lookup6(map, tuple, ctx, fraginfo, l4_off, CT_SERVICE,
         SCOPE_REVERSE, CT_ENTRY_SVC, state, &monitor);
 if (ret < 0)
  goto drop_err;

 switch (ret) {
 case CT_NEW:
  if (__builtin_expect(!!(svc->count == 0), 0))
   goto no_service;


  if (lb6_svc_is_affinity(svc)) {
   backend_id = lb6_affinity_backend_id_by_addr(svc, &client_id);
   if (backend_id != 0) {
    backend = lb6_lookup_backend(ctx, backend_id);
    if (backend == ((void *)0))
     backend_id = 0;
   }
  }

  if (backend_id == 0) {
   backend_id = lb6_select_backend_id_random(ctx, key, tuple, svc);
   backend = lb6_lookup_backend(ctx, backend_id);
   if (backend == ((void *)0))
    goto no_service;
  }

  state->backend_id = backend_id;

  ret = ct_create6(map, ((void *)0), tuple, ctx, CT_SERVICE, state, ext_err);



  if ((__builtin_expect(!!((ret < 0) || (ret == 2)), 0)))
   goto drop_err;





  break;
 case CT_REPLY:
  backend_id = state->backend_id;





  backend = lb6_lookup_backend(ctx, backend_id);
# 1097 "/var/lib/cilium/bpf/lib/lb.h"
  if (__builtin_expect(!!(!backend || backend->flags != BE_STATE_ACTIVE), 0)) {



   if (backend && !state->syn)
    break;

   if (__builtin_expect(!!(svc->count == 0), 0))
    goto no_service;

   backend_id = lb6_select_backend_id_random(ctx, key, tuple, svc);
   backend = lb6_lookup_backend(ctx, backend_id);
   if (!backend)
    goto no_service;

   state->rev_nat_index = svc->rev_nat_index;
   ct_update_svc_entry(map, tuple, backend_id, svc->rev_nat_index);
  }

  break;
 default:
  ret = -163;
  goto drop_err;
 }




 tuple->flags = flags;

 if (lb6_svc_is_affinity(svc))
  lb6_update_affinity_by_addr(svc, &client_id, backend_id);
# 1137 "/var/lib/cilium/bpf/lib/lb.h"
 ipv6_addr_copy(&tuple->daddr, &backend->address);

 if (lb6_svc_is_l7_punt_proxy(svc) &&
     __lookup_ip6_endpoint(&backend->address)) {
  ctx_skip_nodeport_set(ctx);
  return -205;
 }
 if (skip_xlate)
  return 0;

 if (__builtin_expect(!!(backend->port), 1))
  tuple->sport = backend->port;

 return lb6_xlate(ctx, tuple->nexthdr, l3_off, l4_off, key,
    backend, ipfrag_has_l4_header(fraginfo));
no_service:
 ret = -158;
drop_err:
 tuple->flags = flags;
 return ret;
}
# 1166 "/var/lib/cilium/bpf/lib/lb.h"
static inline __attribute__((always_inline)) void lb6_ctx_store_state(struct __sk_buff *ctx,
      const struct ct_state *state,
            __u16 proxy_port)
{
 ctx_store_meta(ctx, CB_SRC_LABEL, (__u32)proxy_port << 16);
 ctx_store_meta(ctx, CB_CT_STATE, (__u32)state->rev_nat_index);
}






static inline __attribute__((always_inline)) void lb6_ctx_restore_state(struct __sk_buff *ctx,
        struct ct_state *state,
       __u16 *proxy_port,
       _Bool clear)
{
 state->rev_nat_index = clear ? (__u16)ctx_load_and_clear_meta(ctx, CB_CT_STATE) :
           (__u16)ctx_load_meta(ctx, CB_CT_STATE);



 *proxy_port = clear ? (ctx_load_and_clear_meta(ctx, CB_SRC_LABEL) >> 16) :
         (ctx_load_meta(ctx, CB_SRC_LABEL) >> 16);
}
# 1231 "/var/lib/cilium/bpf/lib/lb.h"
static inline __attribute__((always_inline)) int __lb4_rev_nat(struct __sk_buff *ctx, int l3_off, int l4_off,
      struct ipv4_ct_tuple *tuple,
      const struct lb4_reverse_nat *nat,
      _Bool loopback __attribute__((__unused__)), _Bool has_l4_header)
{
 __be32 old_sip = tuple->saddr, sum = 0;
 int ret;

                                                                 ;

 tuple->saddr = nat->address;
# 1266 "/var/lib/cilium/bpf/lib/lb.h"
 ret = skb_store_bytes(ctx, l3_off + __builtin_offsetof(struct iphdr, saddr),
         &nat->address, 4, 0);
 if ((__builtin_expect(!!((ret < 0) || (ret == 2)), 0)))
  return -141;

 sum = csum_diff(&old_sip, 4, &nat->address, 4, sum);
 if (ipv4_csum_update_by_diff(ctx, l3_off, sum) < 0)
  return -153;

 if (has_l4_header) {
  struct csum_offset csum_off = {};

  csum_l4_offset_and_flags(tuple->nexthdr, &csum_off);

  if (nat->port) {



   ret = reverse_map_l4_port(ctx, tuple->nexthdr, tuple->dport,
        nat->port, l4_off, &csum_off);
   if ((__builtin_expect(!!((ret < 0) || (ret == 2)), 0)))
    return ret;
  }

  if (csum_off.offset &&
      csum_l4_replace(ctx, l4_off, &csum_off, 0, sum, (1ULL << 4)) < 0)
   return -154;
 }

 return 0;
}

static inline __attribute__((always_inline)) struct lb4_reverse_nat *
lb4_lookup_rev_nat_entry(struct __sk_buff *ctx __attribute__((__unused__)), __u16 index)
{
                                                         ;

 return map_lookup_elem(&cilium_lb4_reverse_nat, &index);
}
# 1314 "/var/lib/cilium/bpf/lib/lb.h"
static inline __attribute__((always_inline)) int lb4_rev_nat(struct __sk_buff *ctx, int l3_off, int l4_off,
           __u16 index, _Bool loopback,
           struct ipv4_ct_tuple *tuple, _Bool has_l4_header)
{
 struct lb4_reverse_nat *nat;

 nat = lb4_lookup_rev_nat_entry(ctx, index);
 if (nat == ((void *)0))
  return 0;

 return __lb4_rev_nat(ctx, l3_off, l4_off, tuple, nat,
        loopback, has_l4_header);
}

static inline __attribute__((always_inline)) void
lb4_key_set_protocol(struct lb4_key *key __attribute__((__unused__)),
       __u8 protocol __attribute__((__unused__)))
{
 key->proto = protocol;
}

static inline __attribute__((always_inline)) void
lb4_fill_key(struct lb4_key *key, const struct ipv4_ct_tuple *tuple)
{
 lb4_key_set_protocol(key, tuple->nexthdr);
 key->address = tuple->daddr;

 key->dport = tuple->sport;
}
# 1356 "/var/lib/cilium/bpf/lib/lb.h"
static inline __attribute__((always_inline)) int
lb4_extract_tuple(struct __sk_buff *ctx, struct iphdr *ip4, fraginfo_t fraginfo,
    int l4_off, struct ipv4_ct_tuple *tuple)
{
 tuple->nexthdr = ip4->protocol;
 tuple->daddr = ip4->daddr;
 tuple->saddr = ip4->saddr;

 switch (tuple->nexthdr) {
 case IPPROTO_TCP:
 case IPPROTO_UDP:



  return ipv4_load_l4_ports(ctx, ip4, fraginfo, l4_off,
       CT_EGRESS, &tuple->dport);
 case IPPROTO_ICMP:
  return -159;
 default:
  return -142;
 }
}

static inline __attribute__((always_inline))
_Bool lb4_src_range_ok(const struct lb4_service *svc __attribute__((__unused__)),
        __u32 saddr __attribute__((__unused__)))
{
# 1401 "/var/lib/cilium/bpf/lib/lb.h"
 return true;

}

static inline __attribute__((always_inline)) _Bool
lb4_to_lb6_service(const struct lb4_service *svc __attribute__((__unused__)))
{



 return false;

}

static inline __attribute__((always_inline))
struct lb4_service *__lb4_lookup_service(struct lb4_key *key)
{
 struct lb4_service *svc;

 svc = map_lookup_elem(&cilium_lb4_services_v2, key);


 if (!svc && key->proto != 0) {
  key->proto = 0;
  svc = map_lookup_elem(&cilium_lb4_services_v2, key);
 }

 return svc;
}

static inline __attribute__((always_inline))
struct lb4_service *lb4_lookup_service(struct lb4_key *key,
           const _Bool scope_switch)
{
 __u8 orig_proto = key->proto;
 struct lb4_service *svc;

 key->backend_slot = 0;

 key->scope = 0;
 svc = __lb4_lookup_service(key);
 if (!svc)
  return ((void *)0);

 if (!scope_switch || !lb4_svc_is_two_scopes(svc))
  return svc;

 key->proto = orig_proto;
 key->scope = 1;
 return __lb4_lookup_service(key);
}

static inline __attribute__((always_inline)) struct lb4_backend *__lb4_lookup_backend(__u32 backend_id)
{
 return map_lookup_elem(&cilium_lb4_backends_v3, &backend_id);
}

static inline __attribute__((always_inline)) struct lb4_backend *
lb4_lookup_backend(struct __sk_buff *ctx __attribute__((__unused__)), __u32 backend_id)
{
 struct lb4_backend *backend;

 backend = __lb4_lookup_backend(backend_id);
 if (!backend)
                                                                ;

 return backend;
}

static inline __attribute__((always_inline))
struct lb4_service *__lb4_lookup_backend_slot(struct lb4_key *key)
{
 return map_lookup_elem(&cilium_lb4_services_v2, key);
}

static inline __attribute__((always_inline))
struct lb4_service *lb4_lookup_backend_slot(struct __sk_buff *ctx __attribute__((__unused__)),
         struct lb4_key *key, __u16 slot)
{
 struct lb4_service *svc;

 key->backend_slot = slot;

                                      ;

 svc = __lb4_lookup_backend_slot(key);
 if (svc)
  return svc;


                                      ;
 return ((void *)0);
}


static inline __attribute__((always_inline)) __u32
lb4_select_backend_id_random(struct __sk_buff *ctx,
        struct lb4_key *key,
        const struct ipv4_ct_tuple *tuple __attribute__((__unused__)),
        const struct lb4_service *svc)
{

 __u16 slot = (get_prandom_u32() % svc->count) + 1;
 struct lb4_service *be = lb4_lookup_backend_slot(ctx, key, slot);

 return be ? be->backend_id : 0;
}
# 1580 "/var/lib/cilium/bpf/lib/lb.h"
static inline __attribute__((always_inline)) int
lb4_xlate(struct __sk_buff *ctx, __be32 *new_saddr __attribute__((__unused__)),
   __be32 *old_saddr __attribute__((__unused__)), __u8 nexthdr __attribute__((__unused__)), int l3_off,
   int l4_off, struct lb4_key *key,
   const struct lb4_backend *backend __attribute__((__unused__)), _Bool has_l4_header)
{
 const __be32 *new_daddr = &backend->address;
 struct csum_offset csum_off = {};
 __be32 sum;
 int ret;

 if (has_l4_header)
  csum_l4_offset_and_flags(nexthdr, &csum_off);

 ret = skb_store_bytes(ctx, l3_off + __builtin_offsetof(struct iphdr, daddr),
         new_daddr, 4, 0);
 if (ret < 0)
  return -141;

 sum = csum_diff(&key->address, 4, new_daddr, 4, 0);
# 1612 "/var/lib/cilium/bpf/lib/lb.h"
 if (ipv4_csum_update_by_diff(ctx, l3_off, sum) < 0)
  return -153;
 if (csum_off.offset) {
  if (csum_l4_replace(ctx, l4_off, &csum_off, 0, sum,
        (1ULL << 4)) < 0)
   return -154;
 }

 return has_l4_header ? lb_l4_xlate(ctx, nexthdr, l4_off, &csum_off,
        key->dport, backend->port) :
          0;
}


static inline __attribute__((always_inline)) __u32 lb4_affinity_timeout(const struct lb4_service *svc)
{
 return svc->affinity_timeout & ((1 << 24) - 1);
}

static inline __attribute__((always_inline)) __u32
__lb4_affinity_backend_id(const struct lb4_service *svc, _Bool netns_cookie,
     const union lb4_affinity_client_id *id)
{
 struct lb4_affinity_key key = {
  .rev_nat_id = svc->rev_nat_index,
  .netns_cookie = netns_cookie,
  .client_id = *id,
 };
 struct lb_affinity_val *val;

 val = map_lookup_elem(&cilium_lb4_affinity, &key);
 if (val != ((void *)0)) {
  __u32 now = (__u32)({ __u64 __x = ktime_get_ns() / (1000ULL * 1000ULL * 1000UL); __x; });
  struct lb_affinity_match match = {
   .rev_nat_id = svc->rev_nat_index,
   .backend_id = val->backend_id,
  };






  if (({ typeof(val->last_used) __val = (*(volatile typeof(val->last_used) *)&val->last_used); bpf_barrier(); __val; }) +
      (lb4_affinity_timeout(svc)) <= now) {
   map_delete_elem(&cilium_lb4_affinity, &key);
   return 0;
  }

  if (!map_lookup_elem(&cilium_lb_affinity_match, &match)) {
   map_delete_elem(&cilium_lb4_affinity, &key);
   return 0;
  }

  ({ typeof(val->last_used) __val = (now); (*(volatile typeof(val->last_used) *)&val->last_used) = (__val); bpf_barrier(); __val; });
  return val->backend_id;
 }

 return 0;
}

static inline __attribute__((always_inline)) __u32
lb4_affinity_backend_id_by_addr(const struct lb4_service *svc,
    union lb4_affinity_client_id *id)
{
 return __lb4_affinity_backend_id(svc, false, id);
}

static inline __attribute__((always_inline)) void
__lb4_update_affinity(const struct lb4_service *svc, _Bool netns_cookie,
        const union lb4_affinity_client_id *id,
        __u32 backend_id)
{
 __u32 now = (__u32)({ __u64 __x = ktime_get_ns() / (1000ULL * 1000ULL * 1000UL); __x; });
 struct lb4_affinity_key key = {
  .rev_nat_id = svc->rev_nat_index,
  .netns_cookie = netns_cookie,
  .client_id = *id,
 };
 struct lb_affinity_val val = {
  .backend_id = backend_id,
  .last_used = now,
 };

 map_update_elem(&cilium_lb4_affinity, &key, &val, 0);
}

static inline __attribute__((always_inline)) void
lb4_update_affinity_by_addr(const struct lb4_service *svc,
       union lb4_affinity_client_id *id, __u32 backend_id)
{
 __lb4_update_affinity(svc, false, id, backend_id);
}


static inline __attribute__((always_inline)) __u32
lb4_affinity_backend_id_by_netns(const struct lb4_service *svc __attribute__((__unused__)),
     union lb4_affinity_client_id *id __attribute__((__unused__)))
{

 return __lb4_affinity_backend_id(svc, true, id);



}

static inline __attribute__((always_inline)) void
lb4_update_affinity_by_netns(const struct lb4_service *svc __attribute__((__unused__)),
        union lb4_affinity_client_id *id __attribute__((__unused__)),
        __u32 backend_id __attribute__((__unused__)))
{

 __lb4_update_affinity(svc, true, id, backend_id);

}

static inline __attribute__((always_inline)) int
lb4_to_lb6(struct __sk_buff *ctx __attribute__((__unused__)),
    const struct iphdr *ip4 __attribute__((__unused__)),
    int l3_off __attribute__((__unused__)))
{
# 1741 "/var/lib/cilium/bpf/lib/lb.h"
 return -161;

}
# 1781 "/var/lib/cilium/bpf/lib/lb.h"
static inline __attribute__((always_inline)) int lb4_local(const void *map, struct __sk_buff *ctx,
         int l3_off, fraginfo_t fraginfo, int l4_off,
         struct lb4_key *key,
         struct ipv4_ct_tuple *tuple,
         const struct lb4_service *svc,
         struct ct_state *state,
         const _Bool skip_xlate,
         __u32 *cluster_id __attribute__((__unused__)),
         __s8 *ext_err,
         __net_cookie netns_cookie __attribute__((__unused__)))
{
 __u32 monitor;
 __be32 saddr = tuple->saddr;
 __u8 flags = tuple->flags;
 struct lb4_backend *backend;
 __u32 backend_id = 0;
 __be32 new_saddr = 0;
 int ret;

 union lb4_affinity_client_id client_id = {
  .client_ip = saddr,
 };


 state->rev_nat_index = svc->rev_nat_index;

 ret = ct_lazy_lookup4(map, tuple, ctx, fraginfo, l4_off, CT_SERVICE,
         SCOPE_REVERSE, CT_ENTRY_SVC, state, &monitor);
 if (ret < 0)
  goto drop_err;

 switch (ret) {
 case CT_NEW:
  if (__builtin_expect(!!(svc->count == 0), 0))
   goto no_service;


  if (lb4_svc_is_affinity(svc)) {
   backend_id = lb4_affinity_backend_id_by_addr(svc, &client_id);
   if (backend_id != 0) {
    backend = lb4_lookup_backend(ctx, backend_id);
    if (backend == ((void *)0))
     backend_id = 0;
   }
  }

  if (backend_id == 0) {

   backend_id = lb4_select_backend_id_random(ctx, key, tuple, svc);
   backend = lb4_lookup_backend(ctx, backend_id);
   if (backend == ((void *)0))
    goto no_service;
  }

  state->backend_id = backend_id;

  ret = ct_create4(map, ((void *)0), tuple, ctx, CT_SERVICE, state, ext_err);



  if ((__builtin_expect(!!((ret < 0) || (ret == 2)), 0)))
   goto drop_err;





  break;
 case CT_REPLY:
  backend_id = state->backend_id;





  backend = lb4_lookup_backend(ctx, backend_id);
# 1865 "/var/lib/cilium/bpf/lib/lb.h"
  if (__builtin_expect(!!(!backend || backend->flags != BE_STATE_ACTIVE), 0)) {



   if (backend && !state->syn)
    break;

   if (__builtin_expect(!!(svc->count == 0), 0))
    goto no_service;

   backend_id = lb4_select_backend_id_random(ctx, key, tuple, svc);
   backend = lb4_lookup_backend(ctx, backend_id);
   if (!backend)
    goto no_service;

   state->rev_nat_index = svc->rev_nat_index;
   ct_update_svc_entry(map, tuple, backend_id, svc->rev_nat_index);
  }

  break;
 default:
  ret = -163;
  goto drop_err;
 }
# 1897 "/var/lib/cilium/bpf/lib/lb.h"
 tuple->flags = flags;

 if (lb4_svc_is_affinity(svc))
  lb4_update_affinity_by_addr(svc, &client_id, backend_id);
# 1928 "/var/lib/cilium/bpf/lib/lb.h"
  tuple->daddr = backend->address;

 if (lb4_svc_is_l7_punt_proxy(svc) &&
     __lookup_ip4_endpoint(backend->address)) {
  ctx_skip_nodeport_set(ctx);
  return -205;
 }
 if (skip_xlate)
  return 0;


 if (__builtin_expect(!!(backend->port), 1))
  tuple->sport = backend->port;

 return lb4_xlate(ctx, &new_saddr, &saddr,
    tuple->nexthdr, l3_off, l4_off, key,
    backend, ipfrag_has_l4_header(fraginfo));
no_service:
 ret = -158;
drop_err:
 tuple->flags = flags;
 return ret;
}
# 1959 "/var/lib/cilium/bpf/lib/lb.h"
static inline __attribute__((always_inline)) void lb4_ctx_store_state(struct __sk_buff *ctx,
      const struct ct_state *state,
            __u16 proxy_port, __u32 cluster_id)
{
 ctx_store_meta(ctx, CB_SRC_LABEL, (__u32)proxy_port << 16);
 ctx_store_meta(ctx, CB_CT_STATE, (__u32)state->rev_nat_index << 16 |



         0);

 ctx_store_meta(ctx, CB_1, cluster_id);
}






static inline __attribute__((always_inline)) void
lb4_ctx_restore_state(struct __sk_buff *ctx, struct ct_state *state,
         __u16 *proxy_port, __u32 *cluster_id __attribute__((__unused__)),
         _Bool clear)
{
 __u32 meta = clear ? ctx_load_and_clear_meta(ctx, CB_CT_STATE) :
        ctx_load_meta(ctx, CB_CT_STATE);




 state->rev_nat_index = meta >> 16;

 *proxy_port = clear ? (ctx_load_and_clear_meta(ctx, CB_SRC_LABEL) >> 16) :
         (ctx_load_meta(ctx, CB_SRC_LABEL) >> 16);





}







static inline __attribute__((always_inline))
__wsum icmp_wsum_accumulate(void *data_start, void *data_end, int sample_len);

static inline __attribute__((always_inline))
int __tail_no_service_ipv4(struct __sk_buff *ctx)
{
 void *data, *data_end;
 struct ethhdr *ethhdr;
 struct iphdr *ip4;
 struct icmphdr *icmphdr;
 union macaddr smac = {};
 union macaddr dmac = {};
 __be32 saddr;
 __be32 daddr;
 __u8 tos;
 __wsum csum;
 int sample_len;
 int ret;
 const int inner_offset = sizeof(struct ethhdr) + sizeof(struct iphdr) +
  sizeof(struct icmphdr);

 if (!__revalidate_data_pull(ctx, &data, &data_end, (void **)&ip4, __config_eth_header_length, sizeof(**&ip4), false))
  return -134;





 if (eth_load_saddr(ctx, smac.addr, 0) < 0)
  return -134;

 if (eth_load_daddr(ctx, dmac.addr, 0) < 0)
  return -134;

 saddr = ip4->saddr;
 daddr = ip4->daddr;
 tos = ip4->tos;


 sample_len = (int)ctx_full_len(ctx);
 if (sample_len > 64)
  sample_len = 64;
 ctx_adjust_troom(ctx, (__s32)(sample_len + sizeof(struct ethhdr) - ctx_full_len(ctx)));

 data = ctx_data(ctx);
 data_end = ctx_data_end(ctx);


 csum = icmp_wsum_accumulate(data + sizeof(struct ethhdr), data_end, sample_len);
# 2063 "/var/lib/cilium/bpf/lib/lb.h"
 ret = skb_adjust_room(ctx, sizeof(struct iphdr) + sizeof(struct icmphdr),
         BPF_ADJ_ROOM_MAC, 0);


 if (ret < 0)
  return -134;


 data = ctx_data(ctx);
 data_end = ctx_data_end(ctx);


 if (data + inner_offset > data_end)
  return -134;


 ethhdr = data;
 memcpy(ethhdr->h_dest, smac.addr, sizeof(smac.addr));
 memcpy(ethhdr->h_source, dmac.addr, sizeof(dmac.addr));
 ethhdr->h_proto = (__builtin_constant_p(0x0800) ? ((__u16)( ((__u16)(0x0800) << (16 -(0 +1)*8) >> (16 -8) << (1*8)) | ((__u16)(0x0800) << (16 -(1 +1)*8) >> (16 -8) << (0*8)))) : __builtin_bswap16(0x0800));


 ip4 = data + sizeof(struct ethhdr);
 ip4->version = 4;
 ip4->ihl = sizeof(struct iphdr) >> 2;
 ip4->tos = tos;
 ip4->tot_len = (__builtin_constant_p(sizeof(struct iphdr) + sizeof(struct icmphdr) + (__u16)sample_len) ? ((__u16)( ((__u16)(sizeof(struct iphdr) + sizeof(struct icmphdr) + (__u16)sample_len) << (16 -(0 +1)*8) >> (16 -8) << (1*8)) | ((__u16)(sizeof(struct iphdr) + sizeof(struct icmphdr) + (__u16)sample_len) << (16 -(1 +1)*8) >> (16 -8) << (0*8)))) : __builtin_bswap16(sizeof(struct iphdr) + sizeof(struct icmphdr) + (__u16)sample_len));

 ip4->id = 0;
 ip4->frag_off = 0;
 ip4->ttl = 64;
 ip4->protocol = IPPROTO_ICMP;
 ip4->check = 0;
 ip4->daddr = saddr;
 ip4->saddr = daddr;
 ip4->check = csum_fold(csum_diff(ip4, 0, ip4, sizeof(struct iphdr), 0));


 icmphdr = data + sizeof(struct ethhdr) + sizeof(struct iphdr);
 icmphdr->type = 3;
 icmphdr->code = 3;
 icmphdr->checksum = 0;
 icmphdr->un.gateway = 0;


 csum += csum_diff(icmphdr, 0, icmphdr, sizeof(struct icmphdr), 0);
 icmphdr->checksum = csum_fold(csum);

 return 0;
}

__attribute__((section("tc" "/tail"), used)) __attribute__((btf_decl_tag("tail:cilium_calls/" "45")))
int tail_no_service_ipv4(struct __sk_buff *ctx)
{
 __u32 src_sec_identity = ctx_load_meta(ctx, CB_SRC_LABEL);
 int ret;

 ret = __tail_no_service_ipv4(ctx);
 if (!ret) {

  cilium_dbg_capture(ctx, DBG_CAPTURE_DELIVERY,
       ctx_get_ifindex(ctx));
  ret = redirect_self(ctx);
 }

 if ((__builtin_expect(!!((ret < 0) || (ret == 2)), 0)))
  return _send_drop_notify((__u8)__id_for_file("lb.h"), 2130, ctx, src_sec_identity, 0, 0, ({ typeof(ret) __err = (ret); (__u8)(__err > 0 ? __err : -__err); }), 2, METRIC_INGRESS);


 return ret;
}
# 2147 "/var/lib/cilium/bpf/lib/lb.h"
static inline __attribute__((always_inline))
__wsum icmp_wsum_accumulate(void *data_start, void *data_end, int sample_len);


struct ipv6_pseudo_header_t {
 union {
  struct header {
   struct in6_addr src_ip;
   struct in6_addr dst_ip;
   __be32 top_level_length;
   __u8 zero[3];
   __u8 next_header;
  } __attribute__((packed)) fields;
  __u16 words[20];
 };
};

static inline __attribute__((always_inline))
int __tail_no_service_ipv6(struct __sk_buff *ctx)
{
 void *data, *data_end;
 struct ethhdr *ethhdr;
 struct ipv6hdr *ip6;
 struct icmp6hdr *icmphdr;
 struct ipv6_pseudo_header_t pseudo_header;
 union macaddr smac = {};
 union macaddr dmac = {};
 struct in6_addr saddr;
 struct in6_addr daddr;
 __wsum csum;
 __u64 sample_len;
 int i;
 int ret;
 const int inner_offset = sizeof(struct ethhdr) + sizeof(struct ipv6hdr) +
  sizeof(struct icmp6hdr);

 if (!__revalidate_data_pull(ctx, &data, &data_end, (void **)&ip6, __config_eth_header_length, sizeof(**&ip6), false))
  return -134;





 if (eth_load_saddr(ctx, smac.addr, 0) < 0)
  return -134;

 if (eth_load_daddr(ctx, dmac.addr, 0) < 0)
  return -134;

 memcpy(&saddr, &ip6->saddr, sizeof(struct in6_addr));
 memcpy(&daddr, &ip6->daddr, sizeof(struct in6_addr));


 sample_len = ctx_full_len(ctx);
 if (sample_len > (__u64)1280 - sizeof(struct ipv6hdr) - sizeof(struct icmp6hdr))
  sample_len = 1280 - sizeof(struct ipv6hdr) - sizeof(struct icmp6hdr);
 ctx_adjust_troom(ctx, (__s32)(sample_len + sizeof(struct ethhdr) - ctx_full_len(ctx)));

 data = ctx_data(ctx);
 data_end = ctx_data_end(ctx);


 csum = icmp_wsum_accumulate(data + sizeof(struct ethhdr), data_end, (int)sample_len);
# 2218 "/var/lib/cilium/bpf/lib/lb.h"
 ret = skb_adjust_room(ctx, sizeof(struct ipv6hdr) + sizeof(struct icmp6hdr),
         BPF_ADJ_ROOM_MAC, 0);


 if (ret < 0)
  return -134;


 data = ctx_data(ctx);
 data_end = ctx_data_end(ctx);


 if (data + inner_offset > data_end)
  return -134;


 ethhdr = data;
 memcpy(ethhdr->h_dest, smac.addr, sizeof(smac.addr));
 memcpy(ethhdr->h_source, dmac.addr, sizeof(dmac.addr));
 ethhdr->h_proto = (__builtin_constant_p(0x86DD) ? ((__u16)( ((__u16)(0x86DD) << (16 -(0 +1)*8) >> (16 -8) << (1*8)) | ((__u16)(0x86DD) << (16 -(1 +1)*8) >> (16 -8) << (0*8)))) : __builtin_bswap16(0x86DD));


 ip6 = data + sizeof(struct ethhdr);
 ip6->version = 6;
 ip6->priority = 0;
 ip6->flow_lbl[0] = 0;
 ip6->flow_lbl[1] = 0;
 ip6->flow_lbl[2] = 0;
 ip6->payload_len = (__builtin_constant_p(sizeof(struct icmp6hdr) + (__u16)sample_len) ? ((__u16)( ((__u16)(sizeof(struct icmp6hdr) + (__u16)sample_len) << (16 -(0 +1)*8) >> (16 -8) << (1*8)) | ((__u16)(sizeof(struct icmp6hdr) + (__u16)sample_len) << (16 -(1 +1)*8) >> (16 -8) << (0*8)))) : __builtin_bswap16(sizeof(struct icmp6hdr) + (__u16)sample_len));
 ip6->nexthdr = 58;
 ip6->hop_limit = 64;
 memcpy(&ip6->daddr, &saddr, sizeof(struct in6_addr));
 memcpy(&ip6->saddr, &daddr, sizeof(struct in6_addr));


 icmphdr = data + sizeof(struct ethhdr) + sizeof(struct ipv6hdr);
 icmphdr->icmp6_type = 1;
 icmphdr->icmp6_code = 4;
 icmphdr->icmp6_cksum = 0;
 icmphdr->icmp6_dataun.un_data32[0] = 0;


 csum += ((__u16)icmphdr->icmp6_code) << 8 | (__u16)icmphdr->icmp6_type;


 memcpy(&pseudo_header.fields.src_ip, &ip6->saddr, sizeof(struct in6_addr));
 memcpy(&pseudo_header.fields.dst_ip, &ip6->daddr, sizeof(struct in6_addr));
 pseudo_header.fields.top_level_length = (__builtin_constant_p(sizeof(struct icmp6hdr) + (__u32)sample_len) ? ((__u32)( ((__u32)(sizeof(struct icmp6hdr) + (__u32)sample_len) << (32 -(0 +1)*8) >> (32 -8) << (3*8)) | ((__u32)(sizeof(struct icmp6hdr) + (__u32)sample_len) << (32 -(1 +1)*8) >> (32 -8) << (2*8)) | ((__u32)(sizeof(struct icmp6hdr) + (__u32)sample_len) << (32 -(2 +1)*8) >> (32 -8) << (1*8)) | ((__u32)(sizeof(struct icmp6hdr) + (__u32)sample_len) << (32 -(3 +1)*8) >> (32 -8) << (0*8)))) : __builtin_bswap32(sizeof(struct icmp6hdr) + (__u32)sample_len));

 __bpf_memzero(pseudo_header.fields.zero, sizeof(pseudo_header.fields.zero));
 pseudo_header.fields.next_header = 58;

#pragma unroll
 for (i = 0; i < (int)(sizeof(pseudo_header.words) / sizeof(__u16)); i++)
  csum += pseudo_header.words[i];

 icmphdr->icmp6_cksum = csum_fold(csum);

 return 0;
}

__attribute__((section("tc" "/tail"), used)) __attribute__((btf_decl_tag("tail:cilium_calls/" "46")))
int tail_no_service_ipv6(struct __sk_buff *ctx)
{
 __u32 src_sec_identity = ctx_load_meta(ctx, CB_SRC_LABEL);
 struct ratelimit_key rkey = {
  .usage = 1,
 };

 struct ratelimit_settings settings = {
  .bucket_size = 1000,
  .tokens_per_topup = 100,
  .topup_interval_ns = (1000ULL * 1000ULL * 1000UL),
 };
 int ret;

 rkey.key.icmpv6.netdev_idx = ctx_get_ifindex(ctx);
 if (!ratelimit_check_and_take(&rkey, &settings)) {
  ret = -198;
  goto drop_err;
 }

 ret = __tail_no_service_ipv6(ctx);
 if (!ret) {

  cilium_dbg_capture(ctx, DBG_CAPTURE_DELIVERY,
       ctx_get_ifindex(ctx));
  ret = redirect_self(ctx);
 }

drop_err:
 if ((__builtin_expect(!!((ret < 0) || (ret == 2)), 0)))
  return _send_drop_notify((__u8)__id_for_file("lb.h"), 2311, ctx, src_sec_identity, 0, 0, ({ typeof(ret) __err = (ret); (__u8)(__err > 0 ? __err : -__err); }), 2, METRIC_INGRESS);


 return ret;
}






static inline __attribute__((always_inline))
__wsum icmp_wsum_accumulate(void *data_start, void *data_end, int sample_len)
{



 __wsum wsum = 0;
# 2353 "/var/lib/cilium/bpf/lib/lb.h"
 if ((0) > sample_len) return wsum; if (data_start + (0) + sizeof(__u16) > data_end) { if (data_start + (0) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (0)); return wsum; } wsum += *(__u16 *)(data_start + (0)); if ((0 + 2) > sample_len) return wsum; if (data_start + (0 + 2) + sizeof(__u16) > data_end) { if (data_start + (0 + 2) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (0 + 2)); return wsum; } wsum += *(__u16 *)(data_start + (0 + 2)); if ((0 + 4) > sample_len) return wsum; if (data_start + (0 + 4) + sizeof(__u16) > data_end) { if (data_start + (0 + 4) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (0 + 4)); return wsum; } wsum += *(__u16 *)(data_start + (0 + 4)); if ((0 + 6) > sample_len) return wsum; if (data_start + (0 + 6) + sizeof(__u16) > data_end) { if (data_start + (0 + 6) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (0 + 6)); return wsum; } wsum += *(__u16 *)(data_start + (0 + 6)); if ((0 + 8) > sample_len) return wsum; if (data_start + (0 + 8) + sizeof(__u16) > data_end) { if (data_start + (0 + 8) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (0 + 8)); return wsum; } wsum += *(__u16 *)(data_start + (0 + 8)); if ((0 + 8 + 2) > sample_len) return wsum; if (data_start + (0 + 8 + 2) + sizeof(__u16) > data_end) { if (data_start + (0 + 8 + 2) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (0 + 8 + 2)); return wsum; } wsum += *(__u16 *)(data_start + (0 + 8 + 2)); if ((0 + 8 + 4) > sample_len) return wsum; if (data_start + (0 + 8 + 4) + sizeof(__u16) > data_end) { if (data_start + (0 + 8 + 4) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (0 + 8 + 4)); return wsum; } wsum += *(__u16 *)(data_start + (0 + 8 + 4)); if ((0 + 8 + 6) > sample_len) return wsum; if (data_start + (0 + 8 + 6) + sizeof(__u16) > data_end) { if (data_start + (0 + 8 + 6) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (0 + 8 + 6)); return wsum; } wsum += *(__u16 *)(data_start + (0 + 8 + 6)); if ((0 + 16) > sample_len) return wsum; if (data_start + (0 + 16) + sizeof(__u16) > data_end) { if (data_start + (0 + 16) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (0 + 16)); return wsum; } wsum += *(__u16 *)(data_start + (0 + 16)); if ((0 + 16 + 2) > sample_len) return wsum; if (data_start + (0 + 16 + 2) + sizeof(__u16) > data_end) { if (data_start + (0 + 16 + 2) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (0 + 16 + 2)); return wsum; } wsum += *(__u16 *)(data_start + (0 + 16 + 2)); if ((0 + 16 + 4) > sample_len) return wsum; if (data_start + (0 + 16 + 4) + sizeof(__u16) > data_end) { if (data_start + (0 + 16 + 4) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (0 + 16 + 4)); return wsum; } wsum += *(__u16 *)(data_start + (0 + 16 + 4)); if ((0 + 16 + 6) > sample_len) return wsum; if (data_start + (0 + 16 + 6) + sizeof(__u16) > data_end) { if (data_start + (0 + 16 + 6) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (0 + 16 + 6)); return wsum; } wsum += *(__u16 *)(data_start + (0 + 16 + 6)); if ((0 + 24) > sample_len) return wsum; if (data_start + (0 + 24) + sizeof(__u16) > data_end) { if (data_start + (0 + 24) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (0 + 24)); return wsum; } wsum += *(__u16 *)(data_start + (0 + 24)); if ((0 + 24 + 2) > sample_len) return wsum; if (data_start + (0 + 24 + 2) + sizeof(__u16) > data_end) { if (data_start + (0 + 24 + 2) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (0 + 24 + 2)); return wsum; } wsum += *(__u16 *)(data_start + (0 + 24 + 2)); if ((0 + 24 + 4) > sample_len) return wsum; if (data_start + (0 + 24 + 4) + sizeof(__u16) > data_end) { if (data_start + (0 + 24 + 4) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (0 + 24 + 4)); return wsum; } wsum += *(__u16 *)(data_start + (0 + 24 + 4)); if ((0 + 24 + 6) > sample_len) return wsum; if (data_start + (0 + 24 + 6) + sizeof(__u16) > data_end) { if (data_start + (0 + 24 + 6) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (0 + 24 + 6)); return wsum; } wsum += *(__u16 *)(data_start + (0 + 24 + 6)); if ((0 + 32) > sample_len) return wsum; if (data_start + (0 + 32) + sizeof(__u16) > data_end) { if (data_start + (0 + 32) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (0 + 32)); return wsum; } wsum += *(__u16 *)(data_start + (0 + 32)); if ((0 + 32 + 2) > sample_len) return wsum; if (data_start + (0 + 32 + 2) + sizeof(__u16) > data_end) { if (data_start + (0 + 32 + 2) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (0 + 32 + 2)); return wsum; } wsum += *(__u16 *)(data_start + (0 + 32 + 2)); if ((0 + 32 + 4) > sample_len) return wsum; if (data_start + (0 + 32 + 4) + sizeof(__u16) > data_end) { if (data_start + (0 + 32 + 4) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (0 + 32 + 4)); return wsum; } wsum += *(__u16 *)(data_start + (0 + 32 + 4)); if ((0 + 32 + 6) > sample_len) return wsum; if (data_start + (0 + 32 + 6) + sizeof(__u16) > data_end) { if (data_start + (0 + 32 + 6) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (0 + 32 + 6)); return wsum; } wsum += *(__u16 *)(data_start + (0 + 32 + 6)); if ((0 + 32 + 8) > sample_len) return wsum; if (data_start + (0 + 32 + 8) + sizeof(__u16) > data_end) { if (data_start + (0 + 32 + 8) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (0 + 32 + 8)); return wsum; } wsum += *(__u16 *)(data_start + (0 + 32 + 8)); if ((0 + 32 + 8 + 2) > sample_len) return wsum; if (data_start + (0 + 32 + 8 + 2) + sizeof(__u16) > data_end) { if (data_start + (0 + 32 + 8 + 2) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (0 + 32 + 8 + 2)); return wsum; } wsum += *(__u16 *)(data_start + (0 + 32 + 8 + 2)); if ((0 + 32 + 8 + 4) > sample_len) return wsum; if (data_start + (0 + 32 + 8 + 4) + sizeof(__u16) > data_end) { if (data_start + (0 + 32 + 8 + 4) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (0 + 32 + 8 + 4)); return wsum; } wsum += *(__u16 *)(data_start + (0 + 32 + 8 + 4)); if ((0 + 32 + 8 + 6) > sample_len) return wsum; if (data_start + (0 + 32 + 8 + 6) + sizeof(__u16) > data_end) { if (data_start + (0 + 32 + 8 + 6) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (0 + 32 + 8 + 6)); return wsum; } wsum += *(__u16 *)(data_start + (0 + 32 + 8 + 6)); if ((0 + 32 + 16) > sample_len) return wsum; if (data_start + (0 + 32 + 16) + sizeof(__u16) > data_end) { if (data_start + (0 + 32 + 16) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (0 + 32 + 16)); return wsum; } wsum += *(__u16 *)(data_start + (0 + 32 + 16)); if ((0 + 32 + 16 + 2) > sample_len) return wsum; if (data_start + (0 + 32 + 16 + 2) + sizeof(__u16) > data_end) { if (data_start + (0 + 32 + 16 + 2) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (0 + 32 + 16 + 2)); return wsum; } wsum += *(__u16 *)(data_start + (0 + 32 + 16 + 2)); if ((0 + 32 + 16 + 4) > sample_len) return wsum; if (data_start + (0 + 32 + 16 + 4) + sizeof(__u16) > data_end) { if (data_start + (0 + 32 + 16 + 4) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (0 + 32 + 16 + 4)); return wsum; } wsum += *(__u16 *)(data_start + (0 + 32 + 16 + 4)); if ((0 + 32 + 16 + 6) > sample_len) return wsum; if (data_start + (0 + 32 + 16 + 6) + sizeof(__u16) > data_end) { if (data_start + (0 + 32 + 16 + 6) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (0 + 32 + 16 + 6)); return wsum; } wsum += *(__u16 *)(data_start + (0 + 32 + 16 + 6)); if ((0 + 32 + 24) > sample_len) return wsum; if (data_start + (0 + 32 + 24) + sizeof(__u16) > data_end) { if (data_start + (0 + 32 + 24) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (0 + 32 + 24)); return wsum; } wsum += *(__u16 *)(data_start + (0 + 32 + 24)); if ((0 + 32 + 24 + 2) > sample_len) return wsum; if (data_start + (0 + 32 + 24 + 2) + sizeof(__u16) > data_end) { if (data_start + (0 + 32 + 24 + 2) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (0 + 32 + 24 + 2)); return wsum; } wsum += *(__u16 *)(data_start + (0 + 32 + 24 + 2)); if ((0 + 32 + 24 + 4) > sample_len) return wsum; if (data_start + (0 + 32 + 24 + 4) + sizeof(__u16) > data_end) { if (data_start + (0 + 32 + 24 + 4) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (0 + 32 + 24 + 4)); return wsum; } wsum += *(__u16 *)(data_start + (0 + 32 + 24 + 4)); if ((0 + 32 + 24 + 6) > sample_len) return wsum; if (data_start + (0 + 32 + 24 + 6) + sizeof(__u16) > data_end) { if (data_start + (0 + 32 + 24 + 6) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (0 + 32 + 24 + 6)); return wsum; } wsum += *(__u16 *)(data_start + (0 + 32 + 24 + 6)); if ((0 + 64) > sample_len) return wsum; if (data_start + (0 + 64) + sizeof(__u16) > data_end) { if (data_start + (0 + 64) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (0 + 64)); return wsum; } wsum += *(__u16 *)(data_start + (0 + 64)); if ((0 + 64 + 2) > sample_len) return wsum; if (data_start + (0 + 64 + 2) + sizeof(__u16) > data_end) { if (data_start + (0 + 64 + 2) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (0 + 64 + 2)); return wsum; } wsum += *(__u16 *)(data_start + (0 + 64 + 2)); if ((0 + 64 + 4) > sample_len) return wsum; if (data_start + (0 + 64 + 4) + sizeof(__u16) > data_end) { if (data_start + (0 + 64 + 4) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (0 + 64 + 4)); return wsum; } wsum += *(__u16 *)(data_start + (0 + 64 + 4)); if ((0 + 64 + 6) > sample_len) return wsum; if (data_start + (0 + 64 + 6) + sizeof(__u16) > data_end) { if (data_start + (0 + 64 + 6) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (0 + 64 + 6)); return wsum; } wsum += *(__u16 *)(data_start + (0 + 64 + 6)); if ((0 + 64 + 8) > sample_len) return wsum; if (data_start + (0 + 64 + 8) + sizeof(__u16) > data_end) { if (data_start + (0 + 64 + 8) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (0 + 64 + 8)); return wsum; } wsum += *(__u16 *)(data_start + (0 + 64 + 8)); if ((0 + 64 + 8 + 2) > sample_len) return wsum; if (data_start + (0 + 64 + 8 + 2) + sizeof(__u16) > data_end) { if (data_start + (0 + 64 + 8 + 2) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (0 + 64 + 8 + 2)); return wsum; } wsum += *(__u16 *)(data_start + (0 + 64 + 8 + 2)); if ((0 + 64 + 8 + 4) > sample_len) return wsum; if (data_start + (0 + 64 + 8 + 4) + sizeof(__u16) > data_end) { if (data_start + (0 + 64 + 8 + 4) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (0 + 64 + 8 + 4)); return wsum; } wsum += *(__u16 *)(data_start + (0 + 64 + 8 + 4)); if ((0 + 64 + 8 + 6) > sample_len) return wsum; if (data_start + (0 + 64 + 8 + 6) + sizeof(__u16) > data_end) { if (data_start + (0 + 64 + 8 + 6) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (0 + 64 + 8 + 6)); return wsum; } wsum += *(__u16 *)(data_start + (0 + 64 + 8 + 6)); if ((0 + 64 + 16) > sample_len) return wsum; if (data_start + (0 + 64 + 16) + sizeof(__u16) > data_end) { if (data_start + (0 + 64 + 16) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (0 + 64 + 16)); return wsum; } wsum += *(__u16 *)(data_start + (0 + 64 + 16)); if ((0 + 64 + 16 + 2) > sample_len) return wsum; if (data_start + (0 + 64 + 16 + 2) + sizeof(__u16) > data_end) { if (data_start + (0 + 64 + 16 + 2) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (0 + 64 + 16 + 2)); return wsum; } wsum += *(__u16 *)(data_start + (0 + 64 + 16 + 2)); if ((0 + 64 + 16 + 4) > sample_len) return wsum; if (data_start + (0 + 64 + 16 + 4) + sizeof(__u16) > data_end) { if (data_start + (0 + 64 + 16 + 4) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (0 + 64 + 16 + 4)); return wsum; } wsum += *(__u16 *)(data_start + (0 + 64 + 16 + 4)); if ((0 + 64 + 16 + 6) > sample_len) return wsum; if (data_start + (0 + 64 + 16 + 6) + sizeof(__u16) > data_end) { if (data_start + (0 + 64 + 16 + 6) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (0 + 64 + 16 + 6)); return wsum; } wsum += *(__u16 *)(data_start + (0 + 64 + 16 + 6)); if ((0 + 64 + 24) > sample_len) return wsum; if (data_start + (0 + 64 + 24) + sizeof(__u16) > data_end) { if (data_start + (0 + 64 + 24) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (0 + 64 + 24)); return wsum; } wsum += *(__u16 *)(data_start + (0 + 64 + 24)); if ((0 + 64 + 24 + 2) > sample_len) return wsum; if (data_start + (0 + 64 + 24 + 2) + sizeof(__u16) > data_end) { if (data_start + (0 + 64 + 24 + 2) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (0 + 64 + 24 + 2)); return wsum; } wsum += *(__u16 *)(data_start + (0 + 64 + 24 + 2)); if ((0 + 64 + 24 + 4) > sample_len) return wsum; if (data_start + (0 + 64 + 24 + 4) + sizeof(__u16) > data_end) { if (data_start + (0 + 64 + 24 + 4) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (0 + 64 + 24 + 4)); return wsum; } wsum += *(__u16 *)(data_start + (0 + 64 + 24 + 4)); if ((0 + 64 + 24 + 6) > sample_len) return wsum; if (data_start + (0 + 64 + 24 + 6) + sizeof(__u16) > data_end) { if (data_start + (0 + 64 + 24 + 6) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (0 + 64 + 24 + 6)); return wsum; } wsum += *(__u16 *)(data_start + (0 + 64 + 24 + 6)); if ((0 + 96) > sample_len) return wsum; if (data_start + (0 + 96) + sizeof(__u16) > data_end) { if (data_start + (0 + 96) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (0 + 96)); return wsum; } wsum += *(__u16 *)(data_start + (0 + 96)); if ((0 + 96 + 2) > sample_len) return wsum; if (data_start + (0 + 96 + 2) + sizeof(__u16) > data_end) { if (data_start + (0 + 96 + 2) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (0 + 96 + 2)); return wsum; } wsum += *(__u16 *)(data_start + (0 + 96 + 2)); if ((0 + 96 + 4) > sample_len) return wsum; if (data_start + (0 + 96 + 4) + sizeof(__u16) > data_end) { if (data_start + (0 + 96 + 4) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (0 + 96 + 4)); return wsum; } wsum += *(__u16 *)(data_start + (0 + 96 + 4)); if ((0 + 96 + 6) > sample_len) return wsum; if (data_start + (0 + 96 + 6) + sizeof(__u16) > data_end) { if (data_start + (0 + 96 + 6) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (0 + 96 + 6)); return wsum; } wsum += *(__u16 *)(data_start + (0 + 96 + 6)); if ((0 + 96 + 8) > sample_len) return wsum; if (data_start + (0 + 96 + 8) + sizeof(__u16) > data_end) { if (data_start + (0 + 96 + 8) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (0 + 96 + 8)); return wsum; } wsum += *(__u16 *)(data_start + (0 + 96 + 8)); if ((0 + 96 + 8 + 2) > sample_len) return wsum; if (data_start + (0 + 96 + 8 + 2) + sizeof(__u16) > data_end) { if (data_start + (0 + 96 + 8 + 2) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (0 + 96 + 8 + 2)); return wsum; } wsum += *(__u16 *)(data_start + (0 + 96 + 8 + 2)); if ((0 + 96 + 8 + 4) > sample_len) return wsum; if (data_start + (0 + 96 + 8 + 4) + sizeof(__u16) > data_end) { if (data_start + (0 + 96 + 8 + 4) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (0 + 96 + 8 + 4)); return wsum; } wsum += *(__u16 *)(data_start + (0 + 96 + 8 + 4)); if ((0 + 96 + 8 + 6) > sample_len) return wsum; if (data_start + (0 + 96 + 8 + 6) + sizeof(__u16) > data_end) { if (data_start + (0 + 96 + 8 + 6) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (0 + 96 + 8 + 6)); return wsum; } wsum += *(__u16 *)(data_start + (0 + 96 + 8 + 6)); if ((0 + 96 + 16) > sample_len) return wsum; if (data_start + (0 + 96 + 16) + sizeof(__u16) > data_end) { if (data_start + (0 + 96 + 16) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (0 + 96 + 16)); return wsum; } wsum += *(__u16 *)(data_start + (0 + 96 + 16)); if ((0 + 96 + 16 + 2) > sample_len) return wsum; if (data_start + (0 + 96 + 16 + 2) + sizeof(__u16) > data_end) { if (data_start + (0 + 96 + 16 + 2) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (0 + 96 + 16 + 2)); return wsum; } wsum += *(__u16 *)(data_start + (0 + 96 + 16 + 2)); if ((0 + 96 + 16 + 4) > sample_len) return wsum; if (data_start + (0 + 96 + 16 + 4) + sizeof(__u16) > data_end) { if (data_start + (0 + 96 + 16 + 4) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (0 + 96 + 16 + 4)); return wsum; } wsum += *(__u16 *)(data_start + (0 + 96 + 16 + 4)); if ((0 + 96 + 16 + 6) > sample_len) return wsum; if (data_start + (0 + 96 + 16 + 6) + sizeof(__u16) > data_end) { if (data_start + (0 + 96 + 16 + 6) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (0 + 96 + 16 + 6)); return wsum; } wsum += *(__u16 *)(data_start + (0 + 96 + 16 + 6)); if ((0 + 96 + 24) > sample_len) return wsum; if (data_start + (0 + 96 + 24) + sizeof(__u16) > data_end) { if (data_start + (0 + 96 + 24) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (0 + 96 + 24)); return wsum; } wsum += *(__u16 *)(data_start + (0 + 96 + 24)); if ((0 + 96 + 24 + 2) > sample_len) return wsum; if (data_start + (0 + 96 + 24 + 2) + sizeof(__u16) > data_end) { if (data_start + (0 + 96 + 24 + 2) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (0 + 96 + 24 + 2)); return wsum; } wsum += *(__u16 *)(data_start + (0 + 96 + 24 + 2)); if ((0 + 96 + 24 + 4) > sample_len) return wsum; if (data_start + (0 + 96 + 24 + 4) + sizeof(__u16) > data_end) { if (data_start + (0 + 96 + 24 + 4) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (0 + 96 + 24 + 4)); return wsum; } wsum += *(__u16 *)(data_start + (0 + 96 + 24 + 4)); if ((0 + 96 + 24 + 6) > sample_len) return wsum; if (data_start + (0 + 96 + 24 + 6) + sizeof(__u16) > data_end) { if (data_start + (0 + 96 + 24 + 6) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (0 + 96 + 24 + 6)); return wsum; } wsum += *(__u16 *)(data_start + (0 + 96 + 24 + 6));
 if ((256) > sample_len) return wsum; if (data_start + (256) + sizeof(__u16) > data_end) { if (data_start + (256) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (256)); return wsum; } wsum += *(__u16 *)(data_start + (256)); if ((256 + 2) > sample_len) return wsum; if (data_start + (256 + 2) + sizeof(__u16) > data_end) { if (data_start + (256 + 2) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (256 + 2)); return wsum; } wsum += *(__u16 *)(data_start + (256 + 2)); if ((256 + 4) > sample_len) return wsum; if (data_start + (256 + 4) + sizeof(__u16) > data_end) { if (data_start + (256 + 4) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (256 + 4)); return wsum; } wsum += *(__u16 *)(data_start + (256 + 4)); if ((256 + 6) > sample_len) return wsum; if (data_start + (256 + 6) + sizeof(__u16) > data_end) { if (data_start + (256 + 6) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (256 + 6)); return wsum; } wsum += *(__u16 *)(data_start + (256 + 6)); if ((256 + 8) > sample_len) return wsum; if (data_start + (256 + 8) + sizeof(__u16) > data_end) { if (data_start + (256 + 8) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (256 + 8)); return wsum; } wsum += *(__u16 *)(data_start + (256 + 8)); if ((256 + 8 + 2) > sample_len) return wsum; if (data_start + (256 + 8 + 2) + sizeof(__u16) > data_end) { if (data_start + (256 + 8 + 2) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (256 + 8 + 2)); return wsum; } wsum += *(__u16 *)(data_start + (256 + 8 + 2)); if ((256 + 8 + 4) > sample_len) return wsum; if (data_start + (256 + 8 + 4) + sizeof(__u16) > data_end) { if (data_start + (256 + 8 + 4) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (256 + 8 + 4)); return wsum; } wsum += *(__u16 *)(data_start + (256 + 8 + 4)); if ((256 + 8 + 6) > sample_len) return wsum; if (data_start + (256 + 8 + 6) + sizeof(__u16) > data_end) { if (data_start + (256 + 8 + 6) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (256 + 8 + 6)); return wsum; } wsum += *(__u16 *)(data_start + (256 + 8 + 6)); if ((256 + 16) > sample_len) return wsum; if (data_start + (256 + 16) + sizeof(__u16) > data_end) { if (data_start + (256 + 16) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (256 + 16)); return wsum; } wsum += *(__u16 *)(data_start + (256 + 16)); if ((256 + 16 + 2) > sample_len) return wsum; if (data_start + (256 + 16 + 2) + sizeof(__u16) > data_end) { if (data_start + (256 + 16 + 2) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (256 + 16 + 2)); return wsum; } wsum += *(__u16 *)(data_start + (256 + 16 + 2)); if ((256 + 16 + 4) > sample_len) return wsum; if (data_start + (256 + 16 + 4) + sizeof(__u16) > data_end) { if (data_start + (256 + 16 + 4) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (256 + 16 + 4)); return wsum; } wsum += *(__u16 *)(data_start + (256 + 16 + 4)); if ((256 + 16 + 6) > sample_len) return wsum; if (data_start + (256 + 16 + 6) + sizeof(__u16) > data_end) { if (data_start + (256 + 16 + 6) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (256 + 16 + 6)); return wsum; } wsum += *(__u16 *)(data_start + (256 + 16 + 6)); if ((256 + 24) > sample_len) return wsum; if (data_start + (256 + 24) + sizeof(__u16) > data_end) { if (data_start + (256 + 24) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (256 + 24)); return wsum; } wsum += *(__u16 *)(data_start + (256 + 24)); if ((256 + 24 + 2) > sample_len) return wsum; if (data_start + (256 + 24 + 2) + sizeof(__u16) > data_end) { if (data_start + (256 + 24 + 2) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (256 + 24 + 2)); return wsum; } wsum += *(__u16 *)(data_start + (256 + 24 + 2)); if ((256 + 24 + 4) > sample_len) return wsum; if (data_start + (256 + 24 + 4) + sizeof(__u16) > data_end) { if (data_start + (256 + 24 + 4) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (256 + 24 + 4)); return wsum; } wsum += *(__u16 *)(data_start + (256 + 24 + 4)); if ((256 + 24 + 6) > sample_len) return wsum; if (data_start + (256 + 24 + 6) + sizeof(__u16) > data_end) { if (data_start + (256 + 24 + 6) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (256 + 24 + 6)); return wsum; } wsum += *(__u16 *)(data_start + (256 + 24 + 6)); if ((256 + 32) > sample_len) return wsum; if (data_start + (256 + 32) + sizeof(__u16) > data_end) { if (data_start + (256 + 32) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (256 + 32)); return wsum; } wsum += *(__u16 *)(data_start + (256 + 32)); if ((256 + 32 + 2) > sample_len) return wsum; if (data_start + (256 + 32 + 2) + sizeof(__u16) > data_end) { if (data_start + (256 + 32 + 2) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (256 + 32 + 2)); return wsum; } wsum += *(__u16 *)(data_start + (256 + 32 + 2)); if ((256 + 32 + 4) > sample_len) return wsum; if (data_start + (256 + 32 + 4) + sizeof(__u16) > data_end) { if (data_start + (256 + 32 + 4) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (256 + 32 + 4)); return wsum; } wsum += *(__u16 *)(data_start + (256 + 32 + 4)); if ((256 + 32 + 6) > sample_len) return wsum; if (data_start + (256 + 32 + 6) + sizeof(__u16) > data_end) { if (data_start + (256 + 32 + 6) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (256 + 32 + 6)); return wsum; } wsum += *(__u16 *)(data_start + (256 + 32 + 6)); if ((256 + 32 + 8) > sample_len) return wsum; if (data_start + (256 + 32 + 8) + sizeof(__u16) > data_end) { if (data_start + (256 + 32 + 8) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (256 + 32 + 8)); return wsum; } wsum += *(__u16 *)(data_start + (256 + 32 + 8)); if ((256 + 32 + 8 + 2) > sample_len) return wsum; if (data_start + (256 + 32 + 8 + 2) + sizeof(__u16) > data_end) { if (data_start + (256 + 32 + 8 + 2) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (256 + 32 + 8 + 2)); return wsum; } wsum += *(__u16 *)(data_start + (256 + 32 + 8 + 2)); if ((256 + 32 + 8 + 4) > sample_len) return wsum; if (data_start + (256 + 32 + 8 + 4) + sizeof(__u16) > data_end) { if (data_start + (256 + 32 + 8 + 4) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (256 + 32 + 8 + 4)); return wsum; } wsum += *(__u16 *)(data_start + (256 + 32 + 8 + 4)); if ((256 + 32 + 8 + 6) > sample_len) return wsum; if (data_start + (256 + 32 + 8 + 6) + sizeof(__u16) > data_end) { if (data_start + (256 + 32 + 8 + 6) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (256 + 32 + 8 + 6)); return wsum; } wsum += *(__u16 *)(data_start + (256 + 32 + 8 + 6)); if ((256 + 32 + 16) > sample_len) return wsum; if (data_start + (256 + 32 + 16) + sizeof(__u16) > data_end) { if (data_start + (256 + 32 + 16) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (256 + 32 + 16)); return wsum; } wsum += *(__u16 *)(data_start + (256 + 32 + 16)); if ((256 + 32 + 16 + 2) > sample_len) return wsum; if (data_start + (256 + 32 + 16 + 2) + sizeof(__u16) > data_end) { if (data_start + (256 + 32 + 16 + 2) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (256 + 32 + 16 + 2)); return wsum; } wsum += *(__u16 *)(data_start + (256 + 32 + 16 + 2)); if ((256 + 32 + 16 + 4) > sample_len) return wsum; if (data_start + (256 + 32 + 16 + 4) + sizeof(__u16) > data_end) { if (data_start + (256 + 32 + 16 + 4) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (256 + 32 + 16 + 4)); return wsum; } wsum += *(__u16 *)(data_start + (256 + 32 + 16 + 4)); if ((256 + 32 + 16 + 6) > sample_len) return wsum; if (data_start + (256 + 32 + 16 + 6) + sizeof(__u16) > data_end) { if (data_start + (256 + 32 + 16 + 6) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (256 + 32 + 16 + 6)); return wsum; } wsum += *(__u16 *)(data_start + (256 + 32 + 16 + 6)); if ((256 + 32 + 24) > sample_len) return wsum; if (data_start + (256 + 32 + 24) + sizeof(__u16) > data_end) { if (data_start + (256 + 32 + 24) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (256 + 32 + 24)); return wsum; } wsum += *(__u16 *)(data_start + (256 + 32 + 24)); if ((256 + 32 + 24 + 2) > sample_len) return wsum; if (data_start + (256 + 32 + 24 + 2) + sizeof(__u16) > data_end) { if (data_start + (256 + 32 + 24 + 2) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (256 + 32 + 24 + 2)); return wsum; } wsum += *(__u16 *)(data_start + (256 + 32 + 24 + 2)); if ((256 + 32 + 24 + 4) > sample_len) return wsum; if (data_start + (256 + 32 + 24 + 4) + sizeof(__u16) > data_end) { if (data_start + (256 + 32 + 24 + 4) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (256 + 32 + 24 + 4)); return wsum; } wsum += *(__u16 *)(data_start + (256 + 32 + 24 + 4)); if ((256 + 32 + 24 + 6) > sample_len) return wsum; if (data_start + (256 + 32 + 24 + 6) + sizeof(__u16) > data_end) { if (data_start + (256 + 32 + 24 + 6) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (256 + 32 + 24 + 6)); return wsum; } wsum += *(__u16 *)(data_start + (256 + 32 + 24 + 6)); if ((256 + 64) > sample_len) return wsum; if (data_start + (256 + 64) + sizeof(__u16) > data_end) { if (data_start + (256 + 64) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (256 + 64)); return wsum; } wsum += *(__u16 *)(data_start + (256 + 64)); if ((256 + 64 + 2) > sample_len) return wsum; if (data_start + (256 + 64 + 2) + sizeof(__u16) > data_end) { if (data_start + (256 + 64 + 2) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (256 + 64 + 2)); return wsum; } wsum += *(__u16 *)(data_start + (256 + 64 + 2)); if ((256 + 64 + 4) > sample_len) return wsum; if (data_start + (256 + 64 + 4) + sizeof(__u16) > data_end) { if (data_start + (256 + 64 + 4) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (256 + 64 + 4)); return wsum; } wsum += *(__u16 *)(data_start + (256 + 64 + 4)); if ((256 + 64 + 6) > sample_len) return wsum; if (data_start + (256 + 64 + 6) + sizeof(__u16) > data_end) { if (data_start + (256 + 64 + 6) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (256 + 64 + 6)); return wsum; } wsum += *(__u16 *)(data_start + (256 + 64 + 6)); if ((256 + 64 + 8) > sample_len) return wsum; if (data_start + (256 + 64 + 8) + sizeof(__u16) > data_end) { if (data_start + (256 + 64 + 8) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (256 + 64 + 8)); return wsum; } wsum += *(__u16 *)(data_start + (256 + 64 + 8)); if ((256 + 64 + 8 + 2) > sample_len) return wsum; if (data_start + (256 + 64 + 8 + 2) + sizeof(__u16) > data_end) { if (data_start + (256 + 64 + 8 + 2) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (256 + 64 + 8 + 2)); return wsum; } wsum += *(__u16 *)(data_start + (256 + 64 + 8 + 2)); if ((256 + 64 + 8 + 4) > sample_len) return wsum; if (data_start + (256 + 64 + 8 + 4) + sizeof(__u16) > data_end) { if (data_start + (256 + 64 + 8 + 4) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (256 + 64 + 8 + 4)); return wsum; } wsum += *(__u16 *)(data_start + (256 + 64 + 8 + 4)); if ((256 + 64 + 8 + 6) > sample_len) return wsum; if (data_start + (256 + 64 + 8 + 6) + sizeof(__u16) > data_end) { if (data_start + (256 + 64 + 8 + 6) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (256 + 64 + 8 + 6)); return wsum; } wsum += *(__u16 *)(data_start + (256 + 64 + 8 + 6)); if ((256 + 64 + 16) > sample_len) return wsum; if (data_start + (256 + 64 + 16) + sizeof(__u16) > data_end) { if (data_start + (256 + 64 + 16) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (256 + 64 + 16)); return wsum; } wsum += *(__u16 *)(data_start + (256 + 64 + 16)); if ((256 + 64 + 16 + 2) > sample_len) return wsum; if (data_start + (256 + 64 + 16 + 2) + sizeof(__u16) > data_end) { if (data_start + (256 + 64 + 16 + 2) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (256 + 64 + 16 + 2)); return wsum; } wsum += *(__u16 *)(data_start + (256 + 64 + 16 + 2)); if ((256 + 64 + 16 + 4) > sample_len) return wsum; if (data_start + (256 + 64 + 16 + 4) + sizeof(__u16) > data_end) { if (data_start + (256 + 64 + 16 + 4) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (256 + 64 + 16 + 4)); return wsum; } wsum += *(__u16 *)(data_start + (256 + 64 + 16 + 4)); if ((256 + 64 + 16 + 6) > sample_len) return wsum; if (data_start + (256 + 64 + 16 + 6) + sizeof(__u16) > data_end) { if (data_start + (256 + 64 + 16 + 6) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (256 + 64 + 16 + 6)); return wsum; } wsum += *(__u16 *)(data_start + (256 + 64 + 16 + 6)); if ((256 + 64 + 24) > sample_len) return wsum; if (data_start + (256 + 64 + 24) + sizeof(__u16) > data_end) { if (data_start + (256 + 64 + 24) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (256 + 64 + 24)); return wsum; } wsum += *(__u16 *)(data_start + (256 + 64 + 24)); if ((256 + 64 + 24 + 2) > sample_len) return wsum; if (data_start + (256 + 64 + 24 + 2) + sizeof(__u16) > data_end) { if (data_start + (256 + 64 + 24 + 2) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (256 + 64 + 24 + 2)); return wsum; } wsum += *(__u16 *)(data_start + (256 + 64 + 24 + 2)); if ((256 + 64 + 24 + 4) > sample_len) return wsum; if (data_start + (256 + 64 + 24 + 4) + sizeof(__u16) > data_end) { if (data_start + (256 + 64 + 24 + 4) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (256 + 64 + 24 + 4)); return wsum; } wsum += *(__u16 *)(data_start + (256 + 64 + 24 + 4)); if ((256 + 64 + 24 + 6) > sample_len) return wsum; if (data_start + (256 + 64 + 24 + 6) + sizeof(__u16) > data_end) { if (data_start + (256 + 64 + 24 + 6) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (256 + 64 + 24 + 6)); return wsum; } wsum += *(__u16 *)(data_start + (256 + 64 + 24 + 6)); if ((256 + 96) > sample_len) return wsum; if (data_start + (256 + 96) + sizeof(__u16) > data_end) { if (data_start + (256 + 96) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (256 + 96)); return wsum; } wsum += *(__u16 *)(data_start + (256 + 96)); if ((256 + 96 + 2) > sample_len) return wsum; if (data_start + (256 + 96 + 2) + sizeof(__u16) > data_end) { if (data_start + (256 + 96 + 2) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (256 + 96 + 2)); return wsum; } wsum += *(__u16 *)(data_start + (256 + 96 + 2)); if ((256 + 96 + 4) > sample_len) return wsum; if (data_start + (256 + 96 + 4) + sizeof(__u16) > data_end) { if (data_start + (256 + 96 + 4) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (256 + 96 + 4)); return wsum; } wsum += *(__u16 *)(data_start + (256 + 96 + 4)); if ((256 + 96 + 6) > sample_len) return wsum; if (data_start + (256 + 96 + 6) + sizeof(__u16) > data_end) { if (data_start + (256 + 96 + 6) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (256 + 96 + 6)); return wsum; } wsum += *(__u16 *)(data_start + (256 + 96 + 6)); if ((256 + 96 + 8) > sample_len) return wsum; if (data_start + (256 + 96 + 8) + sizeof(__u16) > data_end) { if (data_start + (256 + 96 + 8) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (256 + 96 + 8)); return wsum; } wsum += *(__u16 *)(data_start + (256 + 96 + 8)); if ((256 + 96 + 8 + 2) > sample_len) return wsum; if (data_start + (256 + 96 + 8 + 2) + sizeof(__u16) > data_end) { if (data_start + (256 + 96 + 8 + 2) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (256 + 96 + 8 + 2)); return wsum; } wsum += *(__u16 *)(data_start + (256 + 96 + 8 + 2)); if ((256 + 96 + 8 + 4) > sample_len) return wsum; if (data_start + (256 + 96 + 8 + 4) + sizeof(__u16) > data_end) { if (data_start + (256 + 96 + 8 + 4) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (256 + 96 + 8 + 4)); return wsum; } wsum += *(__u16 *)(data_start + (256 + 96 + 8 + 4)); if ((256 + 96 + 8 + 6) > sample_len) return wsum; if (data_start + (256 + 96 + 8 + 6) + sizeof(__u16) > data_end) { if (data_start + (256 + 96 + 8 + 6) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (256 + 96 + 8 + 6)); return wsum; } wsum += *(__u16 *)(data_start + (256 + 96 + 8 + 6)); if ((256 + 96 + 16) > sample_len) return wsum; if (data_start + (256 + 96 + 16) + sizeof(__u16) > data_end) { if (data_start + (256 + 96 + 16) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (256 + 96 + 16)); return wsum; } wsum += *(__u16 *)(data_start + (256 + 96 + 16)); if ((256 + 96 + 16 + 2) > sample_len) return wsum; if (data_start + (256 + 96 + 16 + 2) + sizeof(__u16) > data_end) { if (data_start + (256 + 96 + 16 + 2) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (256 + 96 + 16 + 2)); return wsum; } wsum += *(__u16 *)(data_start + (256 + 96 + 16 + 2)); if ((256 + 96 + 16 + 4) > sample_len) return wsum; if (data_start + (256 + 96 + 16 + 4) + sizeof(__u16) > data_end) { if (data_start + (256 + 96 + 16 + 4) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (256 + 96 + 16 + 4)); return wsum; } wsum += *(__u16 *)(data_start + (256 + 96 + 16 + 4)); if ((256 + 96 + 16 + 6) > sample_len) return wsum; if (data_start + (256 + 96 + 16 + 6) + sizeof(__u16) > data_end) { if (data_start + (256 + 96 + 16 + 6) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (256 + 96 + 16 + 6)); return wsum; } wsum += *(__u16 *)(data_start + (256 + 96 + 16 + 6)); if ((256 + 96 + 24) > sample_len) return wsum; if (data_start + (256 + 96 + 24) + sizeof(__u16) > data_end) { if (data_start + (256 + 96 + 24) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (256 + 96 + 24)); return wsum; } wsum += *(__u16 *)(data_start + (256 + 96 + 24)); if ((256 + 96 + 24 + 2) > sample_len) return wsum; if (data_start + (256 + 96 + 24 + 2) + sizeof(__u16) > data_end) { if (data_start + (256 + 96 + 24 + 2) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (256 + 96 + 24 + 2)); return wsum; } wsum += *(__u16 *)(data_start + (256 + 96 + 24 + 2)); if ((256 + 96 + 24 + 4) > sample_len) return wsum; if (data_start + (256 + 96 + 24 + 4) + sizeof(__u16) > data_end) { if (data_start + (256 + 96 + 24 + 4) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (256 + 96 + 24 + 4)); return wsum; } wsum += *(__u16 *)(data_start + (256 + 96 + 24 + 4)); if ((256 + 96 + 24 + 6) > sample_len) return wsum; if (data_start + (256 + 96 + 24 + 6) + sizeof(__u16) > data_end) { if (data_start + (256 + 96 + 24 + 6) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (256 + 96 + 24 + 6)); return wsum; } wsum += *(__u16 *)(data_start + (256 + 96 + 24 + 6));
 if ((512) > sample_len) return wsum; if (data_start + (512) + sizeof(__u16) > data_end) { if (data_start + (512) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (512)); return wsum; } wsum += *(__u16 *)(data_start + (512)); if ((512 + 2) > sample_len) return wsum; if (data_start + (512 + 2) + sizeof(__u16) > data_end) { if (data_start + (512 + 2) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (512 + 2)); return wsum; } wsum += *(__u16 *)(data_start + (512 + 2)); if ((512 + 4) > sample_len) return wsum; if (data_start + (512 + 4) + sizeof(__u16) > data_end) { if (data_start + (512 + 4) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (512 + 4)); return wsum; } wsum += *(__u16 *)(data_start + (512 + 4)); if ((512 + 6) > sample_len) return wsum; if (data_start + (512 + 6) + sizeof(__u16) > data_end) { if (data_start + (512 + 6) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (512 + 6)); return wsum; } wsum += *(__u16 *)(data_start + (512 + 6)); if ((512 + 8) > sample_len) return wsum; if (data_start + (512 + 8) + sizeof(__u16) > data_end) { if (data_start + (512 + 8) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (512 + 8)); return wsum; } wsum += *(__u16 *)(data_start + (512 + 8)); if ((512 + 8 + 2) > sample_len) return wsum; if (data_start + (512 + 8 + 2) + sizeof(__u16) > data_end) { if (data_start + (512 + 8 + 2) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (512 + 8 + 2)); return wsum; } wsum += *(__u16 *)(data_start + (512 + 8 + 2)); if ((512 + 8 + 4) > sample_len) return wsum; if (data_start + (512 + 8 + 4) + sizeof(__u16) > data_end) { if (data_start + (512 + 8 + 4) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (512 + 8 + 4)); return wsum; } wsum += *(__u16 *)(data_start + (512 + 8 + 4)); if ((512 + 8 + 6) > sample_len) return wsum; if (data_start + (512 + 8 + 6) + sizeof(__u16) > data_end) { if (data_start + (512 + 8 + 6) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (512 + 8 + 6)); return wsum; } wsum += *(__u16 *)(data_start + (512 + 8 + 6)); if ((512 + 16) > sample_len) return wsum; if (data_start + (512 + 16) + sizeof(__u16) > data_end) { if (data_start + (512 + 16) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (512 + 16)); return wsum; } wsum += *(__u16 *)(data_start + (512 + 16)); if ((512 + 16 + 2) > sample_len) return wsum; if (data_start + (512 + 16 + 2) + sizeof(__u16) > data_end) { if (data_start + (512 + 16 + 2) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (512 + 16 + 2)); return wsum; } wsum += *(__u16 *)(data_start + (512 + 16 + 2)); if ((512 + 16 + 4) > sample_len) return wsum; if (data_start + (512 + 16 + 4) + sizeof(__u16) > data_end) { if (data_start + (512 + 16 + 4) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (512 + 16 + 4)); return wsum; } wsum += *(__u16 *)(data_start + (512 + 16 + 4)); if ((512 + 16 + 6) > sample_len) return wsum; if (data_start + (512 + 16 + 6) + sizeof(__u16) > data_end) { if (data_start + (512 + 16 + 6) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (512 + 16 + 6)); return wsum; } wsum += *(__u16 *)(data_start + (512 + 16 + 6)); if ((512 + 24) > sample_len) return wsum; if (data_start + (512 + 24) + sizeof(__u16) > data_end) { if (data_start + (512 + 24) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (512 + 24)); return wsum; } wsum += *(__u16 *)(data_start + (512 + 24)); if ((512 + 24 + 2) > sample_len) return wsum; if (data_start + (512 + 24 + 2) + sizeof(__u16) > data_end) { if (data_start + (512 + 24 + 2) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (512 + 24 + 2)); return wsum; } wsum += *(__u16 *)(data_start + (512 + 24 + 2)); if ((512 + 24 + 4) > sample_len) return wsum; if (data_start + (512 + 24 + 4) + sizeof(__u16) > data_end) { if (data_start + (512 + 24 + 4) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (512 + 24 + 4)); return wsum; } wsum += *(__u16 *)(data_start + (512 + 24 + 4)); if ((512 + 24 + 6) > sample_len) return wsum; if (data_start + (512 + 24 + 6) + sizeof(__u16) > data_end) { if (data_start + (512 + 24 + 6) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (512 + 24 + 6)); return wsum; } wsum += *(__u16 *)(data_start + (512 + 24 + 6)); if ((512 + 32) > sample_len) return wsum; if (data_start + (512 + 32) + sizeof(__u16) > data_end) { if (data_start + (512 + 32) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (512 + 32)); return wsum; } wsum += *(__u16 *)(data_start + (512 + 32)); if ((512 + 32 + 2) > sample_len) return wsum; if (data_start + (512 + 32 + 2) + sizeof(__u16) > data_end) { if (data_start + (512 + 32 + 2) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (512 + 32 + 2)); return wsum; } wsum += *(__u16 *)(data_start + (512 + 32 + 2)); if ((512 + 32 + 4) > sample_len) return wsum; if (data_start + (512 + 32 + 4) + sizeof(__u16) > data_end) { if (data_start + (512 + 32 + 4) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (512 + 32 + 4)); return wsum; } wsum += *(__u16 *)(data_start + (512 + 32 + 4)); if ((512 + 32 + 6) > sample_len) return wsum; if (data_start + (512 + 32 + 6) + sizeof(__u16) > data_end) { if (data_start + (512 + 32 + 6) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (512 + 32 + 6)); return wsum; } wsum += *(__u16 *)(data_start + (512 + 32 + 6)); if ((512 + 32 + 8) > sample_len) return wsum; if (data_start + (512 + 32 + 8) + sizeof(__u16) > data_end) { if (data_start + (512 + 32 + 8) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (512 + 32 + 8)); return wsum; } wsum += *(__u16 *)(data_start + (512 + 32 + 8)); if ((512 + 32 + 8 + 2) > sample_len) return wsum; if (data_start + (512 + 32 + 8 + 2) + sizeof(__u16) > data_end) { if (data_start + (512 + 32 + 8 + 2) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (512 + 32 + 8 + 2)); return wsum; } wsum += *(__u16 *)(data_start + (512 + 32 + 8 + 2)); if ((512 + 32 + 8 + 4) > sample_len) return wsum; if (data_start + (512 + 32 + 8 + 4) + sizeof(__u16) > data_end) { if (data_start + (512 + 32 + 8 + 4) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (512 + 32 + 8 + 4)); return wsum; } wsum += *(__u16 *)(data_start + (512 + 32 + 8 + 4)); if ((512 + 32 + 8 + 6) > sample_len) return wsum; if (data_start + (512 + 32 + 8 + 6) + sizeof(__u16) > data_end) { if (data_start + (512 + 32 + 8 + 6) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (512 + 32 + 8 + 6)); return wsum; } wsum += *(__u16 *)(data_start + (512 + 32 + 8 + 6)); if ((512 + 32 + 16) > sample_len) return wsum; if (data_start + (512 + 32 + 16) + sizeof(__u16) > data_end) { if (data_start + (512 + 32 + 16) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (512 + 32 + 16)); return wsum; } wsum += *(__u16 *)(data_start + (512 + 32 + 16)); if ((512 + 32 + 16 + 2) > sample_len) return wsum; if (data_start + (512 + 32 + 16 + 2) + sizeof(__u16) > data_end) { if (data_start + (512 + 32 + 16 + 2) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (512 + 32 + 16 + 2)); return wsum; } wsum += *(__u16 *)(data_start + (512 + 32 + 16 + 2)); if ((512 + 32 + 16 + 4) > sample_len) return wsum; if (data_start + (512 + 32 + 16 + 4) + sizeof(__u16) > data_end) { if (data_start + (512 + 32 + 16 + 4) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (512 + 32 + 16 + 4)); return wsum; } wsum += *(__u16 *)(data_start + (512 + 32 + 16 + 4)); if ((512 + 32 + 16 + 6) > sample_len) return wsum; if (data_start + (512 + 32 + 16 + 6) + sizeof(__u16) > data_end) { if (data_start + (512 + 32 + 16 + 6) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (512 + 32 + 16 + 6)); return wsum; } wsum += *(__u16 *)(data_start + (512 + 32 + 16 + 6)); if ((512 + 32 + 24) > sample_len) return wsum; if (data_start + (512 + 32 + 24) + sizeof(__u16) > data_end) { if (data_start + (512 + 32 + 24) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (512 + 32 + 24)); return wsum; } wsum += *(__u16 *)(data_start + (512 + 32 + 24)); if ((512 + 32 + 24 + 2) > sample_len) return wsum; if (data_start + (512 + 32 + 24 + 2) + sizeof(__u16) > data_end) { if (data_start + (512 + 32 + 24 + 2) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (512 + 32 + 24 + 2)); return wsum; } wsum += *(__u16 *)(data_start + (512 + 32 + 24 + 2)); if ((512 + 32 + 24 + 4) > sample_len) return wsum; if (data_start + (512 + 32 + 24 + 4) + sizeof(__u16) > data_end) { if (data_start + (512 + 32 + 24 + 4) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (512 + 32 + 24 + 4)); return wsum; } wsum += *(__u16 *)(data_start + (512 + 32 + 24 + 4)); if ((512 + 32 + 24 + 6) > sample_len) return wsum; if (data_start + (512 + 32 + 24 + 6) + sizeof(__u16) > data_end) { if (data_start + (512 + 32 + 24 + 6) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (512 + 32 + 24 + 6)); return wsum; } wsum += *(__u16 *)(data_start + (512 + 32 + 24 + 6)); if ((512 + 64) > sample_len) return wsum; if (data_start + (512 + 64) + sizeof(__u16) > data_end) { if (data_start + (512 + 64) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (512 + 64)); return wsum; } wsum += *(__u16 *)(data_start + (512 + 64)); if ((512 + 64 + 2) > sample_len) return wsum; if (data_start + (512 + 64 + 2) + sizeof(__u16) > data_end) { if (data_start + (512 + 64 + 2) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (512 + 64 + 2)); return wsum; } wsum += *(__u16 *)(data_start + (512 + 64 + 2)); if ((512 + 64 + 4) > sample_len) return wsum; if (data_start + (512 + 64 + 4) + sizeof(__u16) > data_end) { if (data_start + (512 + 64 + 4) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (512 + 64 + 4)); return wsum; } wsum += *(__u16 *)(data_start + (512 + 64 + 4)); if ((512 + 64 + 6) > sample_len) return wsum; if (data_start + (512 + 64 + 6) + sizeof(__u16) > data_end) { if (data_start + (512 + 64 + 6) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (512 + 64 + 6)); return wsum; } wsum += *(__u16 *)(data_start + (512 + 64 + 6)); if ((512 + 64 + 8) > sample_len) return wsum; if (data_start + (512 + 64 + 8) + sizeof(__u16) > data_end) { if (data_start + (512 + 64 + 8) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (512 + 64 + 8)); return wsum; } wsum += *(__u16 *)(data_start + (512 + 64 + 8)); if ((512 + 64 + 8 + 2) > sample_len) return wsum; if (data_start + (512 + 64 + 8 + 2) + sizeof(__u16) > data_end) { if (data_start + (512 + 64 + 8 + 2) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (512 + 64 + 8 + 2)); return wsum; } wsum += *(__u16 *)(data_start + (512 + 64 + 8 + 2)); if ((512 + 64 + 8 + 4) > sample_len) return wsum; if (data_start + (512 + 64 + 8 + 4) + sizeof(__u16) > data_end) { if (data_start + (512 + 64 + 8 + 4) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (512 + 64 + 8 + 4)); return wsum; } wsum += *(__u16 *)(data_start + (512 + 64 + 8 + 4)); if ((512 + 64 + 8 + 6) > sample_len) return wsum; if (data_start + (512 + 64 + 8 + 6) + sizeof(__u16) > data_end) { if (data_start + (512 + 64 + 8 + 6) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (512 + 64 + 8 + 6)); return wsum; } wsum += *(__u16 *)(data_start + (512 + 64 + 8 + 6)); if ((512 + 64 + 16) > sample_len) return wsum; if (data_start + (512 + 64 + 16) + sizeof(__u16) > data_end) { if (data_start + (512 + 64 + 16) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (512 + 64 + 16)); return wsum; } wsum += *(__u16 *)(data_start + (512 + 64 + 16)); if ((512 + 64 + 16 + 2) > sample_len) return wsum; if (data_start + (512 + 64 + 16 + 2) + sizeof(__u16) > data_end) { if (data_start + (512 + 64 + 16 + 2) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (512 + 64 + 16 + 2)); return wsum; } wsum += *(__u16 *)(data_start + (512 + 64 + 16 + 2)); if ((512 + 64 + 16 + 4) > sample_len) return wsum; if (data_start + (512 + 64 + 16 + 4) + sizeof(__u16) > data_end) { if (data_start + (512 + 64 + 16 + 4) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (512 + 64 + 16 + 4)); return wsum; } wsum += *(__u16 *)(data_start + (512 + 64 + 16 + 4)); if ((512 + 64 + 16 + 6) > sample_len) return wsum; if (data_start + (512 + 64 + 16 + 6) + sizeof(__u16) > data_end) { if (data_start + (512 + 64 + 16 + 6) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (512 + 64 + 16 + 6)); return wsum; } wsum += *(__u16 *)(data_start + (512 + 64 + 16 + 6)); if ((512 + 64 + 24) > sample_len) return wsum; if (data_start + (512 + 64 + 24) + sizeof(__u16) > data_end) { if (data_start + (512 + 64 + 24) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (512 + 64 + 24)); return wsum; } wsum += *(__u16 *)(data_start + (512 + 64 + 24)); if ((512 + 64 + 24 + 2) > sample_len) return wsum; if (data_start + (512 + 64 + 24 + 2) + sizeof(__u16) > data_end) { if (data_start + (512 + 64 + 24 + 2) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (512 + 64 + 24 + 2)); return wsum; } wsum += *(__u16 *)(data_start + (512 + 64 + 24 + 2)); if ((512 + 64 + 24 + 4) > sample_len) return wsum; if (data_start + (512 + 64 + 24 + 4) + sizeof(__u16) > data_end) { if (data_start + (512 + 64 + 24 + 4) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (512 + 64 + 24 + 4)); return wsum; } wsum += *(__u16 *)(data_start + (512 + 64 + 24 + 4)); if ((512 + 64 + 24 + 6) > sample_len) return wsum; if (data_start + (512 + 64 + 24 + 6) + sizeof(__u16) > data_end) { if (data_start + (512 + 64 + 24 + 6) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (512 + 64 + 24 + 6)); return wsum; } wsum += *(__u16 *)(data_start + (512 + 64 + 24 + 6)); if ((512 + 96) > sample_len) return wsum; if (data_start + (512 + 96) + sizeof(__u16) > data_end) { if (data_start + (512 + 96) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (512 + 96)); return wsum; } wsum += *(__u16 *)(data_start + (512 + 96)); if ((512 + 96 + 2) > sample_len) return wsum; if (data_start + (512 + 96 + 2) + sizeof(__u16) > data_end) { if (data_start + (512 + 96 + 2) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (512 + 96 + 2)); return wsum; } wsum += *(__u16 *)(data_start + (512 + 96 + 2)); if ((512 + 96 + 4) > sample_len) return wsum; if (data_start + (512 + 96 + 4) + sizeof(__u16) > data_end) { if (data_start + (512 + 96 + 4) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (512 + 96 + 4)); return wsum; } wsum += *(__u16 *)(data_start + (512 + 96 + 4)); if ((512 + 96 + 6) > sample_len) return wsum; if (data_start + (512 + 96 + 6) + sizeof(__u16) > data_end) { if (data_start + (512 + 96 + 6) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (512 + 96 + 6)); return wsum; } wsum += *(__u16 *)(data_start + (512 + 96 + 6)); if ((512 + 96 + 8) > sample_len) return wsum; if (data_start + (512 + 96 + 8) + sizeof(__u16) > data_end) { if (data_start + (512 + 96 + 8) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (512 + 96 + 8)); return wsum; } wsum += *(__u16 *)(data_start + (512 + 96 + 8)); if ((512 + 96 + 8 + 2) > sample_len) return wsum; if (data_start + (512 + 96 + 8 + 2) + sizeof(__u16) > data_end) { if (data_start + (512 + 96 + 8 + 2) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (512 + 96 + 8 + 2)); return wsum; } wsum += *(__u16 *)(data_start + (512 + 96 + 8 + 2)); if ((512 + 96 + 8 + 4) > sample_len) return wsum; if (data_start + (512 + 96 + 8 + 4) + sizeof(__u16) > data_end) { if (data_start + (512 + 96 + 8 + 4) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (512 + 96 + 8 + 4)); return wsum; } wsum += *(__u16 *)(data_start + (512 + 96 + 8 + 4)); if ((512 + 96 + 8 + 6) > sample_len) return wsum; if (data_start + (512 + 96 + 8 + 6) + sizeof(__u16) > data_end) { if (data_start + (512 + 96 + 8 + 6) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (512 + 96 + 8 + 6)); return wsum; } wsum += *(__u16 *)(data_start + (512 + 96 + 8 + 6)); if ((512 + 96 + 16) > sample_len) return wsum; if (data_start + (512 + 96 + 16) + sizeof(__u16) > data_end) { if (data_start + (512 + 96 + 16) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (512 + 96 + 16)); return wsum; } wsum += *(__u16 *)(data_start + (512 + 96 + 16)); if ((512 + 96 + 16 + 2) > sample_len) return wsum; if (data_start + (512 + 96 + 16 + 2) + sizeof(__u16) > data_end) { if (data_start + (512 + 96 + 16 + 2) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (512 + 96 + 16 + 2)); return wsum; } wsum += *(__u16 *)(data_start + (512 + 96 + 16 + 2)); if ((512 + 96 + 16 + 4) > sample_len) return wsum; if (data_start + (512 + 96 + 16 + 4) + sizeof(__u16) > data_end) { if (data_start + (512 + 96 + 16 + 4) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (512 + 96 + 16 + 4)); return wsum; } wsum += *(__u16 *)(data_start + (512 + 96 + 16 + 4)); if ((512 + 96 + 16 + 6) > sample_len) return wsum; if (data_start + (512 + 96 + 16 + 6) + sizeof(__u16) > data_end) { if (data_start + (512 + 96 + 16 + 6) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (512 + 96 + 16 + 6)); return wsum; } wsum += *(__u16 *)(data_start + (512 + 96 + 16 + 6)); if ((512 + 96 + 24) > sample_len) return wsum; if (data_start + (512 + 96 + 24) + sizeof(__u16) > data_end) { if (data_start + (512 + 96 + 24) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (512 + 96 + 24)); return wsum; } wsum += *(__u16 *)(data_start + (512 + 96 + 24)); if ((512 + 96 + 24 + 2) > sample_len) return wsum; if (data_start + (512 + 96 + 24 + 2) + sizeof(__u16) > data_end) { if (data_start + (512 + 96 + 24 + 2) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (512 + 96 + 24 + 2)); return wsum; } wsum += *(__u16 *)(data_start + (512 + 96 + 24 + 2)); if ((512 + 96 + 24 + 4) > sample_len) return wsum; if (data_start + (512 + 96 + 24 + 4) + sizeof(__u16) > data_end) { if (data_start + (512 + 96 + 24 + 4) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (512 + 96 + 24 + 4)); return wsum; } wsum += *(__u16 *)(data_start + (512 + 96 + 24 + 4)); if ((512 + 96 + 24 + 6) > sample_len) return wsum; if (data_start + (512 + 96 + 24 + 6) + sizeof(__u16) > data_end) { if (data_start + (512 + 96 + 24 + 6) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (512 + 96 + 24 + 6)); return wsum; } wsum += *(__u16 *)(data_start + (512 + 96 + 24 + 6));
 if ((768) > sample_len) return wsum; if (data_start + (768) + sizeof(__u16) > data_end) { if (data_start + (768) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (768)); return wsum; } wsum += *(__u16 *)(data_start + (768)); if ((768 + 2) > sample_len) return wsum; if (data_start + (768 + 2) + sizeof(__u16) > data_end) { if (data_start + (768 + 2) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (768 + 2)); return wsum; } wsum += *(__u16 *)(data_start + (768 + 2)); if ((768 + 4) > sample_len) return wsum; if (data_start + (768 + 4) + sizeof(__u16) > data_end) { if (data_start + (768 + 4) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (768 + 4)); return wsum; } wsum += *(__u16 *)(data_start + (768 + 4)); if ((768 + 6) > sample_len) return wsum; if (data_start + (768 + 6) + sizeof(__u16) > data_end) { if (data_start + (768 + 6) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (768 + 6)); return wsum; } wsum += *(__u16 *)(data_start + (768 + 6)); if ((768 + 8) > sample_len) return wsum; if (data_start + (768 + 8) + sizeof(__u16) > data_end) { if (data_start + (768 + 8) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (768 + 8)); return wsum; } wsum += *(__u16 *)(data_start + (768 + 8)); if ((768 + 8 + 2) > sample_len) return wsum; if (data_start + (768 + 8 + 2) + sizeof(__u16) > data_end) { if (data_start + (768 + 8 + 2) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (768 + 8 + 2)); return wsum; } wsum += *(__u16 *)(data_start + (768 + 8 + 2)); if ((768 + 8 + 4) > sample_len) return wsum; if (data_start + (768 + 8 + 4) + sizeof(__u16) > data_end) { if (data_start + (768 + 8 + 4) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (768 + 8 + 4)); return wsum; } wsum += *(__u16 *)(data_start + (768 + 8 + 4)); if ((768 + 8 + 6) > sample_len) return wsum; if (data_start + (768 + 8 + 6) + sizeof(__u16) > data_end) { if (data_start + (768 + 8 + 6) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (768 + 8 + 6)); return wsum; } wsum += *(__u16 *)(data_start + (768 + 8 + 6)); if ((768 + 16) > sample_len) return wsum; if (data_start + (768 + 16) + sizeof(__u16) > data_end) { if (data_start + (768 + 16) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (768 + 16)); return wsum; } wsum += *(__u16 *)(data_start + (768 + 16)); if ((768 + 16 + 2) > sample_len) return wsum; if (data_start + (768 + 16 + 2) + sizeof(__u16) > data_end) { if (data_start + (768 + 16 + 2) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (768 + 16 + 2)); return wsum; } wsum += *(__u16 *)(data_start + (768 + 16 + 2)); if ((768 + 16 + 4) > sample_len) return wsum; if (data_start + (768 + 16 + 4) + sizeof(__u16) > data_end) { if (data_start + (768 + 16 + 4) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (768 + 16 + 4)); return wsum; } wsum += *(__u16 *)(data_start + (768 + 16 + 4)); if ((768 + 16 + 6) > sample_len) return wsum; if (data_start + (768 + 16 + 6) + sizeof(__u16) > data_end) { if (data_start + (768 + 16 + 6) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (768 + 16 + 6)); return wsum; } wsum += *(__u16 *)(data_start + (768 + 16 + 6)); if ((768 + 24) > sample_len) return wsum; if (data_start + (768 + 24) + sizeof(__u16) > data_end) { if (data_start + (768 + 24) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (768 + 24)); return wsum; } wsum += *(__u16 *)(data_start + (768 + 24)); if ((768 + 24 + 2) > sample_len) return wsum; if (data_start + (768 + 24 + 2) + sizeof(__u16) > data_end) { if (data_start + (768 + 24 + 2) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (768 + 24 + 2)); return wsum; } wsum += *(__u16 *)(data_start + (768 + 24 + 2)); if ((768 + 24 + 4) > sample_len) return wsum; if (data_start + (768 + 24 + 4) + sizeof(__u16) > data_end) { if (data_start + (768 + 24 + 4) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (768 + 24 + 4)); return wsum; } wsum += *(__u16 *)(data_start + (768 + 24 + 4)); if ((768 + 24 + 6) > sample_len) return wsum; if (data_start + (768 + 24 + 6) + sizeof(__u16) > data_end) { if (data_start + (768 + 24 + 6) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (768 + 24 + 6)); return wsum; } wsum += *(__u16 *)(data_start + (768 + 24 + 6)); if ((768 + 32) > sample_len) return wsum; if (data_start + (768 + 32) + sizeof(__u16) > data_end) { if (data_start + (768 + 32) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (768 + 32)); return wsum; } wsum += *(__u16 *)(data_start + (768 + 32)); if ((768 + 32 + 2) > sample_len) return wsum; if (data_start + (768 + 32 + 2) + sizeof(__u16) > data_end) { if (data_start + (768 + 32 + 2) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (768 + 32 + 2)); return wsum; } wsum += *(__u16 *)(data_start + (768 + 32 + 2)); if ((768 + 32 + 4) > sample_len) return wsum; if (data_start + (768 + 32 + 4) + sizeof(__u16) > data_end) { if (data_start + (768 + 32 + 4) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (768 + 32 + 4)); return wsum; } wsum += *(__u16 *)(data_start + (768 + 32 + 4)); if ((768 + 32 + 6) > sample_len) return wsum; if (data_start + (768 + 32 + 6) + sizeof(__u16) > data_end) { if (data_start + (768 + 32 + 6) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (768 + 32 + 6)); return wsum; } wsum += *(__u16 *)(data_start + (768 + 32 + 6)); if ((768 + 32 + 8) > sample_len) return wsum; if (data_start + (768 + 32 + 8) + sizeof(__u16) > data_end) { if (data_start + (768 + 32 + 8) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (768 + 32 + 8)); return wsum; } wsum += *(__u16 *)(data_start + (768 + 32 + 8)); if ((768 + 32 + 8 + 2) > sample_len) return wsum; if (data_start + (768 + 32 + 8 + 2) + sizeof(__u16) > data_end) { if (data_start + (768 + 32 + 8 + 2) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (768 + 32 + 8 + 2)); return wsum; } wsum += *(__u16 *)(data_start + (768 + 32 + 8 + 2)); if ((768 + 32 + 8 + 4) > sample_len) return wsum; if (data_start + (768 + 32 + 8 + 4) + sizeof(__u16) > data_end) { if (data_start + (768 + 32 + 8 + 4) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (768 + 32 + 8 + 4)); return wsum; } wsum += *(__u16 *)(data_start + (768 + 32 + 8 + 4)); if ((768 + 32 + 8 + 6) > sample_len) return wsum; if (data_start + (768 + 32 + 8 + 6) + sizeof(__u16) > data_end) { if (data_start + (768 + 32 + 8 + 6) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (768 + 32 + 8 + 6)); return wsum; } wsum += *(__u16 *)(data_start + (768 + 32 + 8 + 6)); if ((768 + 32 + 16) > sample_len) return wsum; if (data_start + (768 + 32 + 16) + sizeof(__u16) > data_end) { if (data_start + (768 + 32 + 16) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (768 + 32 + 16)); return wsum; } wsum += *(__u16 *)(data_start + (768 + 32 + 16)); if ((768 + 32 + 16 + 2) > sample_len) return wsum; if (data_start + (768 + 32 + 16 + 2) + sizeof(__u16) > data_end) { if (data_start + (768 + 32 + 16 + 2) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (768 + 32 + 16 + 2)); return wsum; } wsum += *(__u16 *)(data_start + (768 + 32 + 16 + 2)); if ((768 + 32 + 16 + 4) > sample_len) return wsum; if (data_start + (768 + 32 + 16 + 4) + sizeof(__u16) > data_end) { if (data_start + (768 + 32 + 16 + 4) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (768 + 32 + 16 + 4)); return wsum; } wsum += *(__u16 *)(data_start + (768 + 32 + 16 + 4)); if ((768 + 32 + 16 + 6) > sample_len) return wsum; if (data_start + (768 + 32 + 16 + 6) + sizeof(__u16) > data_end) { if (data_start + (768 + 32 + 16 + 6) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (768 + 32 + 16 + 6)); return wsum; } wsum += *(__u16 *)(data_start + (768 + 32 + 16 + 6)); if ((768 + 32 + 24) > sample_len) return wsum; if (data_start + (768 + 32 + 24) + sizeof(__u16) > data_end) { if (data_start + (768 + 32 + 24) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (768 + 32 + 24)); return wsum; } wsum += *(__u16 *)(data_start + (768 + 32 + 24)); if ((768 + 32 + 24 + 2) > sample_len) return wsum; if (data_start + (768 + 32 + 24 + 2) + sizeof(__u16) > data_end) { if (data_start + (768 + 32 + 24 + 2) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (768 + 32 + 24 + 2)); return wsum; } wsum += *(__u16 *)(data_start + (768 + 32 + 24 + 2)); if ((768 + 32 + 24 + 4) > sample_len) return wsum; if (data_start + (768 + 32 + 24 + 4) + sizeof(__u16) > data_end) { if (data_start + (768 + 32 + 24 + 4) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (768 + 32 + 24 + 4)); return wsum; } wsum += *(__u16 *)(data_start + (768 + 32 + 24 + 4)); if ((768 + 32 + 24 + 6) > sample_len) return wsum; if (data_start + (768 + 32 + 24 + 6) + sizeof(__u16) > data_end) { if (data_start + (768 + 32 + 24 + 6) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (768 + 32 + 24 + 6)); return wsum; } wsum += *(__u16 *)(data_start + (768 + 32 + 24 + 6)); if ((768 + 64) > sample_len) return wsum; if (data_start + (768 + 64) + sizeof(__u16) > data_end) { if (data_start + (768 + 64) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (768 + 64)); return wsum; } wsum += *(__u16 *)(data_start + (768 + 64)); if ((768 + 64 + 2) > sample_len) return wsum; if (data_start + (768 + 64 + 2) + sizeof(__u16) > data_end) { if (data_start + (768 + 64 + 2) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (768 + 64 + 2)); return wsum; } wsum += *(__u16 *)(data_start + (768 + 64 + 2)); if ((768 + 64 + 4) > sample_len) return wsum; if (data_start + (768 + 64 + 4) + sizeof(__u16) > data_end) { if (data_start + (768 + 64 + 4) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (768 + 64 + 4)); return wsum; } wsum += *(__u16 *)(data_start + (768 + 64 + 4)); if ((768 + 64 + 6) > sample_len) return wsum; if (data_start + (768 + 64 + 6) + sizeof(__u16) > data_end) { if (data_start + (768 + 64 + 6) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (768 + 64 + 6)); return wsum; } wsum += *(__u16 *)(data_start + (768 + 64 + 6)); if ((768 + 64 + 8) > sample_len) return wsum; if (data_start + (768 + 64 + 8) + sizeof(__u16) > data_end) { if (data_start + (768 + 64 + 8) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (768 + 64 + 8)); return wsum; } wsum += *(__u16 *)(data_start + (768 + 64 + 8)); if ((768 + 64 + 8 + 2) > sample_len) return wsum; if (data_start + (768 + 64 + 8 + 2) + sizeof(__u16) > data_end) { if (data_start + (768 + 64 + 8 + 2) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (768 + 64 + 8 + 2)); return wsum; } wsum += *(__u16 *)(data_start + (768 + 64 + 8 + 2)); if ((768 + 64 + 8 + 4) > sample_len) return wsum; if (data_start + (768 + 64 + 8 + 4) + sizeof(__u16) > data_end) { if (data_start + (768 + 64 + 8 + 4) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (768 + 64 + 8 + 4)); return wsum; } wsum += *(__u16 *)(data_start + (768 + 64 + 8 + 4)); if ((768 + 64 + 8 + 6) > sample_len) return wsum; if (data_start + (768 + 64 + 8 + 6) + sizeof(__u16) > data_end) { if (data_start + (768 + 64 + 8 + 6) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (768 + 64 + 8 + 6)); return wsum; } wsum += *(__u16 *)(data_start + (768 + 64 + 8 + 6)); if ((768 + 64 + 16) > sample_len) return wsum; if (data_start + (768 + 64 + 16) + sizeof(__u16) > data_end) { if (data_start + (768 + 64 + 16) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (768 + 64 + 16)); return wsum; } wsum += *(__u16 *)(data_start + (768 + 64 + 16)); if ((768 + 64 + 16 + 2) > sample_len) return wsum; if (data_start + (768 + 64 + 16 + 2) + sizeof(__u16) > data_end) { if (data_start + (768 + 64 + 16 + 2) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (768 + 64 + 16 + 2)); return wsum; } wsum += *(__u16 *)(data_start + (768 + 64 + 16 + 2)); if ((768 + 64 + 16 + 4) > sample_len) return wsum; if (data_start + (768 + 64 + 16 + 4) + sizeof(__u16) > data_end) { if (data_start + (768 + 64 + 16 + 4) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (768 + 64 + 16 + 4)); return wsum; } wsum += *(__u16 *)(data_start + (768 + 64 + 16 + 4)); if ((768 + 64 + 16 + 6) > sample_len) return wsum; if (data_start + (768 + 64 + 16 + 6) + sizeof(__u16) > data_end) { if (data_start + (768 + 64 + 16 + 6) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (768 + 64 + 16 + 6)); return wsum; } wsum += *(__u16 *)(data_start + (768 + 64 + 16 + 6)); if ((768 + 64 + 24) > sample_len) return wsum; if (data_start + (768 + 64 + 24) + sizeof(__u16) > data_end) { if (data_start + (768 + 64 + 24) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (768 + 64 + 24)); return wsum; } wsum += *(__u16 *)(data_start + (768 + 64 + 24)); if ((768 + 64 + 24 + 2) > sample_len) return wsum; if (data_start + (768 + 64 + 24 + 2) + sizeof(__u16) > data_end) { if (data_start + (768 + 64 + 24 + 2) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (768 + 64 + 24 + 2)); return wsum; } wsum += *(__u16 *)(data_start + (768 + 64 + 24 + 2)); if ((768 + 64 + 24 + 4) > sample_len) return wsum; if (data_start + (768 + 64 + 24 + 4) + sizeof(__u16) > data_end) { if (data_start + (768 + 64 + 24 + 4) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (768 + 64 + 24 + 4)); return wsum; } wsum += *(__u16 *)(data_start + (768 + 64 + 24 + 4)); if ((768 + 64 + 24 + 6) > sample_len) return wsum; if (data_start + (768 + 64 + 24 + 6) + sizeof(__u16) > data_end) { if (data_start + (768 + 64 + 24 + 6) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (768 + 64 + 24 + 6)); return wsum; } wsum += *(__u16 *)(data_start + (768 + 64 + 24 + 6)); if ((768 + 96) > sample_len) return wsum; if (data_start + (768 + 96) + sizeof(__u16) > data_end) { if (data_start + (768 + 96) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (768 + 96)); return wsum; } wsum += *(__u16 *)(data_start + (768 + 96)); if ((768 + 96 + 2) > sample_len) return wsum; if (data_start + (768 + 96 + 2) + sizeof(__u16) > data_end) { if (data_start + (768 + 96 + 2) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (768 + 96 + 2)); return wsum; } wsum += *(__u16 *)(data_start + (768 + 96 + 2)); if ((768 + 96 + 4) > sample_len) return wsum; if (data_start + (768 + 96 + 4) + sizeof(__u16) > data_end) { if (data_start + (768 + 96 + 4) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (768 + 96 + 4)); return wsum; } wsum += *(__u16 *)(data_start + (768 + 96 + 4)); if ((768 + 96 + 6) > sample_len) return wsum; if (data_start + (768 + 96 + 6) + sizeof(__u16) > data_end) { if (data_start + (768 + 96 + 6) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (768 + 96 + 6)); return wsum; } wsum += *(__u16 *)(data_start + (768 + 96 + 6)); if ((768 + 96 + 8) > sample_len) return wsum; if (data_start + (768 + 96 + 8) + sizeof(__u16) > data_end) { if (data_start + (768 + 96 + 8) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (768 + 96 + 8)); return wsum; } wsum += *(__u16 *)(data_start + (768 + 96 + 8)); if ((768 + 96 + 8 + 2) > sample_len) return wsum; if (data_start + (768 + 96 + 8 + 2) + sizeof(__u16) > data_end) { if (data_start + (768 + 96 + 8 + 2) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (768 + 96 + 8 + 2)); return wsum; } wsum += *(__u16 *)(data_start + (768 + 96 + 8 + 2)); if ((768 + 96 + 8 + 4) > sample_len) return wsum; if (data_start + (768 + 96 + 8 + 4) + sizeof(__u16) > data_end) { if (data_start + (768 + 96 + 8 + 4) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (768 + 96 + 8 + 4)); return wsum; } wsum += *(__u16 *)(data_start + (768 + 96 + 8 + 4)); if ((768 + 96 + 8 + 6) > sample_len) return wsum; if (data_start + (768 + 96 + 8 + 6) + sizeof(__u16) > data_end) { if (data_start + (768 + 96 + 8 + 6) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (768 + 96 + 8 + 6)); return wsum; } wsum += *(__u16 *)(data_start + (768 + 96 + 8 + 6)); if ((768 + 96 + 16) > sample_len) return wsum; if (data_start + (768 + 96 + 16) + sizeof(__u16) > data_end) { if (data_start + (768 + 96 + 16) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (768 + 96 + 16)); return wsum; } wsum += *(__u16 *)(data_start + (768 + 96 + 16)); if ((768 + 96 + 16 + 2) > sample_len) return wsum; if (data_start + (768 + 96 + 16 + 2) + sizeof(__u16) > data_end) { if (data_start + (768 + 96 + 16 + 2) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (768 + 96 + 16 + 2)); return wsum; } wsum += *(__u16 *)(data_start + (768 + 96 + 16 + 2)); if ((768 + 96 + 16 + 4) > sample_len) return wsum; if (data_start + (768 + 96 + 16 + 4) + sizeof(__u16) > data_end) { if (data_start + (768 + 96 + 16 + 4) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (768 + 96 + 16 + 4)); return wsum; } wsum += *(__u16 *)(data_start + (768 + 96 + 16 + 4)); if ((768 + 96 + 16 + 6) > sample_len) return wsum; if (data_start + (768 + 96 + 16 + 6) + sizeof(__u16) > data_end) { if (data_start + (768 + 96 + 16 + 6) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (768 + 96 + 16 + 6)); return wsum; } wsum += *(__u16 *)(data_start + (768 + 96 + 16 + 6)); if ((768 + 96 + 24) > sample_len) return wsum; if (data_start + (768 + 96 + 24) + sizeof(__u16) > data_end) { if (data_start + (768 + 96 + 24) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (768 + 96 + 24)); return wsum; } wsum += *(__u16 *)(data_start + (768 + 96 + 24)); if ((768 + 96 + 24 + 2) > sample_len) return wsum; if (data_start + (768 + 96 + 24 + 2) + sizeof(__u16) > data_end) { if (data_start + (768 + 96 + 24 + 2) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (768 + 96 + 24 + 2)); return wsum; } wsum += *(__u16 *)(data_start + (768 + 96 + 24 + 2)); if ((768 + 96 + 24 + 4) > sample_len) return wsum; if (data_start + (768 + 96 + 24 + 4) + sizeof(__u16) > data_end) { if (data_start + (768 + 96 + 24 + 4) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (768 + 96 + 24 + 4)); return wsum; } wsum += *(__u16 *)(data_start + (768 + 96 + 24 + 4)); if ((768 + 96 + 24 + 6) > sample_len) return wsum; if (data_start + (768 + 96 + 24 + 6) + sizeof(__u16) > data_end) { if (data_start + (768 + 96 + 24 + 6) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (768 + 96 + 24 + 6)); return wsum; } wsum += *(__u16 *)(data_start + (768 + 96 + 24 + 6));
 if ((1024) > sample_len) return wsum; if (data_start + (1024) + sizeof(__u16) > data_end) { if (data_start + (1024) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (1024)); return wsum; } wsum += *(__u16 *)(data_start + (1024)); if ((1024 + 2) > sample_len) return wsum; if (data_start + (1024 + 2) + sizeof(__u16) > data_end) { if (data_start + (1024 + 2) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (1024 + 2)); return wsum; } wsum += *(__u16 *)(data_start + (1024 + 2)); if ((1024 + 4) > sample_len) return wsum; if (data_start + (1024 + 4) + sizeof(__u16) > data_end) { if (data_start + (1024 + 4) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (1024 + 4)); return wsum; } wsum += *(__u16 *)(data_start + (1024 + 4)); if ((1024 + 6) > sample_len) return wsum; if (data_start + (1024 + 6) + sizeof(__u16) > data_end) { if (data_start + (1024 + 6) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (1024 + 6)); return wsum; } wsum += *(__u16 *)(data_start + (1024 + 6)); if ((1024 + 8) > sample_len) return wsum; if (data_start + (1024 + 8) + sizeof(__u16) > data_end) { if (data_start + (1024 + 8) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (1024 + 8)); return wsum; } wsum += *(__u16 *)(data_start + (1024 + 8)); if ((1024 + 8 + 2) > sample_len) return wsum; if (data_start + (1024 + 8 + 2) + sizeof(__u16) > data_end) { if (data_start + (1024 + 8 + 2) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (1024 + 8 + 2)); return wsum; } wsum += *(__u16 *)(data_start + (1024 + 8 + 2)); if ((1024 + 8 + 4) > sample_len) return wsum; if (data_start + (1024 + 8 + 4) + sizeof(__u16) > data_end) { if (data_start + (1024 + 8 + 4) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (1024 + 8 + 4)); return wsum; } wsum += *(__u16 *)(data_start + (1024 + 8 + 4)); if ((1024 + 8 + 6) > sample_len) return wsum; if (data_start + (1024 + 8 + 6) + sizeof(__u16) > data_end) { if (data_start + (1024 + 8 + 6) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (1024 + 8 + 6)); return wsum; } wsum += *(__u16 *)(data_start + (1024 + 8 + 6)); if ((1024 + 16) > sample_len) return wsum; if (data_start + (1024 + 16) + sizeof(__u16) > data_end) { if (data_start + (1024 + 16) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (1024 + 16)); return wsum; } wsum += *(__u16 *)(data_start + (1024 + 16)); if ((1024 + 16 + 2) > sample_len) return wsum; if (data_start + (1024 + 16 + 2) + sizeof(__u16) > data_end) { if (data_start + (1024 + 16 + 2) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (1024 + 16 + 2)); return wsum; } wsum += *(__u16 *)(data_start + (1024 + 16 + 2)); if ((1024 + 16 + 4) > sample_len) return wsum; if (data_start + (1024 + 16 + 4) + sizeof(__u16) > data_end) { if (data_start + (1024 + 16 + 4) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (1024 + 16 + 4)); return wsum; } wsum += *(__u16 *)(data_start + (1024 + 16 + 4)); if ((1024 + 16 + 6) > sample_len) return wsum; if (data_start + (1024 + 16 + 6) + sizeof(__u16) > data_end) { if (data_start + (1024 + 16 + 6) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (1024 + 16 + 6)); return wsum; } wsum += *(__u16 *)(data_start + (1024 + 16 + 6)); if ((1024 + 24) > sample_len) return wsum; if (data_start + (1024 + 24) + sizeof(__u16) > data_end) { if (data_start + (1024 + 24) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (1024 + 24)); return wsum; } wsum += *(__u16 *)(data_start + (1024 + 24)); if ((1024 + 24 + 2) > sample_len) return wsum; if (data_start + (1024 + 24 + 2) + sizeof(__u16) > data_end) { if (data_start + (1024 + 24 + 2) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (1024 + 24 + 2)); return wsum; } wsum += *(__u16 *)(data_start + (1024 + 24 + 2)); if ((1024 + 24 + 4) > sample_len) return wsum; if (data_start + (1024 + 24 + 4) + sizeof(__u16) > data_end) { if (data_start + (1024 + 24 + 4) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (1024 + 24 + 4)); return wsum; } wsum += *(__u16 *)(data_start + (1024 + 24 + 4)); if ((1024 + 24 + 6) > sample_len) return wsum; if (data_start + (1024 + 24 + 6) + sizeof(__u16) > data_end) { if (data_start + (1024 + 24 + 6) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (1024 + 24 + 6)); return wsum; } wsum += *(__u16 *)(data_start + (1024 + 24 + 6)); if ((1024 + 32) > sample_len) return wsum; if (data_start + (1024 + 32) + sizeof(__u16) > data_end) { if (data_start + (1024 + 32) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (1024 + 32)); return wsum; } wsum += *(__u16 *)(data_start + (1024 + 32)); if ((1024 + 32 + 2) > sample_len) return wsum; if (data_start + (1024 + 32 + 2) + sizeof(__u16) > data_end) { if (data_start + (1024 + 32 + 2) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (1024 + 32 + 2)); return wsum; } wsum += *(__u16 *)(data_start + (1024 + 32 + 2)); if ((1024 + 32 + 4) > sample_len) return wsum; if (data_start + (1024 + 32 + 4) + sizeof(__u16) > data_end) { if (data_start + (1024 + 32 + 4) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (1024 + 32 + 4)); return wsum; } wsum += *(__u16 *)(data_start + (1024 + 32 + 4)); if ((1024 + 32 + 6) > sample_len) return wsum; if (data_start + (1024 + 32 + 6) + sizeof(__u16) > data_end) { if (data_start + (1024 + 32 + 6) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (1024 + 32 + 6)); return wsum; } wsum += *(__u16 *)(data_start + (1024 + 32 + 6)); if ((1024 + 32 + 8) > sample_len) return wsum; if (data_start + (1024 + 32 + 8) + sizeof(__u16) > data_end) { if (data_start + (1024 + 32 + 8) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (1024 + 32 + 8)); return wsum; } wsum += *(__u16 *)(data_start + (1024 + 32 + 8)); if ((1024 + 32 + 8 + 2) > sample_len) return wsum; if (data_start + (1024 + 32 + 8 + 2) + sizeof(__u16) > data_end) { if (data_start + (1024 + 32 + 8 + 2) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (1024 + 32 + 8 + 2)); return wsum; } wsum += *(__u16 *)(data_start + (1024 + 32 + 8 + 2)); if ((1024 + 32 + 8 + 4) > sample_len) return wsum; if (data_start + (1024 + 32 + 8 + 4) + sizeof(__u16) > data_end) { if (data_start + (1024 + 32 + 8 + 4) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (1024 + 32 + 8 + 4)); return wsum; } wsum += *(__u16 *)(data_start + (1024 + 32 + 8 + 4)); if ((1024 + 32 + 8 + 6) > sample_len) return wsum; if (data_start + (1024 + 32 + 8 + 6) + sizeof(__u16) > data_end) { if (data_start + (1024 + 32 + 8 + 6) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (1024 + 32 + 8 + 6)); return wsum; } wsum += *(__u16 *)(data_start + (1024 + 32 + 8 + 6)); if ((1024 + 32 + 16) > sample_len) return wsum; if (data_start + (1024 + 32 + 16) + sizeof(__u16) > data_end) { if (data_start + (1024 + 32 + 16) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (1024 + 32 + 16)); return wsum; } wsum += *(__u16 *)(data_start + (1024 + 32 + 16)); if ((1024 + 32 + 16 + 2) > sample_len) return wsum; if (data_start + (1024 + 32 + 16 + 2) + sizeof(__u16) > data_end) { if (data_start + (1024 + 32 + 16 + 2) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (1024 + 32 + 16 + 2)); return wsum; } wsum += *(__u16 *)(data_start + (1024 + 32 + 16 + 2)); if ((1024 + 32 + 16 + 4) > sample_len) return wsum; if (data_start + (1024 + 32 + 16 + 4) + sizeof(__u16) > data_end) { if (data_start + (1024 + 32 + 16 + 4) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (1024 + 32 + 16 + 4)); return wsum; } wsum += *(__u16 *)(data_start + (1024 + 32 + 16 + 4)); if ((1024 + 32 + 16 + 6) > sample_len) return wsum; if (data_start + (1024 + 32 + 16 + 6) + sizeof(__u16) > data_end) { if (data_start + (1024 + 32 + 16 + 6) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (1024 + 32 + 16 + 6)); return wsum; } wsum += *(__u16 *)(data_start + (1024 + 32 + 16 + 6)); if ((1024 + 32 + 24) > sample_len) return wsum; if (data_start + (1024 + 32 + 24) + sizeof(__u16) > data_end) { if (data_start + (1024 + 32 + 24) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (1024 + 32 + 24)); return wsum; } wsum += *(__u16 *)(data_start + (1024 + 32 + 24)); if ((1024 + 32 + 24 + 2) > sample_len) return wsum; if (data_start + (1024 + 32 + 24 + 2) + sizeof(__u16) > data_end) { if (data_start + (1024 + 32 + 24 + 2) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (1024 + 32 + 24 + 2)); return wsum; } wsum += *(__u16 *)(data_start + (1024 + 32 + 24 + 2)); if ((1024 + 32 + 24 + 4) > sample_len) return wsum; if (data_start + (1024 + 32 + 24 + 4) + sizeof(__u16) > data_end) { if (data_start + (1024 + 32 + 24 + 4) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (1024 + 32 + 24 + 4)); return wsum; } wsum += *(__u16 *)(data_start + (1024 + 32 + 24 + 4)); if ((1024 + 32 + 24 + 6) > sample_len) return wsum; if (data_start + (1024 + 32 + 24 + 6) + sizeof(__u16) > data_end) { if (data_start + (1024 + 32 + 24 + 6) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (1024 + 32 + 24 + 6)); return wsum; } wsum += *(__u16 *)(data_start + (1024 + 32 + 24 + 6)); if ((1024 + 64) > sample_len) return wsum; if (data_start + (1024 + 64) + sizeof(__u16) > data_end) { if (data_start + (1024 + 64) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (1024 + 64)); return wsum; } wsum += *(__u16 *)(data_start + (1024 + 64)); if ((1024 + 64 + 2) > sample_len) return wsum; if (data_start + (1024 + 64 + 2) + sizeof(__u16) > data_end) { if (data_start + (1024 + 64 + 2) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (1024 + 64 + 2)); return wsum; } wsum += *(__u16 *)(data_start + (1024 + 64 + 2)); if ((1024 + 64 + 4) > sample_len) return wsum; if (data_start + (1024 + 64 + 4) + sizeof(__u16) > data_end) { if (data_start + (1024 + 64 + 4) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (1024 + 64 + 4)); return wsum; } wsum += *(__u16 *)(data_start + (1024 + 64 + 4)); if ((1024 + 64 + 6) > sample_len) return wsum; if (data_start + (1024 + 64 + 6) + sizeof(__u16) > data_end) { if (data_start + (1024 + 64 + 6) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (1024 + 64 + 6)); return wsum; } wsum += *(__u16 *)(data_start + (1024 + 64 + 6)); if ((1024 + 64 + 8) > sample_len) return wsum; if (data_start + (1024 + 64 + 8) + sizeof(__u16) > data_end) { if (data_start + (1024 + 64 + 8) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (1024 + 64 + 8)); return wsum; } wsum += *(__u16 *)(data_start + (1024 + 64 + 8)); if ((1024 + 64 + 8 + 2) > sample_len) return wsum; if (data_start + (1024 + 64 + 8 + 2) + sizeof(__u16) > data_end) { if (data_start + (1024 + 64 + 8 + 2) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (1024 + 64 + 8 + 2)); return wsum; } wsum += *(__u16 *)(data_start + (1024 + 64 + 8 + 2)); if ((1024 + 64 + 8 + 4) > sample_len) return wsum; if (data_start + (1024 + 64 + 8 + 4) + sizeof(__u16) > data_end) { if (data_start + (1024 + 64 + 8 + 4) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (1024 + 64 + 8 + 4)); return wsum; } wsum += *(__u16 *)(data_start + (1024 + 64 + 8 + 4)); if ((1024 + 64 + 8 + 6) > sample_len) return wsum; if (data_start + (1024 + 64 + 8 + 6) + sizeof(__u16) > data_end) { if (data_start + (1024 + 64 + 8 + 6) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (1024 + 64 + 8 + 6)); return wsum; } wsum += *(__u16 *)(data_start + (1024 + 64 + 8 + 6)); if ((1024 + 64 + 16) > sample_len) return wsum; if (data_start + (1024 + 64 + 16) + sizeof(__u16) > data_end) { if (data_start + (1024 + 64 + 16) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (1024 + 64 + 16)); return wsum; } wsum += *(__u16 *)(data_start + (1024 + 64 + 16)); if ((1024 + 64 + 16 + 2) > sample_len) return wsum; if (data_start + (1024 + 64 + 16 + 2) + sizeof(__u16) > data_end) { if (data_start + (1024 + 64 + 16 + 2) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (1024 + 64 + 16 + 2)); return wsum; } wsum += *(__u16 *)(data_start + (1024 + 64 + 16 + 2)); if ((1024 + 64 + 16 + 4) > sample_len) return wsum; if (data_start + (1024 + 64 + 16 + 4) + sizeof(__u16) > data_end) { if (data_start + (1024 + 64 + 16 + 4) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (1024 + 64 + 16 + 4)); return wsum; } wsum += *(__u16 *)(data_start + (1024 + 64 + 16 + 4)); if ((1024 + 64 + 16 + 6) > sample_len) return wsum; if (data_start + (1024 + 64 + 16 + 6) + sizeof(__u16) > data_end) { if (data_start + (1024 + 64 + 16 + 6) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (1024 + 64 + 16 + 6)); return wsum; } wsum += *(__u16 *)(data_start + (1024 + 64 + 16 + 6)); if ((1024 + 64 + 24) > sample_len) return wsum; if (data_start + (1024 + 64 + 24) + sizeof(__u16) > data_end) { if (data_start + (1024 + 64 + 24) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (1024 + 64 + 24)); return wsum; } wsum += *(__u16 *)(data_start + (1024 + 64 + 24)); if ((1024 + 64 + 24 + 2) > sample_len) return wsum; if (data_start + (1024 + 64 + 24 + 2) + sizeof(__u16) > data_end) { if (data_start + (1024 + 64 + 24 + 2) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (1024 + 64 + 24 + 2)); return wsum; } wsum += *(__u16 *)(data_start + (1024 + 64 + 24 + 2)); if ((1024 + 64 + 24 + 4) > sample_len) return wsum; if (data_start + (1024 + 64 + 24 + 4) + sizeof(__u16) > data_end) { if (data_start + (1024 + 64 + 24 + 4) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (1024 + 64 + 24 + 4)); return wsum; } wsum += *(__u16 *)(data_start + (1024 + 64 + 24 + 4)); if ((1024 + 64 + 24 + 6) > sample_len) return wsum; if (data_start + (1024 + 64 + 24 + 6) + sizeof(__u16) > data_end) { if (data_start + (1024 + 64 + 24 + 6) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (1024 + 64 + 24 + 6)); return wsum; } wsum += *(__u16 *)(data_start + (1024 + 64 + 24 + 6)); if ((1024 + 96) > sample_len) return wsum; if (data_start + (1024 + 96) + sizeof(__u16) > data_end) { if (data_start + (1024 + 96) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (1024 + 96)); return wsum; } wsum += *(__u16 *)(data_start + (1024 + 96)); if ((1024 + 96 + 2) > sample_len) return wsum; if (data_start + (1024 + 96 + 2) + sizeof(__u16) > data_end) { if (data_start + (1024 + 96 + 2) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (1024 + 96 + 2)); return wsum; } wsum += *(__u16 *)(data_start + (1024 + 96 + 2)); if ((1024 + 96 + 4) > sample_len) return wsum; if (data_start + (1024 + 96 + 4) + sizeof(__u16) > data_end) { if (data_start + (1024 + 96 + 4) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (1024 + 96 + 4)); return wsum; } wsum += *(__u16 *)(data_start + (1024 + 96 + 4)); if ((1024 + 96 + 6) > sample_len) return wsum; if (data_start + (1024 + 96 + 6) + sizeof(__u16) > data_end) { if (data_start + (1024 + 96 + 6) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (1024 + 96 + 6)); return wsum; } wsum += *(__u16 *)(data_start + (1024 + 96 + 6)); if ((1024 + 96 + 8) > sample_len) return wsum; if (data_start + (1024 + 96 + 8) + sizeof(__u16) > data_end) { if (data_start + (1024 + 96 + 8) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (1024 + 96 + 8)); return wsum; } wsum += *(__u16 *)(data_start + (1024 + 96 + 8)); if ((1024 + 96 + 8 + 2) > sample_len) return wsum; if (data_start + (1024 + 96 + 8 + 2) + sizeof(__u16) > data_end) { if (data_start + (1024 + 96 + 8 + 2) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (1024 + 96 + 8 + 2)); return wsum; } wsum += *(__u16 *)(data_start + (1024 + 96 + 8 + 2)); if ((1024 + 96 + 8 + 4) > sample_len) return wsum; if (data_start + (1024 + 96 + 8 + 4) + sizeof(__u16) > data_end) { if (data_start + (1024 + 96 + 8 + 4) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (1024 + 96 + 8 + 4)); return wsum; } wsum += *(__u16 *)(data_start + (1024 + 96 + 8 + 4)); if ((1024 + 96 + 8 + 6) > sample_len) return wsum; if (data_start + (1024 + 96 + 8 + 6) + sizeof(__u16) > data_end) { if (data_start + (1024 + 96 + 8 + 6) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (1024 + 96 + 8 + 6)); return wsum; } wsum += *(__u16 *)(data_start + (1024 + 96 + 8 + 6)); if ((1024 + 96 + 16) > sample_len) return wsum; if (data_start + (1024 + 96 + 16) + sizeof(__u16) > data_end) { if (data_start + (1024 + 96 + 16) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (1024 + 96 + 16)); return wsum; } wsum += *(__u16 *)(data_start + (1024 + 96 + 16)); if ((1024 + 96 + 16 + 2) > sample_len) return wsum; if (data_start + (1024 + 96 + 16 + 2) + sizeof(__u16) > data_end) { if (data_start + (1024 + 96 + 16 + 2) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (1024 + 96 + 16 + 2)); return wsum; } wsum += *(__u16 *)(data_start + (1024 + 96 + 16 + 2)); if ((1024 + 96 + 16 + 4) > sample_len) return wsum; if (data_start + (1024 + 96 + 16 + 4) + sizeof(__u16) > data_end) { if (data_start + (1024 + 96 + 16 + 4) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (1024 + 96 + 16 + 4)); return wsum; } wsum += *(__u16 *)(data_start + (1024 + 96 + 16 + 4)); if ((1024 + 96 + 16 + 6) > sample_len) return wsum; if (data_start + (1024 + 96 + 16 + 6) + sizeof(__u16) > data_end) { if (data_start + (1024 + 96 + 16 + 6) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (1024 + 96 + 16 + 6)); return wsum; } wsum += *(__u16 *)(data_start + (1024 + 96 + 16 + 6)); if ((1024 + 96 + 24) > sample_len) return wsum; if (data_start + (1024 + 96 + 24) + sizeof(__u16) > data_end) { if (data_start + (1024 + 96 + 24) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (1024 + 96 + 24)); return wsum; } wsum += *(__u16 *)(data_start + (1024 + 96 + 24)); if ((1024 + 96 + 24 + 2) > sample_len) return wsum; if (data_start + (1024 + 96 + 24 + 2) + sizeof(__u16) > data_end) { if (data_start + (1024 + 96 + 24 + 2) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (1024 + 96 + 24 + 2)); return wsum; } wsum += *(__u16 *)(data_start + (1024 + 96 + 24 + 2)); if ((1024 + 96 + 24 + 4) > sample_len) return wsum; if (data_start + (1024 + 96 + 24 + 4) + sizeof(__u16) > data_end) { if (data_start + (1024 + 96 + 24 + 4) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (1024 + 96 + 24 + 4)); return wsum; } wsum += *(__u16 *)(data_start + (1024 + 96 + 24 + 4)); if ((1024 + 96 + 24 + 6) > sample_len) return wsum; if (data_start + (1024 + 96 + 24 + 6) + sizeof(__u16) > data_end) { if (data_start + (1024 + 96 + 24 + 6) + sizeof(__u8) <= data_end) wsum += *(__u8 *)(data_start + (1024 + 96 + 24 + 6)); return wsum; } wsum += *(__u16 *)(data_start + (1024 + 96 + 24 + 6));

 return wsum;
}
# 46 "/var/lib/cilium/bpf/bpf_host.c" 2
# 1 "/var/lib/cilium/bpf/lib/nodeport.h" 1
# 24 "/var/lib/cilium/bpf/lib/nodeport.h"
# 1 "/var/lib/cilium/bpf/lib/ghash.h" 1
# 53 "/var/lib/cilium/bpf/lib/ghash.h"
static inline __attribute__((always_inline)) __u32 hash_32(__u32 key, __u32 bits)
{
 return (key * 0x9e3779b9) >> (32 - bits);
}
# 25 "/var/lib/cilium/bpf/lib/nodeport.h" 2
# 1 "/var/lib/cilium/bpf/lib/pcap.h" 1








struct capture_rule {
 __u16 rule_id;
 __u16 reserved;
 __u32 cap_len;
};


struct capture4_wcard {
 __be32 saddr;
 __be32 daddr;
 __be16 sport;
 __be16 dport;
 __u8 nexthdr;
 __u8 smask;
 __u8 dmask;
 __u8 flags;
};


struct capture6_wcard {
 union v6addr saddr;
 union v6addr daddr;
 __be16 sport;
 __be16 dport;
 __u8 nexthdr;
 __u8 smask;
 __u8 dmask;
 __u8 flags;
};
# 480 "/var/lib/cilium/bpf/lib/pcap.h"
static inline __attribute__((always_inline)) void
cilium_capture_in(struct __sk_buff *ctx __attribute__((__unused__)))
{
}

static inline __attribute__((always_inline)) void
cilium_capture_out(struct __sk_buff *ctx __attribute__((__unused__)))
{
}
# 26 "/var/lib/cilium/bpf/lib/nodeport.h" 2
# 1 "/var/lib/cilium/bpf/lib/host_firewall.h" 1







# 1 "/var/lib/cilium/bpf/lib/policy_log.h" 1
# 23 "/var/lib/cilium/bpf/lib/policy_log.h"
struct policy_verdict_notify {
 __u8 type; __u8 subtype; __u16 source; __u32 hash; __u32 len_orig; __u16 len_cap; __u16 version;
 __u32 remote_label;
 __s32 verdict;
 __u16 dst_port;
 __u8 proto;
 __u8 dir:2,
  ipv6:1,
  match_type:3,
  audited:1,
  pad0:1;
 __u8 auth_type;
 __u8 pad1;
 __u16 pad2;
};


static inline __attribute__((always_inline)) _Bool policy_verdict_filter_allow(__u32 filter, __u8 dir)
{



 volatile __u8 d = dir;

 return ((filter & d) > 0);
}

static inline __attribute__((always_inline)) void
send_policy_verdict_notify(struct __sk_buff *ctx, __u32 remote_label, __u16 dst_port,
      __u8 proto, __u8 dir, __u8 is_ipv6, int verdict, __u16 proxy_port,
      __u8 match_type, __u8 is_audited, __u8 auth_type)
{
 __u64 ctx_len = ctx_full_len(ctx);
 __u64 cap_len = ({ __u64 _x = (__config_trace_payload_len); __u64 _y = (ctx_len); (void) (&_x == &_y); _x < _y ? _x : _y; });
 struct ratelimit_key rkey = {
  .usage = 2,
 };
 struct ratelimit_settings settings = {
  .topup_interval_ns = (1000ULL * 1000ULL * 1000UL),
 };
 struct policy_verdict_notify msg;
# 77 "/var/lib/cilium/bpf/lib/policy_log.h"
 if (match_type == POLICY_MATCH_ALL && verdict == 0)
  return;







 if (verdict == 0)
  verdict = (int)proxy_port;

 if (0 > 0) {
  settings.bucket_size = 0;
  settings.tokens_per_topup = 0;
  if (!ratelimit_check_and_take(&rkey, &settings))
   return;
 }

 msg = (typeof(msg)) {
  .type = (CILIUM_NOTIFY_POLICY_VERDICT), .subtype = (0), .source = __config_host_ep_id, .hash = ctx->hash,
  .len_orig = ((__u32)ctx_len), .len_cap = ((__u16)cap_len), .version = (1),
  .remote_label = remote_label,
  .verdict = verdict,
  .dst_port = (__builtin_constant_p(dst_port) ? ((__u16)( ((__u16)(dst_port) << (16 -(0 +1)*8) >> (16 -8) << (1*8)) | ((__u16)(dst_port) << (16 -(1 +1)*8) >> (16 -8) << (0*8)))) : __builtin_bswap16(dst_port)),
  .match_type = match_type,
  .proto = proto,
  .dir = dir,
  .ipv6 = is_ipv6,
  .audited = is_audited,
  .auth_type = auth_type,
 };

 skb_event_output(ctx, &cilium_events,
    (cap_len << 32) | BPF_F_CURRENT_CPU,
    &msg, sizeof(msg));
}
# 9 "/var/lib/cilium/bpf/lib/host_firewall.h" 2
# 27 "/var/lib/cilium/bpf/lib/nodeport.h" 2

# 1 "/var/lib/cilium/bpf/lib/proxy_hairpin.h" 1
# 24 "/var/lib/cilium/bpf/lib/proxy_hairpin.h"
static inline __attribute__((always_inline)) int
ctx_redirect_to_proxy_hairpin(struct __sk_buff *ctx, struct iphdr *ip4,
         __be16 proxy_port)
{

 union macaddr host_mac = {.addr={0x26,0xce,0x18,0xe5,0xc6,0x69}};
 union macaddr router_mac = __config_interface_mac;

 int ret = 0;

 ctx_store_meta(ctx, CB_SRC_LABEL,
         0x0200 | (proxy_port << 16));
 bpf_barrier();

 if (!ip4) {

  ret = ipv6_l3(ctx, __config_eth_header_length, (__u8 *)&router_mac, (__u8 *)&host_mac,
         METRIC_EGRESS);

 } else {

  ret = ipv4_l3(ctx, __config_eth_header_length, (__u8 *)&router_mac, (__u8 *)&host_mac,
         ip4);

 }
 if ((__builtin_expect(!!((ret < 0) || (ret == 2)), 0)))
  return ret;

 cilium_dbg_capture(ctx, DBG_CAPTURE_PROXY_PRE, proxy_port);






 return ctx_redirect(ctx, 5, 0);
}


static inline __attribute__((always_inline)) int
ctx_redirect_to_proxy_hairpin_ipv4(struct __sk_buff *ctx, struct iphdr *ip4,
       __be16 proxy_port)
{
 return ctx_redirect_to_proxy_hairpin(ctx, ip4, proxy_port);
}



static inline __attribute__((always_inline)) int
ctx_redirect_to_proxy_hairpin_ipv6(struct __sk_buff *ctx, __be16 proxy_port)
{
 return ctx_redirect_to_proxy_hairpin(ctx, ((void *)0), proxy_port);
}
# 29 "/var/lib/cilium/bpf/lib/nodeport.h" 2

# 1 "/var/lib/cilium/bpf/lib/srv6.h" 1
# 31 "/var/lib/cilium/bpf/lib/nodeport.h" 2

__attribute__((section(".rodata.config"), used)) __attribute__((btf_decl_tag("kind:object"))) __attribute__((btf_decl_tag("MTU of the device the bpf program is attached to (default: MTU set in node_config.h by agent)"))) volatile const __u16 __config_device_mtu;
void __check_device_mtu(void) { __config_device_mtu; }; volatile const __u16 __config_device_mtu = 1500;
# 47 "/var/lib/cilium/bpf/bpf_host.c" 2
# 1 "/var/lib/cilium/bpf/lib/nodeport_egress.h" 1
# 48 "/var/lib/cilium/bpf/bpf_host.c" 2






# 1 "/var/lib/cilium/bpf/lib/encrypt.h" 1
# 15 "/var/lib/cilium/bpf/lib/encrypt.h"
# 1 "/var/lib/cilium/bpf/lib/node.h" 1
# 10 "/var/lib/cilium/bpf/lib/node.h"
struct {
 int(*(type))[BPF_MAP_TYPE_HASH];
 typeof(struct node_key) *(key);
 typeof(struct node_value) *(value);
 int(*(pinning))[1];
 int(*(max_entries))[16384];
 int(*(map_flags))[BPF_F_NO_PREALLOC];
} cilium_node_map_v2 __attribute__((section(".maps"), used));

static inline __attribute__((always_inline)) struct node_value *
lookup_ip4_node(__be32 ip4)
{
 struct node_key key = {};

 key.family = 1;
 key.ip4 = ip4;

 return map_lookup_elem(&cilium_node_map_v2, &key);
}

static inline __attribute__((always_inline)) __u16
lookup_ip4_node_id(__be32 ip4)
{
 struct node_value *node_value;

 node_value = lookup_ip4_node(ip4);
 if (!node_value)
  return 0;
 if (!node_value->id)
  return 0;
 return node_value->id;
}


static inline __attribute__((always_inline)) struct node_value *
lookup_ip6_node(const union v6addr *ip6)
{
 struct node_key key = {};

 key.family = 2;
 key.ip6 = *ip6;

 return map_lookup_elem(&cilium_node_map_v2, &key);
}

static inline __attribute__((always_inline)) __u16
lookup_ip6_node_id(const union v6addr *ip6)
{
 struct node_value *node_value;

 node_value = lookup_ip6_node(ip6);
 if (!node_value)
  return 0;
 if (!node_value->id)
  return 0;
 return node_value->id;
}


static inline __attribute__((always_inline)) struct node_value *
lookup_node(const struct remote_endpoint_info *info)
{

 if (info->flag_ipv6_tunnel_ep)
  return lookup_ip6_node(&info->tunnel_endpoint.ip6);

 return lookup_ip4_node(info->tunnel_endpoint.ip4);
}
# 16 "/var/lib/cilium/bpf/lib/encrypt.h" 2






struct {
 int(*(type))[BPF_MAP_TYPE_ARRAY];
 typeof(__u32) *(key);
 typeof(struct encrypt_config) *(value);
 int(*(pinning))[1];
 int(*(max_entries))[1];
} cilium_encrypt_state __attribute__((section(".maps"), used));


static inline __attribute__((always_inline)) __u8 get_min_encrypt_key(__u8 peer_key __attribute__((__unused__)))
{

 __u8 local_key = 0;
 __u32 encrypt_key = 0;
 struct encrypt_config *cfg;

 cfg = map_lookup_elem(&cilium_encrypt_state, &encrypt_key);

 if (cfg)
  local_key = cfg->encrypt_key;
# 51 "/var/lib/cilium/bpf/lib/encrypt.h"
 if (peer_key == 15)
  return local_key == 1 ? peer_key : local_key;
 if (local_key == 15)
  return peer_key == 1 ? local_key : peer_key;
 return local_key < peer_key ? local_key : peer_key;



}





static inline __attribute__((always_inline)) __u32 or_encrypt_key(__u8 key)
{
 return (((__u32)key & 0x0F) << 12) | 0x0E00;
}

static inline __attribute__((always_inline)) __u32
ipsec_encode_encryption_mark(__u8 key, __u32 node_id)
{
 return or_encrypt_key(key) | node_id << 16;
}

static inline __attribute__((always_inline)) void
set_ipsec_decrypt_mark(struct __sk_buff *ctx, __u16 node_id)
{

 ctx->mark = 0x0D00 | node_id << 16;
}

static inline __attribute__((always_inline)) int
set_ipsec_encrypt(struct __sk_buff *ctx, __u8 spi,
    struct remote_endpoint_info *info, __u32 seclabel,
    _Bool use_meta, _Bool use_spi_from_map)
{
# 96 "/var/lib/cilium/bpf/lib/encrypt.h"
 struct node_value *node_value = ((void *)0);
 __u32 mark;

 node_value = lookup_node(info);
 if (!node_value || !node_value->id)
  return -197;

 if (use_spi_from_map)
  spi = get_min_encrypt_key(node_value->spi);

 mark = ipsec_encode_encryption_mark(spi, node_value->id);

 set_identity_meta(ctx, seclabel);
 if (use_meta)
  ctx->cb[CB_SRC_LABEL] = mark;
 ctx->mark = mark;

 return 0;
}

static inline __attribute__((always_inline)) int
do_decrypt(struct __sk_buff *ctx, __u16 proto)
{
 void *data, *data_end;
 __u8 protocol = 0;
 __u16 node_id = 0;
 _Bool decrypted;

 struct ipv6hdr *ip6;


 struct iphdr *ip4;


 decrypted = ((ctx->mark & 0x0F00) == 0x0D00);

 switch (proto) {

 case (__builtin_constant_p(0x86DD) ? ((__u16)( ((__u16)(0x86DD) << (16 -(0 +1)*8) >> (16 -8) << (1*8)) | ((__u16)(0x86DD) << (16 -(1 +1)*8) >> (16 -8) << (0*8)))) : __builtin_bswap16(0x86DD)):
  if (!__revalidate_data_pull(ctx, &data, &data_end, (void **)&ip6, __config_eth_header_length, sizeof(**&ip6), true)) {
   ctx->mark = 0;
   return 0;
  }
  protocol = ip6->nexthdr;
  if (!decrypted)
   node_id = lookup_ip6_node_id((union v6addr *)&ip6->saddr);
  break;


 case (__builtin_constant_p(0x0800) ? ((__u16)( ((__u16)(0x0800) << (16 -(0 +1)*8) >> (16 -8) << (1*8)) | ((__u16)(0x0800) << (16 -(1 +1)*8) >> (16 -8) << (0*8)))) : __builtin_bswap16(0x0800)):
  if (!__revalidate_data_pull(ctx, &data, &data_end, (void **)&ip4, __config_eth_header_length, sizeof(**&ip4), true)) {
   ctx->mark = 0;
   return 0;
  }
  protocol = ip4->protocol;
  if (!decrypted)
   node_id = lookup_ip4_node_id(ip4->saddr);
  break;

 default:
  return 0;
 }

 if (!decrypted) {



  if (protocol != IPPROTO_ESP)
   return 0;

  if (!node_id)
   return _send_drop_notify((__u8)__id_for_file("encrypt.h"), 168, ctx, 0, 0, 0, ({ typeof(-197) __err = (-197); (__u8)(__err > 0 ? __err : -__err); }), 2, METRIC_INGRESS);

  set_ipsec_decrypt_mark(ctx, node_id);






  skb_change_type(ctx, 0);
  return 0;
 }
 ctx->mark = 0;

 return 0;



}
# 194 "/var/lib/cilium/bpf/lib/encrypt.h"
static inline __attribute__((always_inline)) int
ipsec_redirect_sec_id_ok(__u32 src_sec_id, __u32 dst_sec_id, int ip_proto) {
 if (ip_proto == IPPROTO_ESP)
  return 0;
 if (src_sec_id == 1)
  return 0;
 if (dst_sec_id == 1)
  return 0;
 if (!identity_is_cluster(dst_sec_id))
  return 0;
 if (!identity_is_cluster(src_sec_id))
  return 0;
 if (identity_is_remote_node(dst_sec_id))
  return 0;
 if (identity_is_remote_node(src_sec_id))
  return 0;
 return 1;
}

static inline __attribute__((always_inline)) int
ipsec_maybe_redirect_to_encrypt(struct __sk_buff *ctx, __be16 proto,
    __u32 src_sec_identity)
{
 struct remote_endpoint_info __attribute__((__unused__)) fake_info = {0};
 struct remote_endpoint_info __attribute__((__unused__)) *dst = ((void *)0);
 struct remote_endpoint_info __attribute__((__unused__)) *src = ((void *)0);
 void *data __attribute__((__unused__)), *data_end __attribute__((__unused__));
 struct iphdr __attribute__((__unused__)) *ip4;
 struct ipv6hdr __attribute__((__unused__)) *ip6;
 int ip_proto = 0;
 int ret = 0;
 union macaddr dst_mac = {.addr={0x82,0x52,0x42,0x7b,0xca,0x46}};

 if (!eth_is_supported_ethertype(proto))
  return -166;
# 244 "/var/lib/cilium/bpf/lib/encrypt.h"
 switch (proto) {

 case (__builtin_constant_p(0x0800) ? ((__u16)( ((__u16)(0x0800) << (16 -(0 +1)*8) >> (16 -8) << (1*8)) | ((__u16)(0x0800) << (16 -(1 +1)*8) >> (16 -8) << (0*8)))) : __builtin_bswap16(0x0800)):
  if (!__revalidate_data_pull(ctx, &data, &data_end, (void **)&ip4, __config_eth_header_length, sizeof(**&ip4), false))
   return -134;
# 274 "/var/lib/cilium/bpf/lib/encrypt.h"
  ip_proto = ip4->protocol;

  dst = ipcache_lookup4(&cilium_ipcache_v2, ip4->daddr, (sizeof(__u32)*8), 0);

  if (src_sec_identity == 0) {
   src = ipcache_lookup4(&cilium_ipcache_v2, ip4->saddr, (sizeof(__u32)*8), 0);
   if (!src)
    return 0;

   src_sec_identity = src->sec_identity;
  }
  break;



 case (__builtin_constant_p(0x86DD) ? ((__u16)( ((__u16)(0x86DD) << (16 -(0 +1)*8) >> (16 -8) << (1*8)) | ((__u16)(0x86DD) << (16 -(1 +1)*8) >> (16 -8) << (0*8)))) : __builtin_bswap16(0x86DD)):

  if (!__revalidate_data_pull(ctx, &data, &data_end, (void **)&ip6, __config_eth_header_length, sizeof(**&ip6), false))
   return -134;
# 312 "/var/lib/cilium/bpf/lib/encrypt.h"
  ip_proto = ip6->nexthdr;

  dst = ipcache_lookup6(&cilium_ipcache_v2, (union v6addr *)&ip6->daddr, (sizeof(union v6addr)*8), 0);

  if (src_sec_identity == 0) {
   src = ipcache_lookup6(&cilium_ipcache_v2, (union v6addr *)&ip6->saddr, (sizeof(union v6addr)*8), 0);
   if (!src)
    return 0;

   src_sec_identity = src->sec_identity;
  }
  break;

 default:
  return 0;
 }

 if (!dst || !dst->flag_has_tunnel_ep)
  return 0;

 if (!ipsec_redirect_sec_id_ok(src_sec_identity, dst->sec_identity,
          ip_proto))
  return 0;
# 348 "/var/lib/cilium/bpf/lib/encrypt.h"
 ret = set_ipsec_encrypt(ctx, 0, dst, src_sec_identity, true, true);
 if (ret != 0)
  return ret;
# 359 "/var/lib/cilium/bpf/lib/encrypt.h"
 if (eth_store_daddr(ctx, (const __u8 *)&dst_mac, 0) != 0)
  return -141;

 ret = ctx_redirect(ctx, 5, BPF_F_INGRESS);
 if (ret != 7)
  return -134;
 return ret;
}
# 55 "/var/lib/cilium/bpf/bpf_host.c" 2
# 1 "/var/lib/cilium/bpf/lib/wireguard.h" 1
# 56 "/var/lib/cilium/bpf/bpf_host.c" 2
# 1 "/var/lib/cilium/bpf/lib/l2_responder.h" 1
# 10 "/var/lib/cilium/bpf/lib/l2_responder.h"
struct l2_responder_v4_key {
 __u32 ip4;
 __u32 ifindex;
};

struct l2_responder_stats {
 __u64 responses_sent;
};

struct {
 int(*(type))[BPF_MAP_TYPE_HASH];
 typeof(struct l2_responder_v4_key) *(key);
 typeof(struct l2_responder_stats) *(value);
 int(*(pinning))[1];
 int(*(max_entries))[4096];
 int(*(map_flags))[BPF_F_NO_PREALLOC];
} cilium_l2_responder_v4 __attribute__((section(".maps"), used));

struct l2_responder_v6_key {
 union v6addr ip6;
 __u32 ifindex;
 __u32 pad;
};

struct {
 int(*(type))[BPF_MAP_TYPE_HASH];
 typeof(struct l2_responder_v6_key) *(key);
 typeof(struct l2_responder_stats) *(value);
 int(*(pinning))[1];
 int(*(max_entries))[4096];
 int(*(map_flags))[BPF_F_NO_PREALLOC];
} cilium_l2_responder_v6 __attribute__((section(".maps"), used));
# 57 "/var/lib/cilium/bpf/bpf_host.c" 2
# 1 "/var/lib/cilium/bpf/lib/vtep.h" 1
# 10 "/var/lib/cilium/bpf/lib/vtep.h"
struct vtep_key {
 __u32 vtep_ip;
};

struct vtep_value {
 __u64 vtep_mac;
 __u32 tunnel_endpoint;
};
# 58 "/var/lib/cilium/bpf/bpf_host.c" 2
# 67 "/var/lib/cilium/bpf/bpf_host.c"
static inline __attribute__((always_inline)) _Bool allow_vlan(__u32 __attribute__((__unused__)) ifindex, __u32 __attribute__((__unused__)) vlan_id) {
 return false;
}


static inline __attribute__((always_inline)) int rewrite_dmac_to_host(struct __sk_buff *ctx)
{




 union macaddr cilium_net_mac = {.addr={0x82,0x52,0x42,0x7b,0xca,0x46}};


 if (eth_store_daddr(ctx, (__u8 *) &cilium_net_mac.addr, 0) < 0)
  return -141;

 return 0;
}



static inline __attribute__((always_inline)) __u32
resolve_srcid_ipv6(struct __sk_buff *ctx, struct ipv6hdr *ip6,
     __u32 srcid_from_ipcache, __u32 *sec_identity,
     const _Bool from_host)
{
 __u32 src_id = 10;
 struct remote_endpoint_info *info = ((void *)0);
 union v6addr *src;


 if (identity_is_reserved(srcid_from_ipcache)) {
  src = (union v6addr *) &ip6->saddr;
  info = ipcache_lookup6(&cilium_ipcache_v2, src, (sizeof(union v6addr)*8), 0);
  if (info) {
   *sec_identity = info->sec_identity;
# 113 "/var/lib/cilium/bpf/bpf_host.c"
   if (*sec_identity != 1)
    srcid_from_ipcache = *sec_identity;
  }
  cilium_dbg(ctx, info ? DBG_IP_ID_MAP_SUCCEED6 : DBG_IP_ID_MAP_FAILED6,
      ((__u32 *) src)[3], srcid_from_ipcache);
 }

 if (from_host)
  src_id = srcid_from_ipcache;
 else if (__config_secctx_from_ipcache)
  src_id = srcid_from_ipcache;
 return src_id;
}

struct {
 int(*(type))[BPF_MAP_TYPE_PERCPU_ARRAY];
 typeof(__u32) *(key);
 typeof(struct ct_buffer6) *(value);
 int(*(max_entries))[1];
} cilium_tail_call_buffer6 __attribute__((section(".maps"), used));

static inline __attribute__((always_inline)) int
handle_ipv6(struct __sk_buff *ctx, __u32 secctx __attribute__((__unused__)),
     __u32 ipcache_srcid __attribute__((__unused__)),
     const _Bool from_host __attribute__((__unused__)),
     _Bool *punt_to_stack __attribute__((__unused__)),
     __s8 *ext_err __attribute__((__unused__)))
{






 void *data, *data_end;
 struct ipv6hdr *ip6;
 fraginfo_t fraginfo __attribute__((__unused__));
 int ret;

 if (!__revalidate_data_pull(ctx, &data, &data_end, (void **)&ip6, __config_eth_header_length, sizeof(**&ip6), false))
  return -134;
# 163 "/var/lib/cilium/bpf/bpf_host.c"
 if (0 || !from_host) {
  __u8 nexthdr = ip6->nexthdr;
  int hdrlen;

  hdrlen = ipv6_hdrlen(ctx, &nexthdr);
  if (hdrlen < 0)
   return hdrlen;

  if (__builtin_expect(!!(nexthdr == 58), 1)) {
   ret = icmp6_host_handle(ctx, __config_eth_header_length + hdrlen, ext_err, !from_host);
   if (ret == -2) {



   } else if ((__builtin_expect(!!((ret < 0) || (ret == 2)), 0))) {
    return ret;
   }
  }
 }
# 240 "/var/lib/cilium/bpf/bpf_host.c"
 return 0;
}

static inline __attribute__((always_inline)) int
handle_ipv6_cont(struct __sk_buff *ctx, __u32 secctx, const _Bool from_host,
   __s8 *ext_err __attribute__((__unused__)))
{
 struct trace_ctx __attribute__((__unused__)) trace = {
  .reason = TRACE_REASON_UNKNOWN,
  .monitor = __config_trace_payload_len,
 };
 __u32 __attribute__((__unused__)) from_host_raw;
 void *data, *data_end;
 struct ipv6hdr *ip6;
 union v6addr *dst;
 int l3_off = __config_eth_header_length;
 struct remote_endpoint_info *info = ((void *)0);
 struct endpoint_info *ep;
 int ret __attribute__((__unused__));
 __u32 magic = 0x0F00;
 _Bool from_proxy = false;

 if (from_host && tc_index_from_ingress_proxy(ctx)) {
  from_proxy = true;
  magic = 0x0A00;
 }
 if (from_host && tc_index_from_egress_proxy(ctx)) {
  from_proxy = true;
  magic = 0x0B00;
 }

 if (!__revalidate_data_pull(ctx, &data, &data_end, (void **)&ip6, __config_eth_header_length, sizeof(**&ip6), false))
  return -134;
# 329 "/var/lib/cilium/bpf/bpf_host.c"
 if (!from_host)
  return 0;



 ep = lookup_ip6_endpoint(ip6);
 if (ep) {



  if (ep->flags & (1 | 2))
   return 0;
# 356 "/var/lib/cilium/bpf/bpf_host.c"
  return ipv6_local_delivery(ctx, l3_off, secctx, magic, ep,
        METRIC_INGRESS, from_host, false);
 }




 if (!from_host)
  return 0;

 dst = (union v6addr *) &ip6->daddr;
 info = ipcache_lookup6(&cilium_ipcache_v2, dst, (sizeof(union v6addr)*8), 0);
# 382 "/var/lib/cilium/bpf/bpf_host.c"
 if (!info || (!from_proxy &&
        identity_is_world_ipv6(info->sec_identity))) {

  return -151;
 }


 if (from_proxy && !identity_is_cluster(info->sec_identity))
  ctx->mark = 0x0800;


 return 0;
}

static inline __attribute__((always_inline)) int
tail_handle_ipv6_cont(struct __sk_buff *ctx, _Bool from_host)
{
 __u32 src_sec_identity = ctx_load_and_clear_meta(ctx, CB_SRC_LABEL);
 int ret;
 __s8 ext_err = 0;

 ret = handle_ipv6_cont(ctx, src_sec_identity, from_host, &ext_err);
 if (from_host && ret == 0) {



  ret = rewrite_dmac_to_host(ctx);
 }

 if ((__builtin_expect(!!((ret < 0) || (ret == 2)), 0)))
  return _send_drop_notify((__u8)__id_for_file("bpf_host.c"), 413, ctx, src_sec_identity, 0, 0, ({ typeof(ext_err) __ext_err = (ext_err); ({ typeof(ret) __err = (ret); (__u8)(__err > 0 ? __err : -__err); }) | ((__u8)(__ext_err < -128 ? 0 : __ext_err) << 8); }), 2, METRIC_INGRESS);

 return ret;
}

__attribute__((section("tc" "/tail"), used)) __attribute__((btf_decl_tag("tail:cilium_calls/" "43")))
static inline __attribute__((always_inline))
int tail_handle_ipv6_cont_from_host(struct __sk_buff *ctx)
{
 return tail_handle_ipv6_cont(ctx, true);
}

__attribute__((section("tc" "/tail"), used)) __attribute__((btf_decl_tag("tail:cilium_calls/" "44")))
static inline __attribute__((always_inline))
int tail_handle_ipv6_cont_from_netdev(struct __sk_buff *ctx)
{
 return tail_handle_ipv6_cont(ctx, false);
}

static inline __attribute__((always_inline)) int
tail_handle_ipv6(struct __sk_buff *ctx, __u32 ipcache_srcid, const _Bool from_host)
{
 __u32 src_sec_identity = ctx_load_and_clear_meta(ctx, CB_SRC_LABEL);
 _Bool punt_to_stack = false;
 int ret;
 __s8 ext_err = 0;

 ret = handle_ipv6(ctx, src_sec_identity, ipcache_srcid, from_host,
     &punt_to_stack, &ext_err);


 if (ret == 0) {
  if (punt_to_stack)
   return ret;

  ctx_store_meta(ctx, CB_SRC_LABEL, src_sec_identity);
  if (from_host)
   ret = tail_handle_ipv6_cont_from_host(ctx);



  else
   ret = tail_handle_ipv6_cont_from_netdev(ctx);



 }


 if ((__builtin_expect(!!((ret < 0) || (ret == 2)), 0)))
  return _send_drop_notify((__u8)__id_for_file("bpf_host.c"), 463, ctx, src_sec_identity, 0, 0, ({ typeof(ext_err) __ext_err = (ext_err); ({ typeof(ret) __err = (ret); (__u8)(__err > 0 ? __err : -__err); }) | ((__u8)(__ext_err < -128 ? 0 : __ext_err) << 8); }), 2, METRIC_INGRESS);


 return ret;
}

__attribute__((section("tc" "/tail"), used)) __attribute__((btf_decl_tag("tail:cilium_calls/" "24")))
int tail_handle_ipv6_from_host(struct __sk_buff *ctx)
{
 __u32 ipcache_srcid = 0;





 return tail_handle_ipv6(ctx, ipcache_srcid, true);
}

__attribute__((section("tc" "/tail"), used)) __attribute__((btf_decl_tag("tail:cilium_calls/" "10")))
int tail_handle_ipv6_from_netdev(struct __sk_buff *ctx)
{
 return tail_handle_ipv6(ctx, 0, false);
}
# 531 "/var/lib/cilium/bpf/bpf_host.c"
static inline __attribute__((always_inline)) __u32
resolve_srcid_ipv4(struct __sk_buff *ctx, struct iphdr *ip4,
     __u32 srcid_from_proxy, __u32 *sec_identity,
     const _Bool from_host)
{
 __u32 src_id = 9, srcid_from_ipcache = srcid_from_proxy;
 struct remote_endpoint_info *info = ((void *)0);


 if (identity_is_reserved(srcid_from_ipcache)) {
  info = ipcache_lookup4(&cilium_ipcache_v2, ip4->saddr, (sizeof(__u32)*8), 0);
  if (info != ((void *)0)) {
   *sec_identity = info->sec_identity;
# 553 "/var/lib/cilium/bpf/bpf_host.c"
   if (*sec_identity != 1)
    srcid_from_ipcache = *sec_identity;
  }
  cilium_dbg(ctx, info ? DBG_IP_ID_MAP_SUCCEED4 : DBG_IP_ID_MAP_FAILED4,
      ip4->saddr, srcid_from_ipcache);
 }

 if (from_host)
  src_id = srcid_from_ipcache;



 else if (__config_secctx_from_ipcache)
  src_id = srcid_from_ipcache;
 return src_id;
}

struct {
 int(*(type))[BPF_MAP_TYPE_PERCPU_ARRAY];
 typeof(__u32) *(key);
 typeof(struct ct_buffer4) *(value);
 int(*(max_entries))[1];
} cilium_tail_call_buffer4 __attribute__((section(".maps"), used));

static inline __attribute__((always_inline)) int
handle_ipv4(struct __sk_buff *ctx, __u32 secctx __attribute__((__unused__)),
     __u32 ipcache_srcid __attribute__((__unused__)),
     const _Bool from_host __attribute__((__unused__)),
     _Bool *punt_to_stack __attribute__((__unused__)),
     __s8 *ext_err __attribute__((__unused__)))
{





 void *data, *data_end;
 struct iphdr *ip4;
 fraginfo_t fraginfo __attribute__((__unused__));

 if (!__revalidate_data_pull(ctx, &data, &data_end, (void **)&ip4, __config_eth_header_length, sizeof(**&ip4), false))
  return -134;
# 667 "/var/lib/cilium/bpf/bpf_host.c"
 return 0;
}

static inline __attribute__((always_inline)) int
handle_ipv4_cont(struct __sk_buff *ctx, __u32 secctx, const _Bool from_host,
   __s8 *ext_err __attribute__((__unused__)))
{
 struct trace_ctx __attribute__((__unused__)) trace = {
  .reason = TRACE_REASON_UNKNOWN,
  .monitor = __config_trace_payload_len,
 };
 __u32 __attribute__((__unused__)) from_host_raw;
 void *data, *data_end;
 struct iphdr *ip4;
 struct remote_endpoint_info *info;
 struct endpoint_info *ep;
 int ret __attribute__((__unused__));
 __u32 magic = 0x0F00;
 _Bool from_proxy = false;

 if (from_host && tc_index_from_ingress_proxy(ctx)) {
  from_proxy = true;
  magic = 0x0A00;
 }
 if (from_host && tc_index_from_egress_proxy(ctx)) {
  from_proxy = true;
  magic = 0x0B00;
 }

 if (!__revalidate_data_pull(ctx, &data, &data_end, (void **)&ip4, __config_eth_header_length, sizeof(**&ip4), false))
  return -134;
# 743 "/var/lib/cilium/bpf/bpf_host.c"
 if (!from_host)
  return 0;



 ep = lookup_ip4_endpoint(ip4);
 if (ep) {
  int l3_off = __config_eth_header_length;




  if (ep->flags & (1 | 2))
   return 0;
# 777 "/var/lib/cilium/bpf/bpf_host.c"
  return ipv4_local_delivery(ctx, l3_off, secctx, magic, ip4, ep,
        METRIC_INGRESS, from_host, false, 0);
 }




 if (!from_host)
  return 0;
# 815 "/var/lib/cilium/bpf/bpf_host.c"
 info = ipcache_lookup4(&cilium_ipcache_v2, ip4->daddr, (sizeof(__u32)*8), 0);
# 830 "/var/lib/cilium/bpf/bpf_host.c"
 if (!info || (!from_proxy &&
        identity_is_world_ipv4(info->sec_identity))) {
# 845 "/var/lib/cilium/bpf/bpf_host.c"
  return -151;
 }


 if (from_proxy && !identity_is_cluster(info->sec_identity))
  ctx->mark = 0x0800;


 return 0;
}

static inline __attribute__((always_inline)) int
tail_handle_ipv4_cont(struct __sk_buff *ctx, _Bool from_host)
{
 __u32 src_sec_identity = ctx_load_and_clear_meta(ctx, CB_SRC_LABEL);
 int ret;
 __s8 ext_err = 0;

 ret = handle_ipv4_cont(ctx, src_sec_identity, from_host, &ext_err);
 if (from_host && ret == 0) {



  ret = rewrite_dmac_to_host(ctx);
 }

 if ((__builtin_expect(!!((ret < 0) || (ret == 2)), 0)))
  return _send_drop_notify((__u8)__id_for_file("bpf_host.c"), 873, ctx, src_sec_identity, 0, 0, ({ typeof(ext_err) __ext_err = (ext_err); ({ typeof(ret) __err = (ret); (__u8)(__err > 0 ? __err : -__err); }) | ((__u8)(__ext_err < -128 ? 0 : __ext_err) << 8); }), 2, METRIC_INGRESS);

 return ret;
}

__attribute__((section("tc" "/tail"), used)) __attribute__((btf_decl_tag("tail:cilium_calls/" "41")))
static inline __attribute__((always_inline))
int tail_handle_ipv4_cont_from_host(struct __sk_buff *ctx)
{
 return tail_handle_ipv4_cont(ctx, true);
}

__attribute__((section("tc" "/tail"), used)) __attribute__((btf_decl_tag("tail:cilium_calls/" "42")))
static inline __attribute__((always_inline))
int tail_handle_ipv4_cont_from_netdev(struct __sk_buff *ctx)
{
 return tail_handle_ipv4_cont(ctx, false);
}

static inline __attribute__((always_inline)) int
tail_handle_ipv4(struct __sk_buff *ctx, __u32 ipcache_srcid, const _Bool from_host)
{
 __u32 src_sec_identity = ctx_load_and_clear_meta(ctx, CB_SRC_LABEL);
 _Bool punt_to_stack = false;
 int ret;
 __s8 ext_err = 0;

 ret = handle_ipv4(ctx, src_sec_identity, ipcache_srcid, from_host,
     &punt_to_stack, &ext_err);


 if (ret == 0) {
  if (punt_to_stack)
   return ret;

  ctx_store_meta(ctx, CB_SRC_LABEL, src_sec_identity);
  if (from_host)
   ret = tail_handle_ipv4_cont_from_host(ctx);



  else
   ret = tail_handle_ipv4_cont_from_netdev(ctx);



 }


 if ((__builtin_expect(!!((ret < 0) || (ret == 2)), 0)))
  return _send_drop_notify((__u8)__id_for_file("bpf_host.c"), 923, ctx, src_sec_identity, 0, 0, ({ typeof(ext_err) __ext_err = (ext_err); ({ typeof(ret) __err = (ret); (__u8)(__err > 0 ? __err : -__err); }) | ((__u8)(__ext_err < -128 ? 0 : __ext_err) << 8); }), 2, METRIC_INGRESS);


 return ret;
}

__attribute__((section("tc" "/tail"), used)) __attribute__((btf_decl_tag("tail:cilium_calls/" "23")))
int tail_handle_ipv4_from_host(struct __sk_buff *ctx)
{
 __u32 ipcache_srcid = 0;





 return tail_handle_ipv4(ctx, ipcache_srcid, true);
}

__attribute__((section("tc" "/tail"), used)) __attribute__((btf_decl_tag("tail:cilium_calls/" "7")))
int tail_handle_ipv4_from_netdev(struct __sk_buff *ctx)
{
 return tail_handle_ipv4(ctx, 0, false);
}
# 1086 "/var/lib/cilium/bpf/bpf_host.c"
static inline __attribute__((always_inline)) int
do_netdev(struct __sk_buff *ctx, __u16 proto, __u32 __attribute__((__unused__)) identity,
   enum trace_point obs_point, const _Bool __attribute__((__unused__)) from_host)
{
 struct trace_ctx trace = {
  .reason = TRACE_REASON_UNKNOWN,
  .monitor = __config_trace_payload_len,
 };
 __u32 __attribute__((__unused__)) ipcache_srcid = 0;
 void __attribute__((__unused__)) *data, *data_end;
 struct ipv6hdr __attribute__((__unused__)) *ip6;
 struct iphdr __attribute__((__unused__)) *ip4;
 int __attribute__((__unused__)) hdrlen = 0;
 __u8 __attribute__((__unused__)) next_proto = 0;
 __s8 __attribute__((__unused__)) ext_err = 0;
 int ret;

 bpf_clear_meta(ctx);

 switch (proto) {


 case (__builtin_constant_p(0x0806) ? ((__u16)( ((__u16)(0x0806) << (16 -(0 +1)*8) >> (16 -8) << (1*8)) | ((__u16)(0x0806) << (16 -(1 +1)*8) >> (16 -8) << (0*8)))) : __builtin_bswap16(0x0806)):
  _send_trace_notify(ctx, obs_point, 0, 0, 0, ctx->ingress_ifindex, trace.reason, trace.monitor, proto, 1110, (__u8)__id_for_file("bpf_host.c"));




   ret = 0;

  break;


 case (__builtin_constant_p(0x86DD) ? ((__u16)( ((__u16)(0x86DD) << (16 -(0 +1)*8) >> (16 -8) << (1*8)) | ((__u16)(0x86DD) << (16 -(1 +1)*8) >> (16 -8) << (0*8)))) : __builtin_bswap16(0x86DD)):
  if (!__revalidate_data_pull(ctx, &data, &data_end, (void **)&ip6, __config_eth_header_length, sizeof(**&ip6), true))
   return _send_drop_notify((__u8)__id_for_file("bpf_host.c"), 1123, ctx, identity, 0, 0, ({ typeof(-134) __err = (-134); (__u8)(__err > 0 ? __err : -__err); }), 2, METRIC_INGRESS);
# 1138 "/var/lib/cilium/bpf/bpf_host.c"
  identity = resolve_srcid_ipv6(ctx, ip6, identity, &ipcache_srcid, from_host);
  ctx_store_meta(ctx, CB_SRC_LABEL, identity);
# 1161 "/var/lib/cilium/bpf/bpf_host.c"
  _send_trace_notify(ctx, obs_point, ipcache_srcid, 0, 0, ctx->ingress_ifindex, trace.reason, trace.monitor, proto, 1162, (__u8)__id_for_file("bpf_host.c"));


  ret = tail_call_internal(ctx, from_host ? 24 :
         10,
      &ext_err);

  return _send_drop_notify((__u8)__id_for_file("bpf_host.c"), 1169, ctx, identity, 0, 0, ({ typeof(ext_err) __ext_err = (ext_err); ({ typeof(ret) __err = (ret); (__u8)(__err > 0 ? __err : -__err); }) | ((__u8)(__ext_err < -128 ? 0 : __ext_err) << 8); }), 0, METRIC_INGRESS);



 case (__builtin_constant_p(0x0800) ? ((__u16)( ((__u16)(0x0800) << (16 -(0 +1)*8) >> (16 -8) << (1*8)) | ((__u16)(0x0800) << (16 -(1 +1)*8) >> (16 -8) << (0*8)))) : __builtin_bswap16(0x0800)):




  if (!__revalidate_data_pull(ctx, &data, &data_end, (void **)&ip4, __config_eth_header_length, sizeof(**&ip4), true))
   return _send_drop_notify((__u8)__id_for_file("bpf_host.c"), 1179, ctx, identity, 0, 0, ({ typeof(-134) __err = (-134); (__u8)(__err > 0 ? __err : -__err); }), 2, METRIC_INGRESS);


  identity = resolve_srcid_ipv4(ctx, ip4, identity, &ipcache_srcid,
           from_host);
  ctx_store_meta(ctx, CB_SRC_LABEL, identity);
# 1204 "/var/lib/cilium/bpf/bpf_host.c"
  _send_trace_notify(ctx, obs_point, ipcache_srcid, 0, 0, ctx->ingress_ifindex, trace.reason, trace.monitor, proto, 1205, (__u8)__id_for_file("bpf_host.c"));


  ret = tail_call_internal(ctx, from_host ? 23 :
         7,
      &ext_err);






  return _send_drop_notify((__u8)__id_for_file("bpf_host.c"), 1217, ctx, identity, 0, 0, ({ typeof(ext_err) __ext_err = (ext_err); ({ typeof(ret) __err = (ret); (__u8)(__err > 0 ? __err : -__err); }) | ((__u8)(__ext_err < -128 ? 0 : __ext_err) << 8); }), 0, METRIC_INGRESS);


 default:
  _send_trace_notify(ctx, obs_point, 0, 0, 0, ctx->ingress_ifindex, trace.reason, trace.monitor, proto, 1221, (__u8)__id_for_file("bpf_host.c"));






  ret = 0;

 }

 return ret;
}
# 1241 "/var/lib/cilium/bpf/bpf_host.c"
__attribute__((section("tc" "/entry"), used))
int cil_from_netdev(struct __sk_buff *ctx)
{
 __u32 src_id = 0;
 __be16 proto = 0;




 int ret;




 if (ctx->vlan_present) {
  __u32 vlan_id = ctx->vlan_tci & 0xfff;

  if (vlan_id) {
   if (allow_vlan(ctx->ifindex, vlan_id))
    return 0;

   ret = -182;
   goto drop_err;
  }
 }

 ctx_skip_nodeport_clear(ctx);
# 1279 "/var/lib/cilium/bpf/bpf_host.c"
 if (!validate_ethertype(ctx, &proto)) {




  _send_trace_notify(ctx, TRACE_TO_STACK, src_id, 0, 0, 0, TRACE_REASON_UNKNOWN, 0, proto, 1286, (__u8)__id_for_file("bpf_host.c"));



  return 0;

 }
# 1300 "/var/lib/cilium/bpf/bpf_host.c"
 do_decrypt(ctx, proto);
 if (ctx->mark == 0x0D00)
  return 0;


 return do_netdev(ctx, proto, 0, TRACE_FROM_NETWORK, false);

drop_err:
 return _send_drop_notify((__u8)__id_for_file("bpf_host.c"), 1308, ctx, src_id, 0, 0, ({ typeof(ret) __err = (ret); (__u8)(__err > 0 ? __err : -__err); }), 2, METRIC_INGRESS);
}





__attribute__((section("tc" "/entry"), used))
int cil_from_host(struct __sk_buff *ctx)
{
 enum trace_point obs_point = TRACE_FROM_HOST;
 __u32 identity = 0;
 int ret __attribute__((__unused__));
 __be16 proto = 0;
 __u32 magic;




 edt_set_aggregate(ctx, 0);

 if (!validate_ethertype(ctx, &proto)) {
  __u32 dst_sec_identity = 0;
  __u32 src_sec_identity = 1;






  _send_trace_notify(ctx, TRACE_TO_STACK, src_sec_identity, dst_sec_identity, 0, 0, TRACE_REASON_UNKNOWN, 0, proto, 1340, (__u8)__id_for_file("bpf_host.c"));



  return 0;

 }
# 1356 "/var/lib/cilium/bpf/bpf_host.c"
 magic = inherit_identity_from_host(ctx, &identity);
 if (magic == 0x0A00 || magic == 0x0B00)
  obs_point = TRACE_FROM_PROXY;


 if (magic == 0x0E00) {
  ret = 0;

  _send_trace_notify(ctx, TRACE_FROM_STACK, identity, 0, 0, ctx->ingress_ifindex, TRACE_REASON_ENCRYPTED, 0, proto, 1366, (__u8)__id_for_file("bpf_host.c"));
# 1373 "/var/lib/cilium/bpf/bpf_host.c"
  return ret;
 }


 return do_netdev(ctx, proto, identity, obs_point, true);
}





__attribute__((section("tc" "/entry"), used))
int cil_to_netdev(struct __sk_buff *ctx)
{
 __u32 magic = ctx->mark & 0x0F00;
 __u32 dst_sec_identity = 0;
 __u32 src_sec_identity = 0;
 struct trace_ctx trace = {
  .reason = TRACE_REASON_UNKNOWN,
  .monitor = 0,
 };
 __be16 __attribute__((__unused__)) proto = 0;
 __u32 vlan_id;
 int ret = 0;
 __s8 ext_err = 0;

 bpf_clear_meta(ctx);

 if (magic == 0x0C00 || magic == 0x0400 || ctx_mark_is_wireguard(ctx))
  src_sec_identity = 1;

 else if (magic == 0x0F00)
  src_sec_identity = get_identity(ctx);
# 1414 "/var/lib/cilium/bpf/bpf_host.c"
 if (ctx->vlan_present) {
  vlan_id = ctx->vlan_tci & 0xfff;
  if (vlan_id) {
   if (allow_vlan(ctx->ifindex, vlan_id))
    return 0;

   ret = -182;
   goto drop_err;
  }
 }
# 1436 "/var/lib/cilium/bpf/bpf_host.c"
 validate_ethertype(ctx, &proto);
# 1483 "/var/lib/cilium/bpf/bpf_host.c"
 ret = 0;
 if ((__builtin_expect(!!((ret < 0) || (ret == 2)), 0)))
  goto drop_err;
# 1621 "/var/lib/cilium/bpf/bpf_host.c"
 if ((ctx->mark & 0x0F00) != 0x0E00) {
  ret = ipsec_maybe_redirect_to_encrypt(ctx, proto,
            src_sec_identity);
  if (ret == 7)
   return ret;
  else if ((__builtin_expect(!!((ret < 0) || (ret == 2)), 0)))
   goto drop_err;
 } else {
  trace.reason |= TRACE_REASON_ENCRYPTED;
 }
# 1692 "/var/lib/cilium/bpf/bpf_host.c"
 if ((__builtin_expect(!!((ret < 0) || (ret == 2)), 0)))
  goto drop_err;

 _send_trace_notify(ctx, TRACE_TO_NETWORK, src_sec_identity, dst_sec_identity, 0, __config_interface_ifindex, trace.reason, trace.monitor, proto, 1697, (__u8)__id_for_file("bpf_host.c"));



 return ret;

drop_err:
 return _send_drop_notify((__u8)__id_for_file("bpf_host.c"), 1703, ctx, src_sec_identity, 0, 0, ({ typeof(ext_err) __ext_err = (ext_err); ({ typeof(ret) __err = (ret); (__u8)(__err > 0 ? __err : -__err); }) | ((__u8)(__ext_err < -128 ? 0 : __ext_err) << 8); }), 2, METRIC_EGRESS);

}





__attribute__((section("tc" "/entry"), used))
int cil_to_host(struct __sk_buff *ctx)
{
 __u32 magic = ctx_load_meta(ctx, CB_SRC_LABEL);
 __u16 __attribute__((__unused__)) proto = 0;
 struct trace_ctx trace = {
  .reason = TRACE_REASON_UNKNOWN,
  .monitor = 0,
 };
 int ret = 0;
 _Bool traced = false;
 __u32 src_id = 0;
 __s8 ext_err = 0;




 if ((ctx->mark & 0x0F00) == 0x0200)
  magic = ctx->mark;

 else if ((ctx->mark & 0x0F00) == 0x0E00)
  magic = ctx->mark;


 if ((magic & 0xFFFF) == 0x0200) {

  __be16 port = magic >> 16;



  traced = true;

  ctx_store_meta(ctx, CB_SRC_LABEL, 0);
  ret = ctx_redirect_to_proxy_first(ctx, port);
  goto out;
 }

 else if ((magic & 0x0F00) == 0x0E00) {
  ctx->mark = magic;
  src_id = ctx_load_meta(ctx, CB_CT_STATE);
 }
# 1759 "/var/lib/cilium/bpf/bpf_host.c"
 skb_change_type(ctx, 0);
# 1792 "/var/lib/cilium/bpf/bpf_host.c"
 if (ctx->mark == 0 && __config_interface_ifindex == 5)
  ctx->mark = 0x0800;
# 1846 "/var/lib/cilium/bpf/bpf_host.c"
 ret = 0;


out:
 if ((__builtin_expect(!!((ret < 0) || (ret == 2)), 0)))
  return _send_drop_notify((__u8)__id_for_file("bpf_host.c"), 1852, ctx, src_id, 0, 0, ({ typeof(ext_err) __ext_err = (ext_err); ({ typeof(ret) __err = (ret); (__u8)(__err > 0 ? __err : -__err); }) | ((__u8)(__ext_err < -128 ? 0 : __ext_err) << 8); }), 2, METRIC_INGRESS);


 if (!traced)
  _send_trace_notify(ctx, TRACE_TO_STACK, src_id, 0, 0, 6, trace.reason, trace.monitor, proto, 1857, (__u8)__id_for_file("bpf_host.c"));



 return ret;
}
# 2050 "/var/lib/cilium/bpf/bpf_host.c"
__attribute__((section("tc" "/entry"), used))
int cil_host_policy(struct __sk_buff *ctx __attribute__((__unused__)))
{
# 2077 "/var/lib/cilium/bpf/bpf_host.c"
 return 0;

}

char ____license[] __attribute__((section("license"), used)) = "Dual BSD/GPL";
