Skip to content

Commit

Permalink
Fix rule parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
tony-josi-aws committed Jan 16, 2024
1 parent f000fdd commit 425b010
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions source/firewall/FreeRTOS_Firewall.c
Original file line number Diff line number Diff line change
Expand Up @@ -94,13 +94,13 @@ static BaseType_t xRuleParser_IPv4(xFirewallRule_IPv4_t *xRuleObj, uint8_t * ucR
uint32_t uxDestnPort;
uint32_t ucProtocol;
uint32_t ucAction;
uint32_t uxWildcardBitmap;
uint32_t uxWildcardBitmap = 0;

char *ucCurrToken = strtok((char *) ucRuleString, " ");

while (ucCurrToken != NULL && xResult == pdPASS)
{
ucCurrToken = strtok(NULL, "-");

switch (uxTokenCount)
{
case 0:
Expand Down Expand Up @@ -165,6 +165,7 @@ static BaseType_t xRuleParser_IPv4(xFirewallRule_IPv4_t *xRuleObj, uint8_t * ucR
default:
break;
}
ucCurrToken = strtok(NULL, " ");
uxTokenCount++;
}

Expand Down

0 comments on commit 425b010

Please sign in to comment.