diff options
Diffstat (limited to 'xlators/protocol/auth/addr/src')
| -rw-r--r-- | xlators/protocol/auth/addr/src/addr.c | 16 | 
1 files changed, 12 insertions, 4 deletions
diff --git a/xlators/protocol/auth/addr/src/addr.c b/xlators/protocol/auth/addr/src/addr.c index 0d995862de4..bf12c455d7c 100644 --- a/xlators/protocol/auth/addr/src/addr.c +++ b/xlators/protocol/auth/addr/src/addr.c @@ -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; +                }              }          }  | 
