Skip to content

Commit

Permalink
config: Compare local_name case insensitive
Browse files Browse the repository at this point in the history
DNS and certificate names should be compared
case insensitive.
  • Loading branch information
cmouse authored and GitLab committed Oct 17, 2016
1 parent 46b0db4 commit c19c44f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/config/config-filter.c
Expand Up @@ -36,7 +36,7 @@ static bool config_filter_match_rest(const struct config_filter *mask,
if (mask->local_name != NULL) {
if (filter->local_name == NULL)
return FALSE;
if (strcmp(filter->local_name, mask->local_name) != 0)
if (strcasecmp(filter->local_name, mask->local_name) != 0)
return FALSE;
}
/* FIXME: it's not comparing full masks */
Expand Down Expand Up @@ -82,7 +82,7 @@ bool config_filters_equal(const struct config_filter *f1,
if (!net_ip_compare(&f1->local_net, &f2->local_net))
return FALSE;

if (null_strcmp(f1->local_name, f2->local_name) != 0)
if (null_strcasecmp(f1->local_name, f2->local_name) != 0)
return FALSE;

return TRUE;
Expand Down

0 comments on commit c19c44f

Please sign in to comment.