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

[11.0 stable] Make table index part of the IP-rule definition. #4156

Merged
merged 1 commit into from
Aug 21, 2024

Conversation

milan-zededa
Copy link
Contributor

Backport of #4143

When wwan modem is reset by ModemManager (because it is not responsive),
the wwan interface is recreated and will get a different interface
index. This means that the target routing table index for the port
(calculated as 500 + interface index) will change. However, if the IP
address assigned by the network is the same after the reset (common in
private LTE networks), then only the table index needs to be updated in
the corresponding IP rule. But this will be missed because table index
is not part of the IP rule definition (SrcIPRule struct) and instead it
is calculated on-demand inside the Create/Modify method of the configurator.
As a result, there is no change detected by the SrcIPRule.Equal() method
between the current and the new intended state, hence Modify method is
not called by the reconciler and IP rule is not updated after modem
reset.

In this commit this is fixed by adding the table ID into the IP rule
definition.

In theory, this can also affect wlan or eth interface if there is e.g.
a driver reset and the interface is recreated (while getting the same
IP). However, with cellular modems this is more likely because they
are quite flaky and ModemManager resets them when they get stuck.

Signed-off-by: Milan Lenco <milan@zededa.com>
(cherry picked from commit 695652b)
@rouming rouming merged commit 32c74c3 into lf-edge:11.0-stable Aug 21, 2024
22 of 29 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants