[Bug 261828] ifconfig name should not print out the newly set name

From: <bugzilla-noreply_at_freebsd.org>
Date: Wed, 09 Feb 2022 13:36:50 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=261828

--- Comment #2 from Nick Hibma <nick@van-laarhoven.org> ---
... I missed that printifname is being referenced in ifclone.c as well, where
the actual problem that the atexit() fixes is caused. So perhaps only
printifname=1 in setifname is to be removed from setifname.

   --- a/sbin/ifconfig/ifconfig.c
   +++ b/sbin/ifconfig/ifconfig.c
   @@ -1307,7 +1307,6 @@ setifname(const char *val, int dummy __unused, int s,
                   free(newname);
                   err(1, "ioctl SIOCSIFNAME (set name)");
           }
   -       printifname = 1;
           strlcpy(name, newname, sizeof(name));
           free(newname);
    }

seems to do it.

-- 
You are receiving this mail because:
You are the assignee for the bug.