diff options
Diffstat (limited to 'xlators/protocol/auth/addr/src/addr.c')
| -rw-r--r-- | xlators/protocol/auth/addr/src/addr.c | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/xlators/protocol/auth/addr/src/addr.c b/xlators/protocol/auth/addr/src/addr.c index f64259e3c11..bf12c455d7c 100644 --- a/xlators/protocol/auth/addr/src/addr.c +++ b/xlators/protocol/auth/addr/src/addr.c @@ -12,7 +12,7 @@ #include <sys/socket.h> #include <netdb.h> #include "authenticate.h" -#include "dict.h" +#include <glusterfs/dict.h> #include "rpc-transport.h" #define ENTRY_DELIMITER "," @@ -65,10 +65,18 @@ compare_addr_and_update(char *option_str, char *peer_addr, char *subvol, goto out; } } else { - match = fnmatch(addr_str, peer_addr, 0); - if (negate ? match : !match) { - *result = status; - goto out; + if (strstr(addr_str, "/")) { + match = gf_is_ip_in_net(addr_str, peer_addr); + if (negate ? !match : match) { + *result = status; + goto out; + } + } else { + match = fnmatch(addr_str, peer_addr, 0); + if (negate ? match : !match) { + *result = status; + goto out; + } } } |
