Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 29 Dec 2001 04:50:44 +0100
From:      Palle Girgensohn <girgen@partitur.se>
To:        freebsd-emulation@FreeBSD.ORG
Subject:   linux_ioctl ethX translation problems? in linux_base-7 with fresh stable
Message-ID:  <15350000.1009597844@palle.girgensohn.se>

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

I'm seeing a strange problem with Mulberry (a Mail User Agent) under linux 
emulation.

Mulberry (in my setup) starts by connecting and fetching the settings from 
an IMSP server. If you never heard of Mulberry or IMSP, never mind right 
now, you should be able to follow anyway ;-)

When using linux_base-6.1, mulberry works fine, but with linux_base-7.1, at 
startup, it fails to resolve the address of the first host (the imsp 
server), and hence fails to get the proper settings. After that, I can 
connect to the mail server and then connect to the first server, no 
problems. It is just this first time that fails.

I rebuilt the linux.ko with -DDEBUG, here's what it says:

linux_base-6.1:
...
/kernel: linux(12028): ioctl(8, 8912, *)
/kernel: linux_ioctl_socket(): ioctl 35090
/kernel: linux_ioctl_socket(): returning 0
/kernel: linux(12028): ioctl(8, 8913, *)
/kernel: linux_ioctl_socket(): ioctl 35091 on eth1
/kernel: linux_ioctl_socket(): eth1 translated to vmnet1
/kernel: linux_ioctl_socket(): returning 0
/kernel: linux(12028): brk(0x8e66000)
/kernel: linux(12028): time(*)
/kernel: linux(12028): time(*)
/kernel: linux(12028): open(/etc/resolv.conf, 0x0, 0x1b6)
/kernel: linux(12028): open returns error 0
/kernel: linux(12028): newfstat(8, *)
/kernel: linux(12028): mmap(0, 8192, 3, 0x00000022, -1, 0)
/kernel: linux(12028): open(/compat/linux/etc/host.conf, 0x0, 0x1b6)
/kernel: linux(12028): open returns error 0
/kernel: linux(12028): newfstat(8, *)
/kernel: linux(12028): mmap(0, 8192, 3, 0x00000022, -1, 0)
/kernel: linux(12028): open(/etc/hosts, 0x0, 0x1b6)
/kernel: linux(12028): open returns error 0
/kernel: linux(12028): fcntl(8, 00000001, *)
/kernel: linux(12028): fcntl(8, 00000002, *)
/kernel: linux(12028): newfstat(8, *)

truss output:
linux_socketcall(0x1,0xbfbff240)		 = 8 (0x8)
linux_ioctl(0x8,0x8912,0xbfbff284)		 = 0 (0x0)
linux_ioctl(0x8,0x8913,0xbfbff25c)		 = 0 (0x0)
close(8)					 = 0 (0x0)
...

but linux_base-7.1:
/kernel: linux(11371): ioctl(8, 8912, *)
/kernel: linux_ioctl_socket(): ioctl 35090
/kernel: linux_ioctl_socket(): returning 0
/kernel: linux(11371): ioctl(8, 8913, *)
/kernel: linux_ioctl_socket(): ioctl 35091 on eth1
/kernel: linux_ioctl_socket(): eth1 translated to vmnet1
/kernel: linux_ioctl_socket(): returning 0
/kernel: linux(11371): ioctl(8, 8913, *)
/kernel: linux_ioctl_socket(): ioctl 35091 on lp0
/kernel: linux_ioctl_socket(): lp0 translated to lp0
/kernel: linux_ioctl_socket(): returning 0
/kernel: linux(11371): ioctl(8, 8913, *)
/kernel: linux_ioctl_socket(): ioctl 35091 on sl0
/kernel: linux_ioctl_socket(): sl0 translated to sl0
/kernel: linux_ioctl_socket(): returning 0
/kernel: linux(11371): ioctl(8, 8913, *)
/kernel: linux_ioctl_socket(): ioctl 35091 on lo0
/kernel: linux_ioctl_socket(): lo0 translated to lo0
/kernel: linux_ioctl_socket(): returning 0
/kernel: linux(11371): ioctl(8, 8913, *)
/kernel: linux_ioctl_socket(): ioctl 35091 on vlan0
/kernel: linux_ioctl_socket(): vlan0 translated to vlan0
/kernel: linux_ioctl_socket(): returning 0
/kernel: linux(11371): ioctl(8, 8913, *)
/kernel: linux_ioctl_socket(): ioctl 35091 on ppp0
/kernel: linux_ioctl_socket(): ppp0 translated to ppp0
/kernel: linux_ioctl_socket(): returning 0
/kernel: linux(11371): ioctl(8, 8913, *)
/kernel: linux_ioctl_socket(): ioctl 35091 on eth7

...
truss output:
linux_socketcall(0x1,0xbfbff220)		 = 8 (0x8)
linux_ioctl(0x8,0x8912,0xbfbff264)		 = 0 (0x0)
linux_ioctl(0x8,0x8913,0xbfbff23c)		 = 0 (0x0)
linux_ioctl(0x8,0x8913,0xbfbff23c)		 = 0 (0x0)
linux_ioctl(0x8,0x8913,0xbfbff23c)		 = 0 (0x0)
linux_ioctl(0x8,0x8913,0xbfbff23c)		 = 0 (0x0)
linux_ioctl(0x8,0x8913,0xbfbff23c)		 = 0 (0x0)
linux_ioctl(0x8,0x8913,0xbfbff23c)		 = 0 (0x0)
linux_ioctl(0x8,0x8913,0xbfbff23c)		 ERR#22 'Invalid argument'
close(8)					 = 0 (0x0)


If the linux_ioctl stuff goes fine, as with lin-6.1, the programs continues 
by doing a DNS request. When tcpdumping for port domain, nothing happens 
when running linux_base-7.1, but with linux_base-6.1, I see a dns request 
for the imsp server. Apparently, Mulberry decides it shall not even try to 
lookup the server, rather it decides it has no connection and starts in 
disconnected mode.

$ ifconfig -l
tx0 lp0 sl0 lo0 vlan0 ppp0 vmnet1
$

versions:
FreeBSD-4 stable cvs'ed yesterday, linux_base-7.1 fresh from ports 
collection.

Regards,
Palle

PS. Mulberry is *the* IMAP MUA, I warmly recommend it; 
http://www.cyrusoft.com/ DS.


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-emulation" in the body of the message




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