Page MenuHomeFreeBSD

ifnet: Move SIOCSIFVNET from ifhwioctl() to ifioctl()
Needs ReviewPublic

Authored by zlei on Mon, Mar 16, 6:31 PM.
Tags
None
Referenced Files
F148830873: D55880.id173795.diff
Fri, Mar 20, 10:35 AM
F148830791: D55880.diff
Fri, Mar 20, 10:35 AM
F148779836: D55880.diff
Fri, Mar 20, 4:42 AM
F148743671: D55880.diff
Fri, Mar 20, 12:11 AM
Unknown Object (File)
Thu, Mar 19, 1:05 PM

Details

Reviewers
jamie
kp
glebius
Group Reviewers
network
Summary

SIOCSIFVNET is not a hardware ioctl. Move it to where it belongs.

Where here, rewrite the logic of checking whether we are moving the
interface from and to the same vnet or not, since it is obviously not
safe to access the members of an interface until the interface is
proven to be on the "active" list.

MFC after: 2 weeks

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

zlei requested review of this revision.Mon, Mar 16, 6:31 PM
sys/net/if.c
1199

The error ENXIO means the interface does not exists. Should choose a better error to distinguish that with the case not found child prison / vnet.

glebius requested changes to this revision.Mon, Mar 16, 6:53 PM

Correct me if I am wrong, but this seems to be two separate changes. Can this be split please?

This revision now requires changes to proceed.Mon, Mar 16, 6:53 PM

Correct me if I am wrong, but this seems to be two separate changes. Can this be split please?

Ah I mixed the changes to the comments into this revision. I'll update.

Removed the changes to comments.

sys/net/if.c
1192

This revision is based on latest main, so this removal is competing with D55875 .

I'd personally prefer to land this first. With this change it is more robust to check "the moving between the same vnet".