Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upIpAddresses are not assigned name of Ipv4 module is not "ipv4" - fails silently #480
Labels
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
IpAddresses are not assigned to interfaces unless the module of the type Ipv4 is named "ipv4".
Reproduce
Create a node where the ipv4 submodule is not called ipv4. All interfaces are then not assigned an ip address.
Modified Example from https://inet.omnetpp.org/docs/users-guide/ch-network-nodes.html#custom-network-nodes
Possible [Cause]
The
NetworkConfiguratorBase::extractTopologyfunction callsfindRoutingTablehttps://github.com/inet-framework/inet/blob/master/src/inet/networklayer/configurator/base/NetworkConfiguratorBase.cc#L109 which in turn callsL3AddressResolver::findIpv4RoutingTableOfhttps://github.com/inet-framework/inet/blob/master/src/inet/networklayer/common/L3AddressResolver.cc#L480 which tries to get the routing table based on the default module name of ipv4.There is no check to see if it was successful in finding the routing table.
Possible Improvement
Use the
L3AddressResolver::getIpv4RoutingTableOfto include a check so that it doesn't fail silently but instead throws a runtime error.I'm not exactly sure why not having the routing table means it doesn't correctly apply ip addresses to interface but the main problem surely is that it fails silently if the module is not called ipv4