>Synopsis: after booting, laptop connects to neighbor's open wifi
hotspot, which is not listed in my /etc/hostname.if
>Category: not sure, sorry (networking?)
>Environment:
System : OpenBSD 6.4
Details : OpenBSD 6.4 (GENERIC.MP) #6: Sat Jan 26 20:37:44 CET 2019
[email protected]:/usr/src/sys/arch/amd64/compile/GENERIC.MP
Architecture: OpenBSD.amd64
Machine : amd64
>Description:
I use /etc/hostname.if to automatically connect to wifi when I boot
my Thinkpad laptop. When at home, I'm within range of several neighbors'
hotspots, one of which does not have a password. My laptop sometimes
joins that neighbor's hotspot during boot, even though his ssid is not
in my /etc/hostname.athn0.
Here are the contents of my /etc/hostname.athn0:
!sh /home/bruno/bin/mac-generator
!ifconfig \$if lladdr $(cat /home/bruno/.fakemac)
!ifconfig \$if mode 11g
join bibliotheca_alexandrina wpakey somePassWorD
join AndroidAP-bd wpakey soMepaSSwoRd
join ARMCVisitor
dhcp
Here is the output of 'ifconfig athn0 joinlist':
bruno@thinkpad:~391$ ifconfig athn0 joinlist
athn0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
lladdr 00:26:b6:eb:9d:23
index 2 priority 4 llprio 3
groups: wlan egress
media: IEEE802.11 autoselect mode 11g (OFDM18 mode 11g)
status: active
ieee80211: join ARMCVisitor chan 1 bssid 00:e1:6d:63:57:45 -40dBm
join: bibliotheca_alexandrina
AndroidAP-bd
ARMCVisitor
inet 10.1.72.144 netmask 0xffffe000 broadcast 10.1.95.255
Neighbor's hotspot is named "xfinity". When I find that I'm
connected to his network after booting, I get this (yes, it shows "nwid"):
bruno@thinkpad:~391$ ifconfig athn0 joinlist
athn0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
...
ieee80211: nwid xfinity ...
>How-To-Repeat:
Reboot several times until the problem recurs.
>Fix:
If I find that I'm connected to neighbor's wifi after a reboot, running
# sh /etc/netstart athn0 fixes the problem (i.e., after the command,
output of ifconfig athn0 shows "ieee80211: join bibliotheca_alexandrina"
as expected).
dmesg:
OpenBSD 6.4 (GENERIC.MP) #6: Sat Jan 26 20:37:44 CET 2019
[email protected]:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 8299085824 (7914MB)
avail mem = 8039702528 (7667MB)
warning: no entropy supplied by boot loader
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.7 @ 0x7faa0020 (8 entries)
bios0: vendor coreboot version "CBET4000 1403e19" date 09/02/2016
bios0: LENOVO 2767EA9
acpi0 at bios0: rev 2
acpi0: sleep states S0 S3 S4 S5
acpi0: tables DSDT FACP SSDT MCFG TCPA APIC DMAR HPET
acpi0: wakeup devices HDEF(S4) USB1(S4) USB2(S4) USB3(S4) EHC1(S4)
USB4(S4) USB5(S4) USB6(S4) EHC2(S4) SLT1(S4) SLT2(S4) SLT3(S4) SLT6(S4)
LANC(S3) LANR(S3) SLPB(S3) [...]
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpimcfg0 at acpi0
acpimcfg0: addr 0xf0000000, bus 0-63
acpimadt0 at acpi0 addr 0xfee00000: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: Intel(R) Core(TM)2 CPU P8600 @ 2.40GHz, 1600.29 MHz, 06-17-0a
cpu0:
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,SSE4.1,XSAVE,NXE,LONG,LAHF,PERF,SENSOR,MELTDOWN
cpu0: 3MB 64b/line 8-way L2 cache
cpu0: smt 0, core 0, package 0
mtrr: Pentium Pro MTRR support, 8 var ranges, 88 fixed ranges
cpu0: apic clock running at 266MHz
cpu0: mwait min=64, max=64, C-substates=0.2.2.2.2.1.3, IBE
cpu1 at mainbus0: apid 1 (application processor)
cpu1: Intel(R) Core(TM)2 CPU P8600 @ 2.40GHz, 1600.06 MHz, 06-17-0a
cpu1:
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,SSE4.1,XSAVE,NXE,LONG,LAHF,PERF,SENSOR,MELTDOWN
cpu1: 3MB 64b/line 8-way L2 cache
cpu1: smt 0, core 1, package 0
ioapic0 at mainbus0: apid 2 pa 0xfec00000, version 20, 24 pins
acpihpet0 at acpi0: 14318179 Hz
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus -1 (PEGP)
acpiprt2 at acpi0: bus 1 (RP01)
acpiprt3 at acpi0: bus 2 (RP02)
acpiprt4 at acpi0: bus 3 (RP03)
acpiprt5 at acpi0: bus 4 (RP04)
acpiprt6 at acpi0: bus -1 (RP05)
acpiprt7 at acpi0: bus -1 (RP06)
acpiprt8 at acpi0: bus 5 (PCIB)
acpiec0 at acpi0
acpicpu0 at acpi0: C1 (bogo buffer): C2 (bogo buffer): C3 (bogo buffer):
C1(@1 halt!), PSS
acpicpu1 at acpi0: C1 (bogo buffer): C2 (bogo buffer): C3 (bogo buffer):
C1(@1 halt!), PSS
acpitz0 at acpi0: critical temperature is 127 degC
acpitz1 at acpi0: critical temperature is 99 degC
acpithinkpad0 at acpi0
acpiac0 at acpi0: AC unit online
acpibat0 at acpi0: BAT0 model "42T4644" serial 1165 type LION oem "SANYO"
acpibat1 at acpi0: BAT1 not present
acpibtn0 at acpi0: SLPB
acpibtn1 at acpi0: LID_
acpicmos0 at acpi0
acpiac1 at acpi0: AC unit offline
acpidock0 at acpi0: DOCK docked (1)
acpivideo0 at acpi0: GFX0
acpivout0 at acpivideo0: LCD0
cpu0: Enhanced SpeedStep 1600 MHz: speeds: 2401, 2400, 1600, 800 MHz
pci0 at mainbus0 bus 0
pchb0 at pci0 dev 0 function 0 "Intel GM45 Host" rev 0x07
inteldrm0 at pci0 dev 2 function 0 "Intel GM45 Video" rev 0x07
drm0 at inteldrm0
intagp0 at inteldrm0
agp0 at intagp0: aperture at 0xd0000000, size 0x10000000
inteldrm0: msi
inteldrm0: 1280x800, 32bpp
wsdisplay0 at inteldrm0 mux 1: console (std, vt100 emulation)
wsdisplay0: screen 1-5 added (std, vt100 emulation)
"Intel GM45 Video" rev 0x07 at pci0 dev 2 function 1 not configured
em0 at pci0 dev 25 function 0 "Intel ICH9 IGP M AMT" rev 0x03: msi,
address 00:1f:16:28:28:04
uhci0 at pci0 dev 26 function 0 "Intel 82801I USB" rev 0x03: apic 2 int 16
uhci1 at pci0 dev 26 function 1 "Intel 82801I USB" rev 0x03: apic 2 int 17
uhci2 at pci0 dev 26 function 2 "Intel 82801I USB" rev 0x03: apic 2 int 18
ehci0 at pci0 dev 26 function 7 "Intel 82801I USB" rev 0x03: apic 2 int 18
usb0 at ehci0: USB revision 2.0
uhub0 at usb0 configuration 1 interface 0 "Intel EHCI root hub" rev
2.00/1.00 addr 1
azalia0 at pci0 dev 27 function 0 "Intel 82801I HD Audio" rev 0x03: msi
azalia0: codecs: Conexant CX20561, Conexant/0x2c06, using Conexant CX20561
audio0 at azalia0
ppb0 at pci0 dev 28 function 0 "Intel 82801I PCIE" rev 0x03
pci1 at ppb0 bus 1
ppb1 at pci0 dev 28 function 1 "Intel 82801I PCIE" rev 0x03
pci2 at ppb1 bus 2
athn0 at pci2 dev 0 function 0 "Atheros AR9281" rev 0x01: apic 2 int 17
athn0: AR9280 rev 2 (2T2R), ROM rev 22, address 00:26:b6:f6:04:e4
ppb2 at pci0 dev 28 function 2 "Intel 82801I PCIE" rev 0x03
pci3 at ppb2 bus 3
ppb3 at pci0 dev 28 function 3 "Intel 82801I PCIE" rev 0x03
pci4 at ppb3 bus 4
xhci0 at pci4 dev 0 function 0 "Renesas uPD720202 xHCI" rev 0x02: msi,
xHCI 1.0
usb1 at xhci0: USB revision 3.0
uhub1 at usb1 configuration 1 interface 0 "Renesas xHCI root hub" rev
3.00/1.00 addr 1
uhci3 at pci0 dev 29 function 0 "Intel 82801I USB" rev 0x03: apic 2 int 16
uhci4 at pci0 dev 29 function 1 "Intel 82801I USB" rev 0x03: apic 2 int 17
uhci5 at pci0 dev 29 function 2 "Intel 82801I USB" rev 0x03: apic 2 int 18
ehci1 at pci0 dev 29 function 7 "Intel 82801I USB" rev 0x03: apic 2 int 16
usb2 at ehci1: USB revision 2.0
uhub2 at usb2 configuration 1 interface 0 "Intel EHCI root hub" rev
2.00/1.00 addr 1
ppb4 at pci0 dev 30 function 0 "Intel 82801BAM Hub-to-PCI" rev 0x93
pci5 at ppb4 bus 5
cbb0 at pci5 dev 0 function 0 "Ricoh 5C476 CardBus" rev 0xba: apic 2 int 16
"Ricoh 5C832 Firewire" rev 0x04 at pci5 dev 0 function 1 not configured
sdhc0 at pci5 dev 0 function 2 "Ricoh 5C822 SD/MMC" rev 0x21: apic 2 int 18
sdhc0: SDHC 1.0, 33 MHz base clock
sdmmc0 at sdhc0: 4-bit
"Ricoh 5C843 MMC" rev 0x11 at pci5 dev 0 function 3 not configured
"Ricoh 5C592 Memory Stick" rev 0x11 at pci5 dev 0 function 4 not configured
"Ricoh 5C852 xD" rev 0x11 at pci5 dev 0 function 5 not configured
cardslot0 at cbb0 slot 0 flags 0
cardbus0 at cardslot0: bus 6 device 0 cacheline 0x0, lattimer 0x20
pcmcia0 at cardslot0
pcib0 at pci0 dev 31 function 0 "Intel 82801IEM LPC" rev 0x03
ahci0 at pci0 dev 31 function 2 "Intel 82801I AHCI" rev 0x03: msi, AHCI 1.2
ahci0: port 0: 3.0Gb/s
ahci0: port 1: 3.0Gb/s
scsibus1 at ahci0: 32 targets
sd0 at scsibus1 targ 0 lun 0: <ATA, SanDisk SDSSDA24, U210> SCSI3
0/direct fixed naa.5001b44ed3f22212
sd0: 228936MB, 512 bytes/sector, 468862128 sectors, thin
sd1 at scsibus1 targ 1 lun 0: <ATA, SanDisk SSD PLUS, UF45> SCSI3
0/direct fixed naa.5001b448b9459a8d
sd1: 228944MB, 512 bytes/sector, 468877312 sectors, thin
ichiic0 at pci0 dev 31 function 3 "Intel 82801I SMBus" rev 0x03: apic 2
int 18
iic0 at ichiic0
usb3 at uhci0: USB revision 1.0
uhub3 at usb3 configuration 1 interface 0 "Intel UHCI root hub" rev
1.00/1.00 addr 1
usb4 at uhci1: USB revision 1.0
uhub4 at usb4 configuration 1 interface 0 "Intel UHCI root hub" rev
1.00/1.00 addr 1
usb5 at uhci2: USB revision 1.0
uhub5 at usb5 configuration 1 interface 0 "Intel UHCI root hub" rev
1.00/1.00 addr 1
usb6 at uhci3: USB revision 1.0
uhub6 at usb6 configuration 1 interface 0 "Intel UHCI root hub" rev
1.00/1.00 addr 1
usb7 at uhci4: USB revision 1.0
uhub7 at usb7 configuration 1 interface 0 "Intel UHCI root hub" rev
1.00/1.00 addr 1
usb8 at uhci5: USB revision 1.0
uhub8 at usb8 configuration 1 interface 0 "Intel UHCI root hub" rev
1.00/1.00 addr 1
isa0 at pcib0
isadma0 at isa0
pckbc0 at isa0 port 0x60/5 irq 1 irq 12
pckbd0 at pckbc0 (kbd slot)
wskbd0 at pckbd0: console keyboard, using wsdisplay0
pms0 at pckbc0 (aux slot)
wsmouse0 at pms0 mux 0
wsmouse1 at pms0 mux 0
pms0: Synaptics touchpad, firmware 7.0, 0x1c0b1 0xb00000
pcppi0 at isa0 port 0x61
spkr0 at pcppi0
aps0 at isa0 port 0x1600/31
vmm0 at mainbus0: VMX (using slow L1TF mitigation)
efifb at mainbus0 not configured
/dev/ksyms: Symbol table not valid.
uvideo0 at uhub0 port 6 configuration 1 interface 0 "Chicony Electronics
Co., Ltd. Integrated Camera" rev 2.00/3.20 addr 2
video0 at uvideo0
ugen0 at uhub4 port 1 "AuthenTec Fingerprint Sensor" rev 2.00/17.03 addr 2
ugen1 at uhub4 port 2 "Lenovo Computer Corp ThinkPad Bluetooth with
Enhanced Data Rate II" rev 2.00/3.99 addr 3
vscsi0 at root
scsibus2 at vscsi0: 256 targets
softraid0 at root
scsibus3 at softraid0: 256 targets
root on sd1a (1234567812345678.a) swap on sd1b dump on sd1b
usbdevs:
Controller /dev/usb0:
addr 01: 8086:0000 Intel, EHCI root hub
high speed, self powered, config 1, rev 1.00
driver: uhub0
addr 02: 17ef:1004 Chicony Electronics Co., Ltd., Integrated Camera
high speed, power 500 mA, config 1, rev 3.20, iSerialNumber SN0001
driver: uvideo0
Controller /dev/usb1:
addr 01: 1912:0000 Renesas, xHCI root hub
super speed, self powered, config 1, rev 1.00
driver: uhub1
Controller /dev/usb2:
addr 01: 8086:0000 Intel, EHCI root hub
high speed, self powered, config 1, rev 1.00
driver: uhub2
Controller /dev/usb3:
addr 01: 8086:0000 Intel, UHCI root hub
full speed, self powered, config 1, rev 1.00
driver: uhub3
Controller /dev/usb4:
addr 01: 8086:0000 Intel, UHCI root hub
full speed, self powered, config 1, rev 1.00
driver: uhub4
addr 02: 08ff:2810 AuthenTec, Fingerprint Sensor
full speed, power 100 mA, config 1, rev 17.03
driver: ugen0
Controller /dev/usb5:
addr 01: 8086:0000 Intel, UHCI root hub
full speed, self powered, config 1, rev 1.00
driver: uhub5
Controller /dev/usb6:
addr 01: 8086:0000 Intel, UHCI root hub
full speed, self powered, config 1, rev 1.00
driver: uhub6
Controller /dev/usb7:
addr 01: 8086:0000 Intel, UHCI root hub
full speed, self powered, config 1, rev 1.00
driver: uhub7