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
F165358452: D38715.id117778.diff
Fri, Aug 7, 7:59 PM
F165357601: D38715.id117719.diff
Fri, Aug 7, 7:52 PM
F165344120: D38715.id.diff
Fri, Aug 7, 6:14 PM
F165335777: D38715.id117719.diff
Fri, Aug 7, 5:19 PM
F165303609: D38715.id117804.diff
Fri, Aug 7, 1:05 PM
Unknown Object (File)
Thu, Aug 6, 3:37 PM
Unknown Object (File)
Thu, Aug 6, 1:47 PM
Unknown Object (File)
Thu, Aug 6, 11:13 AM
Subscribers

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 49963
Build 46855: arc lint + arc unit

Event Timeline

sys/compat/linux/linux_netlink.c
277

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.

277–281
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.