Project

General

Profile

Actions

Bug #2888

closed

ifconfig command bug with IPv6 addresses

Added by ygrossel over 8 years ago. Updated over 8 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
Userland
Target version:
-
Start date:
02/11/2016
Due date:
% Done:

0%

Estimated time:

Description

Hello,

I think there is a bug in the ifconfig command regarding IPv6 addresses. Any attempt to remove a IPv6 address from an interface using ifconfig fails with the message:
ifconfig: ioctl (SIOCDIFADDR): Can't assign requested address

How to reproduce:

- add an IPv6 address to some interface using ifconfig alias
- then try to remove that address using ifconfig alias
it fails with the error message.

For example:

  1. ifconfig vke0 | grep inet6
    inet6 fe80::2be:dfff:fedf:804%vke0 prefixlen 64 scopeid 0x1
  1. ifconfig vke0 inet6 alias 2001:db8::1/64
  1. ifconfig vke0 | grep inet6
    inet6 fe80::2be:dfff:fedf:804%vke0 prefixlen 64 scopeid 0x1
    inet6 2001:db8::1 prefixlen 64
  1. ifconfig vke0 inet6 -alias 2001:db8::1
    ifconfig: ioctl (SIOCDIFADDR): Can't assign requested address
  1. ifconfig vke0 | grep inet6
    inet6 fe80::2be:dfff:fedf:804%vke0 prefixlen 64 scopeid 0x1
    inet6 2001:db8::1 prefixlen 64

The attached patch fixes the bug.

Regards,

Yann


Files

ifconfig.patch (402 Bytes) ifconfig.patch ygrossel, 02/11/2016 12:07 PM
Actions

Also available in: Atom PDF