Re: ifconfig -a shows only first ip address in 6.0 - bug or feature?

2016-09-17 Thread Theo de Raadt
Not new.

Use ifconfig -A to see all the addresses.

There is a history behind this, we'll consider changing it eventually.

> I've got a SPARC64 (Sun Fire V245) box with two-link LACP trunk setup and 4 
> IP addresses on that
> interface. 
> `ifconfig -a' output shows only the first IP in the list, while running 
> `ifconfig trunk0' shows
> the expected output of all 4 assigned IP addresses. Is this intended
> behavior? 
> 
> i.e.:
> 
> inet 111.222.333.32 netmask 0xff00 broadcast 111.222.333.255
> 
> vs.
> 
> inet 111.222.333.32 netmask 0xff00 broadcast 111.222.333.255
> inet 111.222.333.33 netmask 0xff00 broadcast 111.222.333.255
> inet 111.222.333.34 netmask 0xff00 broadcast 111.222.333.255
> inet 111.222.333.35 netmask 0xff00 broadcast 111.222.333.255
> 
> I've substituted the first three bytes in IP addressess to 111,222 and 333
> and real domain to `domain' in dmesg.
> 
> Output of ifconfig -a, ifconfig trunk0 and dmesg follows (running 6.0
> -stable with all errata for 6.0 applied  ) ; sections
> divided by ###
> 
> Thank you and have a nice day,
> Jan
> 
> ### ifconfig -a ###
> lo0: flags=8049 mtu 32768
>   index 6 priority 0 llprio 3
>   groups: lo
>   inet6 ::1 prefixlen 128
>   inet6 fe80::1%lo0 prefixlen 64 scopeid 0x6
>   inet 127.0.0.1 netmask 0xff00
> bge0: flags=8b43 mtu 
> 1500
>   lladdr 00:14:4f:6f:f6:52
>   index 1 priority 0 llprio 3
>   trunk: trunkdev trunk0
>   media: Ethernet autoselect (1000baseT full-duplex)
>   status: active
> bge1: flags=8b43 mtu 
> 1500
>   lladdr 00:14:4f:6f:f6:52
>   index 2 priority 0 llprio 3
>   trunk: trunkdev trunk0
>   media: Ethernet autoselect (1000baseT full-duplex)
>   status: active
> bge2: flags=8802 mtu 1500
>   lladdr 00:14:4f:6f:f6:54
>   index 3 priority 0 llprio 3
>   media: Ethernet autoselect (none)
>   status: no carrier
> bge3: flags=8802 mtu 1500
>   lladdr 00:14:4f:6f:f6:55
>   index 4 priority 0 llprio 3
>   media: Ethernet autoselect (none)
>   status: no carrier
> enc0: flags=0<>
>   index 5 priority 0 llprio 3
>   groups: enc
>   status: active
> trunk0: flags=8843 mtu 1500
>   lladdr 00:14:4f:6f:f6:52
>   index 7 priority 0 llprio 3
>   trunk: trunkproto lacp
>   trunk id: [(8000,00:14:4f:6f:f6:52,403C,,),
>(8000,5c:8a:38:c4:49:c4,0009,,)]
>   trunkport bge1 active,collecting,distributing
>   trunkport bge0 active,collecting,distributing
>   groups: trunk egress
>   media: Ethernet autoselect
>   status: active
>   inet 111.222.333.32 netmask 0xff00 broadcast 111.222.333.255
> pflog0: flags=141 mtu 33144
>   index 8 priority 0 llprio 3
>   groups: pflog
> ###
> 
> ### ifconfig trunk0 ###
> 
> trunk0: flags=8843 mtu 1500
>   lladdr 00:14:4f:6f:f6:52
>   index 7 priority 0 llprio 3
>   trunk: trunkproto lacp
>   trunk id: [(8000,00:14:4f:6f:f6:52,403C,,),
>(8000,5c:8a:38:c4:49:c4,0009,,)]
>   trunkport bge1 active,collecting,distributing
>   trunkport bge0 active,collecting,distributing
>   groups: trunk egress
>   media: Ethernet autoselect
>   status: active
>   inet 111.222.333.32 netmask 0xff00 broadcast 111.222.333.255
>   inet 111.222.333.33 netmask 0xff00 broadcast 111.222.333.255
>   inet 111.222.333.34 netmask 0xff00 broadcast 111.222.333.255
>   inet 111.222.333.35 netmask 0xff00 broadcast 111.222.333.255
> ###
> 
> ### dmesg ###
> console is /ebus@1f,464000/serial@2,80
> Copyright (c) 1982, 1986, 1989, 1991, 1993
>   The Regents of the University of California.  All rights reserved.
> Copyright (c) 1995-2016 OpenBSD. All rights reserved.  http://www.OpenBSD.org
> 
> OpenBSD 6.0 (GENERIC.MP) #1171: Tue Jul 26 17:03:19 MDT 2016
> dera...@sparc64.openbsd.org:/usr/src/sys/arch/sparc64/compile/GENERIC.MP
> real mem = 4294967296 (4096MB)
> avail mem = 4204707840 (4009MB)
> mpath0 at root
> scsibus0 at mpath0: 256 targets
> mainbus0 at root: Sun Fire V245
> cpu0 at mainbus0: SUNW,UltraSPARC-IIIi (rev 3.4) @ 1504 MHz
> cpu0: physical 32K instruction (32 b/l), 64K data (32 b/l), 1024K external 
> (64 b/l)
> cpu1 at mainbus0: SUNW,UltraSPARC-IIIi (rev 3.4) @ 1504 MHz
> cpu1: physical 32K instruction (32 b/l), 64K data (32 b/l), 1024K external 
> (64 b/l)
> "memory-controller" at mainbus0 not configured
> "memory-controller" at mainbus0 not configured
> pyro0 at mainbus0: "Fire", rev 3, ign 780, bus A 2 to 13
> pyro0: dvma map c000-
> 

ifconfig -a shows only first ip address in 6.0 - bug or feature?

2016-09-17 Thread Jan Vlach
Hello OpenBSD team,

I've got a SPARC64 (Sun Fire V245) box with two-link LACP trunk setup and 4 IP 
addresses on that
interface. 
`ifconfig -a' output shows only the first IP in the list, while running 
`ifconfig trunk0' shows
the expected output of all 4 assigned IP addresses. Is this intended
behavior? 

i.e.:

inet 111.222.333.32 netmask 0xff00 broadcast 111.222.333.255

vs.

inet 111.222.333.32 netmask 0xff00 broadcast 111.222.333.255
inet 111.222.333.33 netmask 0xff00 broadcast 111.222.333.255
inet 111.222.333.34 netmask 0xff00 broadcast 111.222.333.255
inet 111.222.333.35 netmask 0xff00 broadcast 111.222.333.255

I've substituted the first three bytes in IP addressess to 111,222 and 333
and real domain to `domain' in dmesg.

Output of ifconfig -a, ifconfig trunk0 and dmesg follows (running 6.0
-stable with all errata for 6.0 applied  ) ; sections
divided by ###

Thank you and have a nice day,
Jan

### ifconfig -a ###
lo0: flags=8049 mtu 32768
index 6 priority 0 llprio 3
groups: lo
inet6 ::1 prefixlen 128
inet6 fe80::1%lo0 prefixlen 64 scopeid 0x6
inet 127.0.0.1 netmask 0xff00
bge0: flags=8b43 mtu 
1500
lladdr 00:14:4f:6f:f6:52
index 1 priority 0 llprio 3
trunk: trunkdev trunk0
media: Ethernet autoselect (1000baseT full-duplex)
status: active
bge1: flags=8b43 mtu 
1500
lladdr 00:14:4f:6f:f6:52
index 2 priority 0 llprio 3
trunk: trunkdev trunk0
media: Ethernet autoselect (1000baseT full-duplex)
status: active
bge2: flags=8802 mtu 1500
lladdr 00:14:4f:6f:f6:54
index 3 priority 0 llprio 3
media: Ethernet autoselect (none)
status: no carrier
bge3: flags=8802 mtu 1500
lladdr 00:14:4f:6f:f6:55
index 4 priority 0 llprio 3
media: Ethernet autoselect (none)
status: no carrier
enc0: flags=0<>
index 5 priority 0 llprio 3
groups: enc
status: active
trunk0: flags=8843 mtu 1500
lladdr 00:14:4f:6f:f6:52
index 7 priority 0 llprio 3
trunk: trunkproto lacp
trunk id: [(8000,00:14:4f:6f:f6:52,403C,,),
 (8000,5c:8a:38:c4:49:c4,0009,,)]
