[erlang-bugs] diameter_transport any/loopback atoms not accepted

anders.gs.svensson@REDACTED anders.gs.svensson@REDACTED
Mon Feb 27 12:35:02 CET 2017


Hi Vincent.

Neither diameter_tcp nor diameter_sctp document any|loopback as
acceptable that I can see: they require an inet:ip_address(), neither
or which is an atom. Where are you looking?

That said, I'm not sure offhand why they don't/shouldn't handle these.

Anders, Erlang/OTP


erlang-bugs-request@REDACTED writes:
> 
> Hello,
> 
> I am using erlang 19.2.3. I have detected that when adding a transport to the diameter service, the options {ip, any}  or {ip, loopback} are not accepted, even though it is defined on the spec "IP = inet:ip_address() | any | loopback"
> For example:
> 
>     Opts = [{transport_module, diameter_sctp},
>                    {transport_config, [ {ip, any]}],
>     {ok, _T} = diameter:add_transport(?SERVER, {listen, Opts}),
> 
> This happens with both diameter_sctp and diameter_tcp, you can check the errors given bellow.
> Rgds,
> Vicent
> 
> TCP:
> {error,
>  {invalid_address,
>   [{diameter_lib,ip,1,[{file,"base/diameter_lib.erl"},{line,287}]},
>    {diameter_lib,ipaddr,1,[{file,"base/diameter_lib.erl"},{line,270}]},
>    {diameter_tcp,get_addr,2,[{file,"transport/diameter_tcp.erl"},{line,387}]},
>    {diameter_tcp,i,1,[{file,"transport/diameter_tcp.erl"},{line,255}]},
>    {diameter_tcp,init,1,[{file,"transport/diameter_tcp.erl"},{line,195}]},
>    {proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,247}]}
>   ]
>  }
> } in diameter_tcp:init/7 line 293
> 
> SCTP:
> {error,
>  {invalid_address,
>   [{diameter_lib,ip,1,[{file,"base/diameter_lib.erl"},{line,287}]},
>    {diameter_lib,ipaddr,1,[{file,"base/diameter_lib.erl"},{line,270}]},
>    {diameter_sctp,'-addrs/2-lc$^1/1-0-',1,[{file,"transport/diameter_sctp.erl"},{line,325}]},
>    {diameter_sctp,addrs,2,[{file,"transport/diameter_sctp.erl"},{line,325}]},
>    {diameter_sctp,open,3,[{file,"transport/diameter_sctp.erl"},{line,312}]},
>    {diameter_sctp,i,1,[{file,"transport/diameter_sctp.erl"},{line,223}]},
>    {diameter_sctp,init,1,[{file,"t..."},...]},...]
>  }
> } in diameter_sctp:s/4 line 151
> 
> 
> ------------------------------
> 
> _______________________________________________
> erlang-bugs mailing list
> erlang-bugs@REDACTED
> http://erlang.org/mailman/listinfo/erlang-bugs
> 
> 
> End of erlang-bugs Digest, Vol 256, Issue 2
> *******************************************



More information about the erlang-bugs mailing list