diff 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
line wrap: on
line diff
--- a/mod_net_proxy/mod_net_proxy.lua	Sun Apr 01 22:41:40 2018 +0200
+++ b/mod_net_proxy/mod_net_proxy.lua	Sun Apr 01 22:43:15 2018 +0200
@@ -159,6 +159,7 @@
 	local _, err = ip.new_ip(src_addr);
 	if err ~= nil then
 		module:log("warn", "Received unparseable PROXYv1 source address from %s: %s", conn:ip(), src_addr);
+		return PROTO_HANDLER_STATUS.FAILURE, nil;
 	end
 	_, err = ip.new_ip(dst_addr);
 	if err ~= nil then