Page MenuHomeFreeBSD

Ensure consistent error messages from ifconfig
ClosedPublic

Authored by hselasky on Nov 26 2020, 9:48 AM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Dec 6, 2:54 PM
Unknown Object (File)
Fri, Dec 6, 2:54 PM
Unknown Object (File)
Wed, Dec 4, 2:29 PM
Unknown Object (File)
Wed, Dec 4, 2:14 PM
Unknown Object (File)
Sep 30 2024, 7:24 AM
Unknown Object (File)
Sep 23 2024, 2:58 PM
Unknown Object (File)
Sep 23 2024, 9:59 AM
Unknown Object (File)
Sep 23 2024, 9:59 AM
Subscribers

Details

Summary

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.

MFC after: 1 week
Sponsored by: Mellanox Technologies // NVIDIA Networking

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable