Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
ACL: Fix ugly typo in the address parsing
  • Loading branch information
perexg committed Sep 17, 2014
1 parent 9ac202d commit 3c0ca05
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/access.c
Expand Up @@ -588,7 +588,7 @@ access_set_prefix(access_entry_t *ae, const char *prefix)
if (prefixlen < 0 || prefixlen > 128)
goto fnext;
} else {
prefixlen = !access_addr4_empty(buf) ? 128 : 0;
prefixlen = !access_addr6_empty(buf) ? 128 : 0;
}

ai->ai_prefixlen = prefixlen;
Expand All @@ -603,7 +603,7 @@ access_set_prefix(access_entry_t *ae, const char *prefix)
if (prefixlen < 0 || prefixlen > 32)
goto fnext;
} else {
prefixlen = !access_addr6_empty(buf) ? 32 : 0;
prefixlen = !access_addr4_empty(buf) ? 32 : 0;
}

s_addr = inet_addr(buf);
Expand Down

0 comments on commit 3c0ca05

Please sign in to comment.