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

bgpd: Fix format overflow for graceful-restart debug logs #15210

Conversation

ton31337
Copy link
Member

@ton31337 ton31337 commented Jan 24, 2024

Use enum instead of int, and make the compiler happy when using -format-overflow.

Without this patch, it does not compile e.g. on Debian12.

Use enum instead of int, and make the compiler happy when using -format-overflow.

Signed-off-by: Donatas Abraitis <[email protected]>
@ton31337
Copy link
Member Author

@Mergifyio backport stable/9.1 stable/9.0 stable/8.5

Copy link

mergify bot commented Jan 24, 2024

backport stable/9.1 stable/9.0 stable/8.5

✅ Backports have been created

/*This is incremental updates i.e no tear down
*of the existing session
*as the peer is already working in the same mode.
if ((int)new_peer_state == (int)bgp_gr_global_mode) {
Copy link
Member

Choose a reason for hiding this comment

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

both are enum_peer_mode right? Why do we need casting to (int)?

Copy link
Member Author

Choose a reason for hiding this comment

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

not really, they are different 🤷

@donaldsharp donaldsharp merged commit a5613bd into FRRouting:master Jan 24, 2024
11 checks passed
@ton31337 ton31337 deleted the fix/use_enum_for_graceful_restart_prints branch January 24, 2024 20:15
ton31337 added a commit that referenced this pull request Jan 25, 2024
bgpd: Fix format overflow for graceful-restart debug logs (backport #15210)
donaldsharp added a commit that referenced this pull request Jan 25, 2024
bgpd: Fix format overflow for graceful-restart debug logs (backport #15210)
ton31337 added a commit that referenced this pull request Jan 27, 2024
bgpd: Fix format overflow for graceful-restart debug logs (backport #15210)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants