Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 24 Jan 2006 05:10:00 -0800
From:      "David F. Severski" <davidski@deadheaven.com>
To:        freebsd-mobile@freebsd.org
Subject:   hostapd_cli looking for wrong socket
Message-ID:  <20060124131000.GM69091@geoff.deadheaven.com>

next in thread | raw e-mail | index | archive | help

--PpocKf6TCvdC9BKE
Content-Type: multipart/mixed; boundary="DozTQjXnjm3C9Xhk"
Content-Disposition: inline


--DozTQjXnjm3C9Xhk
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

Running 6-STABLE, it looks like hostapd_cli is trying to connect to a non
existent control socket.  The hostapd socket for my ath0 interface looks
like the following:

ls -l /var/run/hostapd/
total 4
drwxr-x---   2 root  wheel   512 Jan 24 05:03 ./
drwxr-xr-x  12 root  wheel  1024 Jan 24 05:03 ../
srwxrwx---   1 root  wheel     0 Jan 24 05:03 ath0=

Yet running hostapd_cli with any commands, such as 'hostapd_cli mib
dot11', seems to be looking for a socket named 'ath' (note the lack of
the 0).  As viewed from strace:

connect(3, {sa_family=AF_UNIX, path="/var/run/hostapd/ath"}, 22) = -1
ENOENT (No such file or directory) close

My hostapd.conf is as follows:
interface=ath0
driver=bsd

logger_syslog=-1
logger_syslog_level=2
logger_stdout=-1
logger_stdout_level=-1

dump_file=/tmp/hostapd.dump
ctrl_interface=/var/run/hostapd
ctrl_interface_group=wheel

ssid=Deadheaven

wpa=1
wpa_passphrase=<REDACTED>
wpa_key_mgmt=WPA-PSK
wpa_pairwise=CCMP

The full strace file is attached.  Have I misconfigured hostapd or
hostapd_cli somehow?

David

--DozTQjXnjm3C9Xhk
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="hostapd_cli.trace"

execve(0xbfbfe750, [0xbfbfec40], [/* 0 vars */]) = 0
mmap(0, 3608, PROT_READ|PROT_WRITE, MAP_ANON, -1, 0) = 0x2806e000
munmap(0x2806e000, 3608)                = 0
__sysctl([...], 0x2806a998, 0xbfbfe9f4, NULL, 0) = 0
mmap(0, 32768, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANON, -1, 0) = 0x2806e000
issetugid(0)                            = 0
open("/etc/libmap.conf", O_RDONLY)      = -1 ENOENT (No such file or directory)
open("/var/run/ld-elf.so.hints", O_RDONLY) = 3
read(3, "DUMP_REL_PRE\0LD_DUMP_REL_POST\0__"..., 128) = 128
lseek(3, 128, SEEK_SET)                 = 128
read(3, "/lib:/usr/lib:/usr/lib/compat:/u"..., 110) = 110
close(3)                                = 0
access("/lib/libc.so.6", F_OK)          = 0
open("/lib/libc.so.6", O_RDONLY)        = 3
fstat(3, {st_mode=0, st_size=0, ...})   = 0
read(3, "\177ELF\1\1\1\t\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\300\330"..., 4096) = 4096
mmap(0, 880640, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_NOCORE, 3, 0) = 0x28076000
mprotect(0x28134000, 4096, PROT_READ|PROT_WRITE|PROT_EXEC) = 0
mprotect(0x28134000, 4096, PROT_READ|PROT_EXEC) = 0
mmap(0x28135000, 20480, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0xbf000) = 0x28135000
mmap(0x2813a000, 77824, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANON, -1, 0) = 0x2813a000
close(3)                                = 0
sysarch(0xa, 0xbfbfea70)                = 0
mmap(0, 376, PROT_READ|PROT_WRITE, MAP_ANON, -1, 0) = 0x2814d000
munmap(0x2814d000, 376)                 = 0
mprotect(0x28076000, 782336, PROT_READ|PROT_WRITE|PROT_EXEC) = 0
mmap(0, 22176, PROT_READ|PROT_WRITE, MAP_ANON, -1, 0) = 0x2814d000
munmap(0x2814d000, 22176)               = 0
mprotect(0x28076000, 782336, PROT_READ|PROT_EXEC) = 0
sigprocmask(SIG_BLOCK, ~[ILL TRAP ABRT EMT FPE BUS SEGV SYS], []) = 0
sigprocmask(SIG_SETMASK, [], NULL)      = 0
stat("/var/run/hostapd", {st_mode=070170, st_size=0, ...}) = 0
open("/var/run/hostapd", O_RDONLY|O_NONBLOCK) = 3
fstat(3, {st_mode=070170, st_size=0, ...}) = 0
fcntl(3, F_SETFD, FD_CLOEXEC)           = 0
readlink("/etc/malloc.conf", 0xbfbfe7a0, 63) = -1 ENOENT (No such file or directory)
issetugid(0xe8)                         = 0
mmap(0, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANON, -1, 0) = 0x2814d000
break(0x804d000)                        = 0
break(0x804e000)                        = 0
__sysctl([-433864.-433022], 2, "", [4294533432], NULL, 0) = 0
syscall_397(0x3, 0xbfbfe840)            = 0
break(0x804f000)                        = 0
getdirentries(3, /* 3 entries */, 4096, [0]) = 512
fstat(1, {st_mode=0, st_size=0, ...})   = 0
break(0x8050000)                        = 0
ioctl(1, TIOCGETA, {B0 -opost -isig -icanon -echo ...}) = 0
write(1, "Selected interface \'ath0\'\n", 26) = 26
break(0x8051000)                        = 0
lseek(3, 0, SEEK_SET)                   = 0
close(3)                                = 0
socket(PF_UNIX, SOCK_DGRAM, 0)          = 3
getpid()                                = 70017 (ppid 70016)
bind(3, {sa_family=AF_UNIX, path="/tmp/hostapd_ctrl_70017-"}, 26) = 0
connect(3, {sa_family=AF_UNIX, path="/var/run/hostapd/ath"}, 22) = -1 ENOENT (No such file or directory)
close(3)                                = 0
unlink("/tmp/hostapd_ctrl_70017-0")     = -1 ENOENT (No such file or directory)
writev(2, [{NULL, 0}, {NULL, 0}, {NULL, 0}, {NULL, 0}], 4) = 76
exit(-1)                                = ?

--DozTQjXnjm3C9Xhk--

--PpocKf6TCvdC9BKE
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----

iEYEARECAAYFAkPWJygACgkQlTJ+DI1JK1vx5ACeJ4dxy8V6AAsn0w6cvkZx5jlZ
v2QAnA6Rw6znXncIwLpx9RNqh+OK0gGe
=ZYRN
-----END PGP SIGNATURE-----

--PpocKf6TCvdC9BKE--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060124131000.GM69091>