Skip to content

Conversation

@ryan-moeller
Copy link

@ryan-moeller ryan-moeller commented Sep 18, 2025

Fix all pointer-sign warnings generated when compiling libifconfig.

One of these warnings comes from the misuse of snl_add_msg_attr_string for a byte array. Though userland treats carpr_key as a string, it is actually an array of bytes. Handle it as such in libifconfig.

While here, fix a small consistency nit in ifconfig_sfp_get_sfp_dump.

This eliminates all warnings in libifconfig, and may be trivially backported.

The server with my keys is packed away in storage, so I'd appreciate someone committing this small fix for me.

Copy link
Contributor

@kprovost kprovost left a comment

Choose a reason for hiding this comment

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

I found at least one build failure during make universe.
I'm re-building with a fix and if that works I'll push this.

Fix all pointer-sign warnings generated when compiling libifconfig.

One of these warnings comes from the misuse of snl_add_msg_attr_string
for a byte array.  Though userland treats carpr_key as a string, it is
actually an array of bytes.  Handle it as such in libifconfig.

While here, fix a small consistency nit in ifconfig_sfp_get_sfp_dump.

Signed-off-by: Ryan Moeller <[email protected]>
@ryan-moeller
Copy link
Author

I've updated the change in libifconfig_carp.c to treat carpr_key as bytes rather than a string. This fixes the pointer-sign warning and enables future work to properly hash the key in ifconfig, probably using an alternative CARP parameter to avoid breaking the current pass parameter behavior.

Copy link
Contributor

@gmshake gmshake left a comment

Choose a reason for hiding this comment

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

LGTM.

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.

4 participants