Skip to content

Commit

Permalink
f
Browse files Browse the repository at this point in the history
  • Loading branch information
SanjoDeundiak committed Dec 4, 2024
1 parent 92d0163 commit a48b699
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ockam_ebpf_impl/src/common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ pub type Port = u16;

/// Ports that we run inlets on
#[map]
static PORT_MAP: HashMap<Port, Proto> = HashMap::pinned(1024, 0);
static OCKAM_PORT_MAP: HashMap<Port, Proto> = HashMap::pinned(1024, 0);

// TODO: Check
// BPF_F_NO_PREALLOC
Expand Down Expand Up @@ -118,7 +118,7 @@ fn handle_ingress_tcp_protocol(ctx: &TcContext, ipv4hdr: *mut Ipv4Hdr) -> Result
let fin = tcphdr_stack.fin();
let rst = tcphdr_stack.rst();

if let Some(proto) = unsafe { PORT_MAP.get(&dst_port) } {
if let Some(proto) = unsafe { OCKAM_PORT_MAP.get(&dst_port) } {
let proto = *proto;
trace!(
ctx,
Expand Down Expand Up @@ -219,7 +219,7 @@ fn handle_egress_ockam_protocol(ctx: &TcContext, ipv4hdr: *mut Ipv4Hdr) -> Resul
let fin = tcphdr_stack.fin();
let rst = tcphdr_stack.rst();

if let Some(port_proto) = unsafe { PORT_MAP.get(&src_port) } {
if let Some(port_proto) = unsafe { OCKAM_PORT_MAP.get(&src_port) } {
if proto == *port_proto {
trace!(
ctx,
Expand Down

0 comments on commit a48b699

Please sign in to comment.