Skip to content

Commit

Permalink
fix win 32 build
Browse files Browse the repository at this point in the history
  • Loading branch information
radkesvat committed Aug 8, 2024
1 parent b6ad19c commit 0d7a325
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions tunnels/layer3/ip_routing_table/ip_routing_table.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,8 @@ static void upStreamSrcMode(tunnel_t *self, context_t *c)
{
for (unsigned int i = 0; i < state->routes_len; i++)
{
const struct in_addr addr = { .s_addr = packet->ip4_header.saddr };
if (state->routes[i].v4 && checkIPRange4(addr,
state->routes[i].ip.ip4, state->routes[i].mask.mask4))
const struct in_addr addr = {.s_addr = packet->ip4_header.saddr};
if (state->routes[i].v4 && checkIPRange4(addr, state->routes[i].ip.ip4, state->routes[i].mask.mask4))
{
state->routes[i].next->upStream(state->routes[i].next, c);
}
Expand Down Expand Up @@ -86,8 +85,8 @@ static void upStreamDestMode(tunnel_t *self, context_t *c)
{
for (unsigned int i = 0; i < state->routes_len; i++)
{
if (checkIPRange4((struct in_addr) {packet->ip4_header.daddr}, state->routes[i].ip.ip4,
state->routes[i].mask.mask4))
const struct in_addr addr = {.s_addr = packet->ip4_header.saddr};
if (checkIPRange4(addr, state->routes[i].ip.ip4, state->routes[i].mask.mask4))
{
state->routes[i].next->upStream(state->routes[i].next, c);
}
Expand Down Expand Up @@ -141,7 +140,7 @@ static routing_rule_t parseRule(struct node_manager_config_s *cfg, unsigned int
rule.v4 = ipver == 4;
globalFree(temp);
temp = NULL;

if (! getStringFromJsonObject(&(temp), rule_obj, "next"))
{
LOGF("JSON Error: Layer3IpRoutingTable->settings->rules next tunnel not specified");
Expand Down

0 comments on commit 0d7a325

Please sign in to comment.