Bug 205285 - [regression] Duplicated IPv6 localhost addresses after r291643
Summary: [regression] Duplicated IPv6 localhost addresses after r291643
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Some People
Assignee: Alexander V. Chernikov
URL:
Keywords: regression
Depends on:
Blocks:
 
Reported: 2015-12-13 13:05 UTC by Fabian Keil
Modified: 2018-08-29 19:31 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Fabian Keil 2015-12-13 13:05:14 UTC
After r291643, upping a cloned interface results in ::1 getting assigned to it:

[fk@kendra ~]$ sudo ifconfig lo1 create
[fk@kendra ~]$ ifconfig lo1 
lo1: flags=8008<LOOPBACK,MULTICAST> metric 0 mtu 16384
        options=600003<RXCSUM,TXCSUM,RXCSUM_IPV6,TXCSUM_IPV6>
        nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
        groups: lo 
[fk@kendra ~]$ sudo ifconfig lo1 up
[fk@kendra ~]$ ifconfig lo1
lo1: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
        options=600003<RXCSUM,TXCSUM,RXCSUM_IPV6,TXCSUM_IPV6>
        inet6 ::1 prefixlen 128 tentative 
        nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
        groups: lo

This broke my pf configuration as it resulted in invalid NAT rules.

After reverting r291643, everything works as expected again.
Comment 1 Alexander V. Chernikov freebsd_committer 2015-12-13 14:18:32 UTC
Reproduced. Looks very weird, however. Will take a look, thanks for the report.
Comment 2 commit-hook freebsd_committer 2015-12-13 16:37:35 UTC
A commit references this bug:

Author: melifaro
Date: Sun Dec 13 16:37:02 UTC 2015
New revision: 292163
URL: https://svnweb.freebsd.org/changeset/base/292163

Log:
  Fix PINNED routes handling.
  Before r291643, adding new interface prefix had the following logic:
  try_add:
    EEXIST && (PINNED) {
      try_del(w/o PINNED flag)
      if (OK)
        try_add(PINNED)
  }

  In r291643, deletion was performed w/ PINNED flag held which leaded
    to new interface prefixes (like ::1) overriding older ones.
    Fix this by requesting deletion w/o RTF_PINNED.

  PR:		kern/205285
  Submitted by:	Fabian Keil <fk at fabiankeil.de>

Changes:
  head/sys/net/route.c
Comment 3 Eitan Adler freebsd_committer freebsd_triage 2018-05-28 19:50:20 UTC
batch change:

For bugs that match the following
-  Status Is In progress 
AND
- Untouched since 2018-01-01.
AND
- Affects Base System OR Documentation

DO:

Reset to open status.


Note:
I did a quick pass but if you are getting this email it might be worthwhile to double check to see if this bug ought to be closed.