diff options
author | Vladimír Čunát <vladimir.cunat@nic.cz> | 2019-02-25 11:49:32 +0100 |
---|---|---|
committer | Vladimír Čunát <vladimir.cunat@nic.cz> | 2019-02-25 13:10:46 +0100 |
commit | 7bd892c9b21d9423452e04f105b18288b877124e (patch) | |
tree | 2978e5b7f830e7f8dc532cfcfa7e40ea3294025d /daemon/lua/kres.lua | |
parent | lib/utils kr_straddr_split(): simplify the API (diff) | |
download | knot-resolver-7bd892c9b21d9423452e04f105b18288b877124e.tar.xz knot-resolver-7bd892c9b21d9423452e04f105b18288b877124e.zip |
modules/policy: support '#' for separating port numbers
and deduplicate the parsing logic.
Diffstat (limited to 'daemon/lua/kres.lua')
-rw-r--r-- | daemon/lua/kres.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/daemon/lua/kres.lua b/daemon/lua/kres.lua index 8cb00461..6e48026c 100644 --- a/daemon/lua/kres.lua +++ b/daemon/lua/kres.lua @@ -239,7 +239,7 @@ local timeval_t = ffi.typeof('struct timeval') -- Metatype for sockaddr local addr_buf = ffi.new('char[16]') -local str_addr_buf = ffi.new('char[46 + 1 + 6 + 1]') -- IPv6 + #port + \0 +local str_addr_buf = ffi.new('char[46 + 1 + 6 + 1]') -- INET6_ADDRSTRLEN + #port + \0 local str_addr_buf_len = ffi.sizeof(str_addr_buf) local sockaddr_t = ffi.typeof('struct sockaddr') ffi.metatype( sockaddr_t, { |