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
F82768088: D41107.id.diff
Thu, May 2, 10:38 AM
F82768082: D41107.id124895.diff
Thu, May 2, 10:38 AM
F82763994: D41107.id124927.diff
Thu, May 2, 9:43 AM
Unknown Object (File)
Thu, May 2, 9:09 AM
Unknown Object (File)
Sat, Apr 27, 5:50 AM
Unknown Object (File)
Mar 13 2024, 2:58 AM
Unknown Object (File)
Mar 13 2024, 2:28 AM
Unknown Object (File)
Dec 23 2023, 12:15 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 Not Applicable
Unit
Tests Not Applicable

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.