Welcome! Log In Create A New Profile

Advanced

[PATCH] Unix domain sockets in abstract namespace

Dirk Feytons
September 12, 2012 05:48AM
Hi,

I was playing around with ngx_lua and its socket API, which is built
on top of nginx functionality. The API supports unix domain sockets
but not in the abstract namespace, at least not officially. When I
tried specifying an abstract address I found it didn't work. I tracked
it down to two calls to ngx_cpystrn() in
core/ngx_inet.c:ngx_parse_unix_domain_url(). That function gets
confused by the leading '\0' in an abstract namespace address.
Changing it to ngx_memcpy() fixes this and then everything works.

I attached a patch agains nginx 1.2.3. The fix seems trivial but this
is my first look into the nginx internals so I don't know whether
there are unwanted side effects from this change. Feedback welcome.

Regards,

Dirk F.
_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
SubjectAuthorViewsPosted

[PATCH] Unix domain sockets in abstract namespace Attachments

Dirk Feytons732September 12, 2012 05:48AM

Re: [PATCH] Unix domain sockets in abstract namespace

Maxim Dounin216September 19, 2012 09:58AM

Re: [PATCH] Unix domain sockets in abstract namespace

Dirk Feytons245September 21, 2012 03:30AM

Re: [PATCH] Unix domain sockets in abstract namespace

Maxim Dounin414September 25, 2012 01:20AM



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

Online Users

Guests: 61
Record Number of Users: 7 on March 06, 2014
Record Number of Guests: 229 on August 01, 2014
Powered by nginx    Powered by FreeBSD    PHP Powered    Powered by Percona     ipv6 ready