Skip to content

Commit

Permalink
changes to fix win32 build, comments
Browse files Browse the repository at this point in the history
  • Loading branch information
radkesvat committed Aug 8, 2024
1 parent 9c05cb3 commit 72ca317
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion tunnels/layer3/ip_routing_table/ip_routing_table.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ static void upStreamSrcMode(tunnel_t *self, context_t *c)
{
for (unsigned int i = 0; i < state->routes_len; i++)
{
if (state->routes[i].v4 && checkIPRange4((struct in_addr) {packet->ip4_header.saddr},
if (state->routes[i].v4 && checkIPRange4(*(struct in_addr*) (&packet->ip4_header.saddr),
state->routes[i].ip.ip4, state->routes[i].mask.mask4))
{
state->routes[i].next->upStream(state->routes[i].next, c);
Expand Down
5 changes: 3 additions & 2 deletions tunnels/layer3/ip_routing_table/ip_routing_table.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
#pragma once
#include "api.h"

// Layer3Packet <------> if(ip == rule) <------> Layer3Packet
// ------> Layer3Packet Route A
// Layer3Packet ------> if(ip == rule.ip)
// ------> Layer3Packet Route B

tunnel_t * newLayer3IpRoutingTable(node_instance_context_t *instance_info);
api_result_t apiLayer3IpRoutingTable(tunnel_t *self, const char *msg);
Expand Down

0 comments on commit 72ca317

Please sign in to comment.