HomeFreeBSD

Ensure consistent error messages from ifconfig(8).

Description

Ensure consistent error messages from ifconfig(8).

If multiple threads are invoking "ifconfig XXX create" a race may occur
which can lead to two different error messages for the same error.

a) ifconfig: SIOCIFCREATE2: File exists
b) ifconfig: interface XXX already exists

This patch ensures ifconfig prints the same error code
for the same case.

Reviewed by: imp@ and kib@
Differential Revision: https://reviews.freebsd.org/D27380
MFC after: 1 week
Sponsored by: Mellanox Technologies // NVIDIA Networking

Details

Provenance
hselaskyAuthored on
Differential Revision
D27380: Ensure consistent error messages from ifconfig
Parents
rS368057: MFC r367849:
Branches
Unknown
Tags
Unknown