Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ipv4RoutingTable overwrites settings from Ipv4NetworkConfigurator #881

Open
th1j5 opened this issue Apr 7, 2023 · 2 comments
Open

Ipv4RoutingTable overwrites settings from Ipv4NetworkConfigurator #881

th1j5 opened this issue Apr 7, 2023 · 2 comments
Assignees
Labels
Milestone

Comments

@th1j5
Copy link

th1j5 commented Apr 7, 2023

When configuring an interface with Ipv4NetworkConfigurator, there is a config option (add-subnet-route="false") to prevent the addition of the subnet to the routing table.

However, when initializing the routing table of this host,
Ipv4RoutingTable::updateNetmaskRoutes() is called.
This function doesn't care (and know) about add-subnet-route and happily adds the subnets to the routing table, even if I didn't want it to.

Example snippet from configuration.xml:
<interface hosts='routersAlongPath[0]' names="wlan0" address='10.2.2.1' netmask='255.255.255.0' add-subnet-route="false" />
and I still get this route in its routing table:
[1] C 10.2.2.0/24 gw:* metric:1 if:wlan0

I can give more info if needed. I guess this is not intended behaviour? I can also draft a PR, but then I would need some guidelines.

@levy
Copy link
Contributor

levy commented Apr 11, 2023

This behavior is kept for backward compatibility. Note that the Ipv4NetworkConfigurator module is not a mandatory component, there are many ways to build a network.

Also, there is a netmaskRoutes parameter in Ipv4RoutingTable that specifies the network interfaces for which the routing table maintains netmask routes. This is set to "*" by default, which means all interfaces will have their netmask routes. If you set this parameter to "" then no interfaces will have their netmask routes maintained.

@levy levy added the Feature label Apr 11, 2023
@levy levy added this to the Postponed milestone Apr 11, 2023
@th1j5
Copy link
Author

th1j5 commented Apr 24, 2023

Forgot to answer, but your quick response is appreciated. Don't have anything else to add :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants