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
F157803861: D41107.id124895.diff
Mon, May 25, 9:17 AM
F157752311: D41107.id.diff
Sun, May 24, 8:43 PM
Unknown Object (File)
Fri, May 22, 1:56 AM
Unknown Object (File)
Sat, May 9, 8:38 AM
Unknown Object (File)
Sat, May 9, 8:37 AM
Unknown Object (File)
Apr 9 2026, 6:41 PM
Unknown Object (File)
Mar 8 2026, 4:08 AM
Unknown Object (File)
Feb 8 2026, 6:38 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.