Mercurial > prosody-modules
comparison mod_net_proxy/mod_net_proxy.lua @ 2975:7eb6fa9b03fd
mod_net_proxy: Added missing return when detecting unparseable PROXYv1 source address
author | Pascal Mathis <mail@pascalmathis.com> |
---|---|
date | Sun, 01 Apr 2018 22:43:15 +0200 |
parents | 504bb330e910 |
children | 97b30fec709c |
comparison
equal
deleted
inserted
replaced
2974:cd36b16f6b35 | 2975:7eb6fa9b03fd |
---|---|
157 | 157 |
158 -- Ensure that received source and destination address can be parsed | 158 -- Ensure that received source and destination address can be parsed |
159 local _, err = ip.new_ip(src_addr); | 159 local _, err = ip.new_ip(src_addr); |
160 if err ~= nil then | 160 if err ~= nil then |
161 module:log("warn", "Received unparseable PROXYv1 source address from %s: %s", conn:ip(), src_addr); | 161 module:log("warn", "Received unparseable PROXYv1 source address from %s: %s", conn:ip(), src_addr); |
162 return PROTO_HANDLER_STATUS.FAILURE, nil; | |
162 end | 163 end |
163 _, err = ip.new_ip(dst_addr); | 164 _, err = ip.new_ip(dst_addr); |
164 if err ~= nil then | 165 if err ~= nil then |
165 module:log("warn", "Received unparseable PROXYv1 destination address from %s: %s", conn:ip(), dst_addr); | 166 module:log("warn", "Received unparseable PROXYv1 destination address from %s: %s", conn:ip(), dst_addr); |
166 return PROTO_HANDLER_STATUS.FAILURE, nil; | 167 return PROTO_HANDLER_STATUS.FAILURE, nil; |