bind_to is ignored in snmpm_net_if
Pavel Baturko <[email protected]>
| Newsgroups | gmane.comp.lang.erlang.bugs |
|---|---|
| Message-ID | <CAOBKM08TVZWgevmsq_KNqADePM1juOdHB1dVm3QQ6aptumZCBw@mail.gmail.com> |
Hi,
I'm looking into erlang snmp manager code because my manager stops working
when I updated erlang from 17.1 to 17.3.
The problem is that in otp/lib/snmp/src/manager/snmpm_net_if.erl (github
erlang/otp, branch maint) in function socket_params parameter BindTo is
ignored in case of Family==inet and init
:get_argument(snmp_fd)==error:
socket_params(Domain, {IpAddr, IpPort}, BindTo, CommonSocketOpts) ->
...
case Family of
inet ->
case init:get_argument(snmp_fd) of
{ok, [[FdStr]]} ->
...
error ->
{IpPort, [{ip, IpAddr} | SocketOpts]} <<<<<<<< *
end;
_ ->
...
end.
*: here ip option is added regardless of BindTo argument.
in other cases branches this option is utilized.
When address option is not specified in manager.conf snmp manager uses
127.0.0.1 as default and socket is binding to 127.0.0.1. After that all
gen_upd:send fails with einval.
Thanks,
Pavel
_______________________________________________
erlang-bugs mailing list
[email protected]
http://erlang.org/mailman/listinfo/erlang-bugs