Project

General

Profile

Bug #3232

tun/tap: get error message 'create: bad value' when the interface already exists

Added by liweitianux about 2 months ago. Updated about 2 months ago.

Status:
Resolved
Priority:
Low
Assignee:
-
Category:
Networking
Target version:
Start date:
04/08/2020
Due date:
% Done:

0%

Estimated time:

Description

When the interface already exists, ifconfig complains 'create: bad value', which is not clear enough compared to say that the interface already exists.

Example:
# ifconfig tun0 create
# ifconfig tun0 create
ifconfig: create: bad value


Files

History

#1

Updated by liweitianux about 2 months ago

It seems that on DragonFly, after creating the 'tun0' interface, run the same command 'ifconfig tun0 create' again, 'ifconfig' takes the 'create' option as ordinal argument to configure the 'tun0' interface. So we get the 'create: bad value' error message.

Tried the same test on FreeBSD, but FreeBSD's 'ifconfig' doesn't have this issue and show the error: interface tun0 already exists.

Need to look at FreeBSD's ifconfig code and sync it over.

#2

Updated by liweitianux about 2 months ago

  • Status changed from New to Resolved

Fixed in commit 421c46af64c8b876df8356afa8a3af5fa977fdf1.

Credit to FreeBSD :-)

Also available in: Atom PDF