Hello!
It seems that attempting to send broadcast UDP packets via udpsock:send
fails:
connect(3, {sa_family=AF_INET, sin_port=htons(12345),
sin_addr=inet_addr("x.x.x.255")}, 16) = -1 EACCES (Permission denied)
(and the corresponding ngx error log):
2014/09/15 16:53:59 [crit] 21286#0: connect() failed (13: Permission
denied), context: ngx.timer
Based on
http://stackoverflow.com/questions/11457676/python-socket-error-errno-13-permission-denied,
it seems that this is a function of the socket object trying to send
unicast packets; Lua seems to have an option to set the broadcast flag,
but based on http://wiki.nginx.org/HttpLuaModule#tcpsock:setoption, it
seems this isn't currently supported. Is this analysis correct? Any
plans to implement this in the near future?