trunkport bge1 active,collecting,distributing
trunkport bge0 active,collecting,distributing
groups: trunk egress
media: Ethernet autoselect
status: active
inet 111.222.333.32 netmask 0xff00 broadcast 111.222.333.255
pflog0: flags=141 mtu 33144
index 8 priority 0 llprio 3
groups: pflog
###

### ifconfig trunk0 ###

trunk0: flags=8843 mtu 1500
lladdr 00:14:4f:6f:f6:52
index 7 priority 0 llprio 3
trunk: trunkproto lacp
trunk id: [(8000,00:14:4f:6f:f6:52,403C,,),
 (8000,5c:8a:38:c4:49:c4,0009,,)]
trunkport bge1 active,collecting,distributing
trunkport bge0 active,collecting,distributing
groups: trunk egress
media: Ethernet autoselect
status: active
inet 111.222.333.32 netmask 0xff00 broadcast 111.222.333.255
inet 111.222.333.33 netmask 0xff00 broadcast 111.222.333.255
inet 111.222.333.34 netmask 0xff00 broadcast 111.222.333.255
inet 111.222.333.35 netmask 0xff00 broadcast 111.222.333.255
###

### dmesg ###
console is /ebus@1f,464000/serial@2,80
Copyright (c) 1982, 1986, 1989, 1991, 1993
The Regents of the University of California.  All rights reserved.
Copyright (c) 1995-2016 OpenBSD. All rights reserved.  http://www.OpenBSD.org

OpenBSD 6.0 (GENERIC.MP) #1171: Tue Jul 26 17:03:19 MDT 2016
dera...@sparc64.openbsd.org:/usr/src/sys/arch/sparc64/compile/GENERIC.MP
real mem = 4294967296 (4096MB)
avail mem = 4204707840 (4009MB)
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root: Sun Fire V245
cpu0 at mainbus0: SUNW,UltraSPARC-IIIi (rev 3.4) @ 1504 MHz
cpu0: physical 32K instruction (32 b/l), 64K data (32 b/l), 1024K external (64 
b/l)
cpu1 at mainbus0: SUNW,UltraSPARC-IIIi (rev 3.4) @ 1504 MHz
cpu1: physical 32K instruction (32 b/l), 64K data (32 b/l), 1024K external (64 
b/l)
"memory-controller" at mainbus0 not configured
"memory-controller" at mainbus0 not configured
pyro0 at mainbus0: "Fire", rev 3, ign 780, bus A 2 to 13
pyro0: dvma map c000-
pci0 at pyro0
ppb0 at pci0 dev 0 function 0 "PLX PEX 8532" rev 0xba
pci1 at ppb0 bus 3
ppb1 at pci1 dev 1 function 0 "PLX PEX 8532" rev 0xba
pci2 at ppb1 bus 4
ppb2 at pci2 dev 0 function 0 "Acer Labs M5249" rev 0x00
pci3 at ppb2 bus 5
ohci0 at