Welcome! Log In Create A New Profile

Advanced

[nginx] Fixed the NGX_UNIX_ADDRSTRLEN macro.

Maxim Dounin
October 17, 2017 09:08AM
details: http://hg.nginx.org/nginx/rev/dea142ac3deb
branches: stable-1.12
changeset: 7144:dea142ac3deb
user: Ruslan Ermilov <ru@nginx.com>
date: Mon Sep 25 15:19:24 2017 +0300
description:
Fixed the NGX_UNIX_ADDRSTRLEN macro.

diffstat:

src/core/ngx_inet.h | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)

diffs (17 lines):

diff --git a/src/core/ngx_inet.h b/src/core/ngx_inet.h
--- a/src/core/ngx_inet.h
+++ b/src/core/ngx_inet.h
@@ -17,10 +17,11 @@
#define NGX_INET6_ADDRSTRLEN \
(sizeof("ffff:ffff:ffff:ffff:ffff:ffff:255.255.255.255") - 1)
#define NGX_UNIX_ADDRSTRLEN \
- (sizeof(struct sockaddr_un) - offsetof(struct sockaddr_un, sun_path))
+ (sizeof("unix:") - 1 + \
+ sizeof(struct sockaddr_un) - offsetof(struct sockaddr_un, sun_path))

#if (NGX_HAVE_UNIX_DOMAIN)
-#define NGX_SOCKADDR_STRLEN (sizeof("unix:") - 1 + NGX_UNIX_ADDRSTRLEN)
+#define NGX_SOCKADDR_STRLEN NGX_UNIX_ADDRSTRLEN
#elif (NGX_HAVE_INET6)
#define NGX_SOCKADDR_STRLEN (NGX_INET6_ADDRSTRLEN + sizeof("[]:65535") - 1)
#else
_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[nginx] Fixed the NGX_UNIX_ADDRSTRLEN macro.

Maxim Dounin 276 October 17, 2017 09:08AM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 138
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready