Page MenuHomeFreeBSD

linux(4): Fixup the interface name translation in netlink
ClosedPublic

Authored by dchagin on Feb 21 2023, 10:30 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Apr 6, 3:46 AM
Unknown Object (File)
Sun, Mar 30, 12:12 AM
Unknown Object (File)
Mon, Mar 10, 1:03 PM
Unknown Object (File)
Mon, Mar 10, 12:31 AM
Unknown Object (File)
Mar 6 2025, 11:56 AM
Unknown Object (File)
Feb 27 2025, 2:56 AM
Unknown Object (File)
Feb 26 2025, 3:25 PM
Unknown Object (File)
Feb 25 2025, 11:27 PM
Subscribers

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

sys/compat/linux/linux_netlink.c
283

You need to check the message type as well, as this value is only valud for RTM_<NEW|DEL|GET>LINK.

Also - for readability I’d consider moving attribute rewriting to a separate function. This will help keep copy-all_nla function readable when more translations are added

LGTM

sys/compat/linux/linux_netlink.c
241

Nit: worth describing the return codes here.

252

I'd explicitly cast it to int, or make it a branch, to help reader understand the return codes.

283–287
This revision is now accepted and ready to land.Feb 22 2023, 2:52 PM
This revision now requires review to proceed.Feb 22 2023, 6:21 PM
This revision was not accepted when it landed; it landed in state Needs Review.Feb 23 2023, 8:01 AM
This revision was automatically updated to reflect the committed changes.