aboutsummaryrefslogtreecommitdiff
path: root/src/core/ngx_inet.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/ngx_inet.c')
-rw-r--r--src/core/ngx_inet.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/ngx_inet.c b/src/core/ngx_inet.c
index 68be0ef02..910846f02 100644
--- a/src/core/ngx_inet.c
+++ b/src/core/ngx_inet.c
@@ -206,7 +206,7 @@ ngx_int_t ngx_ptocidr(ngx_str_t *text, void *cidr)
return NGX_OK;
}
- in_cidr->mask = (ngx_uint_t) (0 - (1 << (32 - m)));
+ in_cidr->mask = htonl((ngx_uint_t) (0 - (1 << (32 - m))));
return NGX_OK;
}