Re: [exim-dev] Bug 2369: single-key lookup type based on li…

Top Page
Delete this message
Reply to this message
Author: Jeremy Harris
Date:  
To: exim-dev
Subject: Re: [exim-dev] Bug 2369: single-key lookup type based on libcorkipset
On 26/02/2019 16:17, Ian Zimmerman via Exim-dev wrote:
> On 2019-02-26 11:21, Jeremy Harris wrote:
>
>>> And bingo, it seems to not work as documented:
>
> devuan-205f!35 exim$ cat strange-iplist
> "0000:0000:0000:0000:0000:ffff:0102:0203" : data
> "::ffff:102:203" : also_data
> 1.2.3.4 : more_data



> devuan-205f!38 exim$ ./src/build-Linux-aarch64/exim -C /home/itz/exim/exim.conf -be '${lookup{0000:0000:0000:0000:0000:ffff:0102:0203}iplsearch{/home/itz/exim/strange-iplist}{good}{bad}}'
> bad
> devuan-205f!39 exim$ ./src/build-Linux-aarch64/exim -C /home/itz/exim/exim.conf -be '${lookup{::ffff:102:203}iplsearch{/home/itz/exim/strange-iplist}{good}{bad}}'
> bad


The address being looked up, ::ffff:102:203, is an ipv6-mapped ipv4
and we'd expect it to match 1.2.2.3 in the file. But you only have
1.2.3.4


>> So far, I see you giving a dot-group-hex ipv6 to an iplsearch
>> lookup, which is wrong per docs:
>> "key for an iplsearch lookup must be an IP address".
>
> Huh? Both commands 38 and 39 (2nd and 3rd from the end in my up thread
> post) try looking up a colon-separated IPv6 address which is present in
> the file -- in fact the same address in both the abbreviated and full
> forms -- and do not find it.


I was looking at your last test, with
0000.0000.0000.0000.0000.ffff.0102.0203

--
Cheers,
Jeremy