GFuZA0KICAgIHZlcmlmeS9tYWtlIHN1cmUgdGhhdCBvdGhlciBpbXBsZW1lbnRlZCBt b2R1bGVzIGFyZSBub3QgYWZmZWN0ZWQuDQogMi4gSW50cm9kdWNlIGEgbmV3IGlvY3RsLCBT SU9DSUZDUkVBVEVOViwgdG8gaGFuZGxlIHRoZSBudiBwYXJ0DQogICAgc2VwYXJhdGVseSwg d2hpY2ggd291bGQgYmUgbW9yZSBjb21wbGljYXRlZCBidXQgcG90ZW50aWFsbHkgbGVzcw0K ICAgIGRpc3J1cHRpdmUgdG8gZXhpc3RpbmcgbW9kdWxlcy4NCg0KV2hpY2ggb25lIGRvIHlv dSB0aGluayB3b3VsZCBiZSBtb3JlIHN1aXRhYmxlLCBvciBkbyB5b3UgaGF2ZSBhbnkgDQph bHRlcm5hdGl2ZSBzdWdnZXN0aW9ucz8NCg0KLS0NCnNwbXp0DQoNCg== --------------2bAdYUe6PGLfaMo7XtZQGDVk Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable

Hi,

Currently our ifreq interface supports nv(9) lists via ifreq_nv_req. This allows network interface drivers to implement their configuration using nvlists (for example: if_ovpn, if_pf*).

There is a problem: an interface that is implemented entirely via nv(9) cannot be configured during the cloning phase (via if_clone_create). if_clone_create converts the ifreq struct to ifdrv and only copies ifr_data to params, so the ifru_nv field is lost during cloning.

I am interested in implementing a solution to this issue and am considering two possible approaches:
  1. Extend the ifdrv struct to include the ifreq_nv_req struct, and verify/make sure that other implemented modules are not affected.
  2. Introduce a new ioctl, SIOCIFCREATENV, to handle the nv part separately, which would be more complicated but potentially less disruptive to existing modules.

Which one do you think would be more suitable, or do you have any alternative suggestions?

--
spmzt
--------------2bAdYUe6PGLfaMo7XtZQGDVk-- --------------9wq08ZILA4WavKoVBVGxosl0-- --------------Z03Ryq1ePNoYkxD83Gq2uVD0 Content-Type: application/pgp-signature; name="OpenPGP_signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="OpenPGP_signature.asc" -----BEGIN PGP SIGNATURE----- iHUEARYKAB0WIQSqt7cppfvJ816gj0lUwVnUeMwagAUCaO9Q/wAKCRBUwVnUeMwa gB51AQDir1XteA1qK5Lyyn4p0qyHZKh7o7kPddWI2O2wQEoh/AEA/3A9iWHGa0wQ y7euY9mFO+wv1erHQr83iWVvBdLKywU= =yj0d -----END PGP SIGNATURE----- --------------Z03Ryq1ePNoYkxD83Gq2uVD0--