Project

General

Profile

Actions

Bug #3232

closed

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

Added by liweitianux over 4 years ago. Updated over 4 years 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:
  1. ifconfig tun0 create
  2. ifconfig tun0 create
    ifconfig: create: bad value

Files

Actions #1

Updated by liweitianux over 4 years 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.

Actions #2

Updated by liweitianux over 4 years ago

  • Status changed from New to Resolved

Fixed in commit 421c46af64c8b876df8356afa8a3af5fa977fdf1.

Credit to FreeBSD :-)

Actions

Also available in: Atom PDF