diff options
author | Axel Duch <axel.duch@nginx.com> | 2019-12-24 13:58:10 +0000 |
---|---|---|
committer | Axel Duch <axel.duch@nginx.com> | 2019-12-24 13:58:10 +0000 |
commit | 8677bf8d41e002310971fddbc5e45c64034afc2f (patch) | |
tree | 0560a4f60031459c16ed19980668f86d66175bed /src/nxt_sockaddr.c | |
parent | 26ee4cb6c8a2248f0f7c99d8c622c86a52bf197a (diff) | |
download | unit-8677bf8d41e002310971fddbc5e45c64034afc2f.tar.gz unit-8677bf8d41e002310971fddbc5e45c64034afc2f.tar.bz2 |
Router: introducing routing on client address.
Diffstat (limited to 'src/nxt_sockaddr.c')
-rw-r--r-- | src/nxt_sockaddr.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/nxt_sockaddr.c b/src/nxt_sockaddr.c index 57dfbfa6..af696a6b 100644 --- a/src/nxt_sockaddr.c +++ b/src/nxt_sockaddr.c @@ -1140,6 +1140,10 @@ nxt_inet_addr(u_char *buf, size_t length) in_addr_t addr; nxt_uint_t digit, octet, dots; + if (nxt_slow_path(*(buf + length - 1) == '.')) { + return INADDR_NONE; + } + addr = 0; octet = 0; dots = 0; |