use fnmatch on the domain name

This commit is contained in:
Omar Polo 2021-01-21 09:07:26 +00:00
parent 15209ad9ed
commit b4d409cf29
1 changed files with 2 additions and 1 deletions

View File

@ -22,6 +22,7 @@
#include <assert.h>
#include <errno.h>
#include <fcntl.h>
#include <fnmatch.h>
#include <string.h>
#include "gmid.h"
@ -185,7 +186,7 @@ handle_handshake(struct pollfd *fds, struct client *c)
if (!strcmp(h->domain, "*"))
break;
if (servname != NULL && !strcmp(h->domain, servname))
if (servname != NULL && !fnmatch(h->domain, servname, 0))
break;
}