Page MenuHomeFreeBSD

ifconfig: Fix the display of capabilities in the netlink based code.
ClosedPublic

Authored by np on Jul 20 2023, 1:26 AM.
Tags
None
Referenced Files
F85194404: D41107.diff
Sun, Jun 2, 9:31 PM
Unknown Object (File)
Mon, May 20, 5:39 PM
Unknown Object (File)
Sun, May 5, 7:51 AM
Unknown Object (File)
May 2 2024, 10:38 AM
Unknown Object (File)
May 2 2024, 10:38 AM
Unknown Object (File)
May 2 2024, 9:43 AM
Unknown Object (File)
May 2 2024, 9:09 AM
Unknown Object (File)
Apr 27 2024, 5:50 AM
Subscribers

Details

Summary

The capabilities in if_capabilities2/if_capenable2 that don't fit in the
first 32b were not being displayed correctly. v does not need to be
advanced because v[i / 32] is the correct uint32_t already.

Sponsored by: Chelsio Communications

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 52735
Build 49626: arc lint + arc unit

Event Timeline

np requested review of this revision.Jul 20 2023, 1:26 AM

I am experimenting with some additional caps that use bits in capabilities2/capenable2 and that's how I ran into this.

kib added inline comments.
sbin/ifconfig/ifconfig_netlink.c
90

btw i should have unsigned type, otherwise i<<31 is UB

This revision is now accepted and ready to land.Jul 20 2023, 9:44 AM
sbin/ifconfig/ifconfig_netlink.c
90

i is not shifted anywhere in this routine.

sbin/ifconfig/ifconfig_netlink.c
90

Err, yes. the line above should use 1U instead of 1.