Bug 241529 - ifconfig ... alias behaves in non-POLA manner.
Summary: ifconfig ... alias behaves in non-POLA manner.
Status: Open
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 11.2-RELEASE
Hardware: Any Any
: --- Affects Many People
Assignee: Hiroki Sato
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-10-27 22:32 UTC by dgilbert
Modified: 2019-10-28 13:29 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 dgilbert 2019-10-27 22:32:33 UTC
This may be related to PR 228929, but it also may not.

consider this sequence of events:

ifconfig lo0 alias 192.168.1.1/32
ifconfig lo0 192.168.1.2/32
ifconfig lo0 192.168.1.3/32

... now if lo0 is configured as per normal, the 2nd command will delete the address 127.0.0.1 (sorta expected) and the 3rd command will delete 192.168.1.1.  In general, I would characterize the actual operation of the "alias" word to ifconfig as follows.

ifconfig always adds the address to the bottom of the list of addresses.  Without ALIAS, ifconfig also subtracts the top address.

That is, to be clear.  Using alias means there is +1 ip addresses, not using alias means that there is the same number of addresses.  The top address is always the one to go away and the new address is added to the bottom.  AFAICT, this behavior is not described anywhere.

Additionally, as a doc bug, what ifconfig's man page says about alias --- about a non-conflicting netmask --- is no longer true.
Comment 1 Hiroki Sato freebsd_committer freebsd_triage 2019-10-28 13:29:54 UTC
Take.