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
F102713040: D37740.id114874.diff
Sat, Nov 16, 5:48 AM
Unknown Object (File)
Oct 7 2024, 1:41 AM
Unknown Object (File)
Sep 28 2024, 6:04 PM
Unknown Object (File)
Sep 27 2024, 4:13 PM
Unknown Object (File)
Sep 24 2024, 5:36 PM
Unknown Object (File)
Sep 24 2024, 5:34 PM
Unknown Object (File)
Sep 24 2024, 8:09 AM
Unknown Object (File)
Sep 22 2024, 10:23 AM
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.