[SNMP4J] renewSocketAfterException() binds to a specific address

Prema Upot prema.upot at optelian.com
Tue Jul 22 20:18:39 CEST 2014


Hi,

We initialize DefaultUdpTransportMapping using the default constructor and this makes sure the listening port binds to "0.0.0.0" address enabling sending and receiving UDP packets on any interface. But in renewSocketAfterException() the new socket is created using port and ipaddress as parameters and this causes a problems in a PC that is part of multiple networks.
For example, we have a PC in 192.168.144.0 and 192.168.30.0 networks. After socket exception, the new socket that is created binds to "192.168.144.<ip>:<port>" instead of "0.0.0.0:<port>" and because of this we cannot communicate with 30.0 network any more.

Thanks,
Prema





More information about the SNMP4J mailing list