Page MenuHomePhabricator

IPv6 in expanded format cannot be removed from interface
Closed, ResolvedPublicBUG

Description

When IPv6 address to interface is configured and entered in expandend format (e.g. 2001:db8:0:0:0:0:0:1/64) it is not converted to compact format while kernel does that. Once the address is configured it is no longer removable (will be removed from confiuration / config boot, but not from interface)

Lets add expanded format address:

# set interfaces ethernet eth1 address 2001:db8:0:0:0:0:0:1/64
# commit

~$ show interfaces 
Codes: S - State, L - Link, u - Up, D - Down, A - Admin Down
Interface        IP Address                        S/L  Description
---------        ----------                        ---  -----------
eth1             2001:db8::1/64                    u/u  

~$ cat /config/config.boot

ethernet eth1 {
    address 2001:db8:0:0:0:0:0:1/64
    ...
}

And now delete it:

# delete interfaces ethernet eth1 address 
Possible completions:
   2001:db8:0:0:0:0:0:1/64

# delete interfaces ethernet eth1 address 2001:db8:0:0:0:0:0:1/64
[edit]
# compare
[edit interfaces ethernet eth1]
-address 2001:db8:0:0:0:0:0:1/64
[edit]
# commit
# exit

Removed from configuration but not from interface:

~$ show interfaces 
Codes: S - State, L - Link, u - Up, D - Down, A - Admin Down
Interface        IP Address                        S/L  Description
---------        ----------                        ---  -----------
eth1             2001:db8::1/64                    u/u  
~$ ip a dev eth1
Command "dev" is unknown, try "ip addr help".
~$ ip a li dev eth1
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    inet6 2001:db8::1/64 scope global 
       valid_lft forever preferred_lft forever

Details

Difficulty level
Normal (likely a few hours)
Version
1.1.7
Why the issue appeared?
Implementation mistake
brona created this task.Mar 6 2017, 5:24 PM
brona updated the task description. (Show Details)Mar 6 2017, 5:27 PM
brona updated the task description. (Show Details)
syncer triaged this task as Normal priority.Aug 1 2017, 3:21 AM
syncer changed the edit policy from "Task Author" to "Custom Policy".
syncer changed Difficulty level from Easy (less than an hour) to Normal (likely a few hours).
syncer reassigned this task from syncer to xrobau.
syncer added a subscriber: syncer.

Hi Rob, assigning it to you,
please check when you have time
i think we need to confirm this behaviour on 1.2

syncer changed the subtype of this task from "Task" to "Bug".Sat, Oct 20, 4:51 AM
syncer reassigned this task from xrobau to c-po.Sat, Oct 20, 4:53 AM
syncer added a subscriber: xrobau.
dmbaturin claimed this task.Mon, Nov 5, 2:08 AM
dmbaturin closed this task as Resolved.
dmbaturin added subscribers: c-po, dmbaturin.

It's quite a shame that iproute2 can't do it on its own. I've added a workaround.