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
Unknown Object (File)
Tue, Feb 4, 4:00 AM
Unknown Object (File)
Mon, Jan 27, 5:03 PM
Unknown Object (File)
Jan 18 2025, 9:44 PM
Unknown Object (File)
Jan 18 2025, 8:11 AM
Unknown Object (File)
Oct 21 2024, 3:30 PM
Unknown Object (File)
Sep 20 2024, 5:03 PM
Unknown Object (File)
Sep 20 2024, 7:35 AM
Unknown Object (File)
Sep 17 2024, 7:45 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.