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
Unknown Object (File)
Wed, Apr 8, 9:55 AM
Unknown Object (File)
Sun, Apr 5, 1:29 PM
Unknown Object (File)
Sun, Apr 5, 1:20 PM
Unknown Object (File)
Tue, Mar 31, 12:19 AM
Unknown Object (File)
Sat, Mar 28, 8:36 PM
Unknown Object (File)
Fri, Mar 27, 7:05 PM
Unknown Object (File)
Wed, Mar 25, 5:24 AM
Unknown Object (File)
Wed, Mar 25, 4:09 AM

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 it is proven that the
interface is 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
1205

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
1199–1200

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".

zlei edited the summary of this revision. (Show Details)

Rebased on latest main.

Landed D55875 after running extensive tests.

@glebius Does it look good to you now ?