Skip to content

fix(os): handle empty error messages from pnet on bonding interfaces#496

Open
hieuit095 wants to merge 1 commit into
imsnif:mainfrom
hieuit095:fix/bonding-interface-panic
Open

fix(os): handle empty error messages from pnet on bonding interfaces#496
hieuit095 wants to merge 1 commit into
imsnif:mainfrom
hieuit095:fix/bonding-interface-panic

Conversation

@hieuit095
Copy link
Copy Markdown

@hieuit095 hieuit095 commented Apr 3, 2026

When all frame receivers fail and both error lists are empty (which can occur on IEEE 802.3ad bonding/team interfaces where pnet returns errors with empty messages), the code previously hit an unreachable! panic.

Replace the panic with a graceful error message that explains the situation and mentions bonding/team interfaces as a known cause.

On systems with IEEE 802.3ad dynamic link aggregation (LACP), attempting to use bandwhich on the bonding interface or its member interfaces results in a panic instead of a user-friendly error message. The root cause is that the pnet library can return errors with empty messages on bonding interfaces, causing both error categorization lists to be empty while still entering the error handling path.

When all frame receivers fail and both error lists are empty (which can
occur on IEEE 802.3ad bonding/team interfaces where pnet returns errors
with empty messages), the code previously hit an unreachable! panic.

Replace the panic with a graceful error message that explains the
situation and mentions bonding/team interfaces as a known cause.

Fixes imsnif#364.
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.

1 participant