diff options
| author | Gleb Smirnoff <glebius@FreeBSD.org> | 2025-12-15 20:51:47 +0000 |
|---|---|---|
| committer | Gleb Smirnoff <glebius@FreeBSD.org> | 2025-12-15 21:17:23 +0000 |
| commit | 1c5021f5251b231b614ad9cd175bcb4250495c12 (patch) | |
| tree | 5152971c3ace3848b7fa9ed906618117d98a71ec | |
| parent | ddf4f9eda9c295082f17e7f26963666b72c97bb9 (diff) | |
ifconfig: print warning and return success on ipfw0, ipfwlog0 cloning
This should provide people a chance to remove ipfw0 and ipfwlog0 from
cloned_interfaces in their rc.conf during FreeBSD 16.x lifetime.
Differential Revision: https://reviews.freebsd.org/D53876
| -rw-r--r-- | sbin/ifconfig/ifclone.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/sbin/ifconfig/ifclone.c b/sbin/ifconfig/ifclone.c index f44d052c97ad..8941d17ad205 100644 --- a/sbin/ifconfig/ifclone.c +++ b/sbin/ifconfig/ifclone.c @@ -117,6 +117,15 @@ ifclonecreate(if_ctx *ctx, void *arg __unused) { struct ifreq ifr = {}; struct clone_defcb *dcp; + u_int u; + + /* Warning to be removed in FreeBSD 17.0 */ + if (sscanf(ctx->ifname, "ipfw%u", &u) == 1 || + sscanf(ctx->ifname, "ipfwlog%u", &u) == 1) { + warnx("ipfw(4) logging does not need interface creation " + "in FreeBSD 16.0"); + return; + } strlcpy(ifr.ifr_name, ctx->ifname, sizeof(ifr.ifr_name)); |
