Page MenuHomeFreeBSD

wg(4): switch to the new if_clone interface
ClosedPublic

Authored by asomers on Dec 18 2022, 8:14 PM.
Tags
None
Referenced Files
Unknown Object (File)
Jan 12 2024, 8:10 AM
Unknown Object (File)
Dec 20 2023, 7:17 AM
Unknown Object (File)
Dec 8 2023, 6:33 AM
Unknown Object (File)
Dec 8 2023, 6:33 AM
Unknown Object (File)
Dec 2 2023, 1:44 PM
Unknown Object (File)
Dec 2 2023, 1:44 PM
Unknown Object (File)
Dec 2 2023, 1:28 PM
Unknown Object (File)
Aug 31 2023, 12:36 PM
Subscribers

Diff Detail

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

Event Timeline

Glad to see this feature!

sys/dev/wg/if_wg.c
2925

What's the practical difference between if_clone_simple and ifc_attach_cloner that's changing something here? I note that I don't seem to have any problems creating a wg interface in a vnet jail, so I'm not sure I actually understand the problem.

sys/dev/wg/if_wg.c
2925

I think this is a follow-up of https://reviews.freebsd.org/D36636 , and should be re-titled .

sys/dev/wg/if_wg.c
2925

Yes, this is just moving to the "newer" clone API it seems, but no functional change. The title of the review should be updated to reflect that.

sys/dev/wg/if_wg.c
2925

When I tried to create a wg interface in a jail, it failed, and dtrace indicated that the failure was in ifc_create_ifp . This patch fixed it. Or at least, this patch "fixed" it. But it's possible that that failure was due to a different reason. Perhaps because my build was a few weeks old, or perhaps I ran into https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=264981 . I'll retest again without this patch, probably next weekend.

@jhb @kevans you're right, this change isn't necessary to do what I said. I think I got confused by two other problems:

Is there any value to this change anyway, as an act of maintenance? Or should I just abandon it?

@jhb @kevans you're right, this change isn't necessary to do what I said. I think I got confused by two other problems:

Is there any value to this change anyway, as an act of maintenance? Or should I just abandon it?

Ahh!

If we're switching other stuff away from the if_clone_{simple,advanced} KPI anyways, I don't really see any reason not to proceed (modulo commit message, of course).

  • Also replace if_clone_detach with ifc_detach_cloner
asomers retitled this revision from wg: allow creating wireguard interfaces in vnet jails to wg(4): switch to the new if_clone interface.Dec 25 2022, 6:30 PM

Agree that moving to the new KPI is the right thing to do.

This revision is now accepted and ready to land.Jan 2 2023, 10:57 PM
This revision was automatically updated to reflect the committed changes.