Bug 174897 - [route] Interface routes are broken
Summary: [route] Interface routes are broken
Status: Open
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: Unspecified
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-net (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-01-02 13:40 UTC by Peter Wemm
Modified: 2025-01-23 11:18 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 Peter Wemm freebsd_committer freebsd_triage 2013-01-02 13:40:01 UTC
Interface creation now fails to correctly install more-specific routes, or gets terribly confused.

This happens in two cases that are critical for freebsd.org cluster infrastructure machines.

1) Discard interface as a supernet is broken..

2) jail loopback substitution aliases are broken.

How-To-Repeat: The most urgent problem:

peter@mailspool:# % netstat -rn | grep 127
127.0.0.1          link#3             UH          0        0    lo0
root@mailspool:/home/peter # ifconfig -a | fgrep 127.0
        inet 127.0.0.1 netmask 0xff000000
root@mailspool:/home/peter # ifconfig lo1 create
root@mailspool:/home/peter # ifconfig -a | fgrep 127.0
        inet 127.0.0.1 netmask 0xff000000
root@mailspool:/home/peter # netstat -rn | grep 127
127.0.0.1          link#3             UH          0        0    lo0
root@mailspool:/home/peter # ifconfig lo1 inet 127.0.3.1/32 alias
ifconfig: ioctl (SIOCAIFADDR): File exists
root@mailspool:/home/peter # netstat -rn | grep 127
127.0.0.1          link#3             UH          0        0    lo0
127.0.3.1          link#4             UHS         0        0    lo0
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Note how it created something on the wrong interface.

root@mailspool:/home/peter # ifconfig lo1 | grep 127
root@mailspool:/home/peter # ifconfig lo0 | grep 127
	inet 127.0.0.1 netmask 0xff000000
root@mailspool:/home/peter # ifconfig lo1 inet 127.0.3.1/32 -alias
ifconfig: ioctl (SIOCDIFADDR): Can't assign requested address
root@mailspool:/home/peter # netstat -rn | grep 127
127.0.0.1          link#3             UH          0        0    lo0
127.0.3.1          link#4             UHS         0        0    lo0

. and deleting the interface address doesn't work either.

root@mailspool:/home/peter # ifconfig lo1 destroy
root@mailspool:/home/peter # netstat -rn | grep 127
127.0.0.1          link#3             UH          0        0    lo0
127.0.3.1          link#4             UHS         0        0    lo0
root@mailspool:/home/peter # route delete 127.0.3.1
delete host 127.0.3.1
root@mailspool:/home/peter # netstat -rn | grep 127
127.0.0.1          link#3             UH          0        0    lo0

Trying it with a network instead of a host doesn't work either.

root@mailspool:/home/peter # ifconfig lo1 create
root@mailspool:/home/peter # ifconfig lo1 127.0.1.1/24
ifconfig: ioctl (SIOCAIFADDR): File exists
root@mailspool:/home/peter # netstat -rn | grep 127
127.0.0.1          link#3             UH          0        0    lo0
127.0.1.1          link#4             UHS         0        0    lo0
Comment 1 Mark Linimon freebsd_committer freebsd_triage 2013-01-20 01:56:52 UTC
Responsible Changed
From-To: freebsd-bugs->freebsd-net

Over to maintainer(s).
Comment 2 Peter Wemm freebsd_committer freebsd_triage 2014-06-02 00:50:31 UTC
(Post bugzilla migration, trivial edit test)
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.
Comment 4 Mark Linimon freebsd_committer freebsd_triage 2025-01-23 11:18:23 UTC
^Triage: is this still a problem on recent versions of FreeBSD?