Software /
code /
prosody
Comparison
net/server_select.lua @ 9634:f457edaab510 0.11
net.server_select: Fix IP validation to use correct variable (thanks quest)
Copy-paste mistake most likely. Not caught because server_select is ignored by luacheck.
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sat, 17 Nov 2018 16:26:40 +0100 |
parent | 9499:36e379f058c8 |
child | 9635:fc2266339cd8 |
child | 11063:30d3f6f85eb8 |
comparison
equal
deleted
inserted
replaced
9632:fdefc43bffff | 9634:f457edaab510 |
---|---|
1007 err = "invalid port" | 1007 err = "invalid port" |
1008 elseif sslctx and not has_luasec then | 1008 elseif sslctx and not has_luasec then |
1009 err = "luasec not found" | 1009 err = "luasec not found" |
1010 end | 1010 end |
1011 if not typ then | 1011 if not typ then |
1012 local n = inet_pton(addr); | 1012 local n = inet_pton(address); |
1013 if not n then return nil, "invalid-ip"; end | 1013 if not n then return nil, "invalid-ip"; end |
1014 if #n == 16 then | 1014 if #n == 16 then |
1015 typ = "tcp6"; | 1015 typ = "tcp6"; |
1016 elseif #n == 4 then | 1016 elseif #n == 4 then |
1017 typ = "tcp4"; | 1017 typ = "tcp4"; |