Hi,
In gen_smtp I encounter a problem when testing on OTP 25:
6> inet_res:lookup("10.0.0.1", in, mx).
** exception error: no function clause matching inet_res:lookup_filter("1.0.0.10.in-addr.arpa",in,mx) (inet_res.erl, line 188)
7> inet_res:lookup({127,0,0,1}, in, mx).
** exception error: no function clause matching inet_res:lookup_filter("1.0.0.127.in-addr.arpa",in,mx) (inet_res.erl, line 188)
8> inet_res:lookup("erlang.org", in, mx).
[{10,"hel.cslab.ericsson.net"}]
This works well in OTP 24:
3> inet_res:lookup("127.0.0.1", in, mx).
[]
4> inet_res:lookup({127,0,0,1}, in, mx).
[]
To me this seems to be a problem in inet_res:resolve
on OTP 25, which returns an illegal return value on an input that looks like an IP address.
Compare resolve
with OTP24:
6> inet_res:resolve("127.0.0.1", in, a).
{ok,#dns_rec{header = #dns_header{id = 3,qr = true,
opcode = query,aa = false,tc = false,rd = true,ra = true,
pr = false,rcode = 0},
qdlist = [#dns_query{domain = "1.0.0.127.IN-ADDR.ARPA",
type = a,class = in}],
anlist = [],nslist = [],arlist = []}}
And on OTP25:
2> inet_res:resolve("127.0.0.1", in, a).
"1.0.0.127.in-addr.arpa"
Cheers, Marc