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

Properly initialize AppNetworkStatus after invalid config was fixed #4267

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

milan-zededa
Copy link
Contributor

@milan-zededa milan-zededa commented Sep 18, 2024

When the application network configuration fails validation, the AppNetworkStatus will be marked with an error, while the AppNum and MACGenerator fields will remain unset. If the user corrects the invalid part of the configuration, the handleAppNetworkModify callback will be triggered, and validation will succeed. However, before activating the application network, the zedrouter must ensure that AppNum and MACGenerator are initialized. Otherwise, zedbox process will panic with a fatal error: undefined MAC generator

Issue addressed by this patch was introduced in version 11.5.0

@milan-zededa milan-zededa added bug Something isn't working stable Should be backported to stable release(s) labels Sep 18, 2024
Copy link
Contributor

@europaul europaul left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The solution makes sense to me as described.

Copy link
Contributor

@eriknordmark eriknordmark left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM but can you update the description specifying when this issue was introduced. Thanks.

@milan-zededa
Copy link
Contributor Author

LGTM but can you update the description specifying when this issue was introduced. Thanks.

Done (11.5.0)

When the application network configuration fails validation,
the AppNetworkStatus will be marked with an error, while the AppNum and
MACGenerator fields will remain unset. If the user corrects the invalid
part of the configuration, the handleAppNetworkModify callback will be
triggered, and validation will succeed. However, before activating
the application network, the zedrouter must ensure that AppNum and
MACGenerator are initialized. Otherwise, the zedbox will panic with
a fatal error: "undefined MAC generator."

Issue addressed by this patch was introduced in version 11.5.0

Signed-off-by: Milan Lenco <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working stable Should be backported to stable release(s)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants