Date: Mon, 22 Oct 2001 20:51:26 +0200 (CEST) From: Martin Blapp <mb@imp.ch> To: <freebsd-emulation@freebsd.org> Cc: <des@freebsd.org>, <marcel@freebsd.org> Subject: linux_connect() broken for linux_base-7 Message-ID: <20011022204208.Q29117-200000@levais.imp.ch>
next in thread | raw e-mail | index | archive | help
This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. Send mail to mime@docserver.cac.washington.edu for more info. --0-2017388155-1003776686=:29117 Content-Type: TEXT/PLAIN; charset=US-ASCII Hi, As you may have seen linux_base-7 is not able to resolve any DNS-Query's. For every connect(), we get EINVAL back. The resposible part is: sys/netinet/udp_usrreq.c 853 inp = sotoinpcb(so); 854 if (inp == 0) 855 return EINVAL; The socket seems to be in a state where the initialisation fails. Here is a kdump of a simple gethostbyname program: 15097 gethost CALL linux_socketcall(0x1,0xbfbfe408) 15097 gethost RET linux_socketcall 3 15097 gethost CALL linux_socketcall(0x3,0xbfbfe408) 15097 gethost RET linux_socketcall -1 errno 22 Invalid argument As you see the first linux_socketcall got passed, and the second, which is linux_connect(), fails. Anybody have some clues ? I've no linux box around to compile a statically linked test binary. If anyone has one with glibc2.2.2 and resolver.2.2.2 please compile one and send it to me. The code of the test programm is attached. It works with linux_base-6, but not with linux_base-7. As I still have problems reading kernel source without help, I'm not sure where to look. I've no clue what sotoinpcb() does. I'm sorry. Martin Martin Blapp, mb@imp.ch ------------------------------------------------------------------ Improware AG, UNIX solution and service provider Zurlindenstrasse 29, 4133 Pratteln, Switzerland Phone: +41 061 826 93 00: +41 61 826 93 01 PGP Fingerprint: 57E 7CCD 2769 E7AC C5FA DF2C 19C6 DCD1 1B3A EC9C ------------------------------------------------------------------ --0-2017388155-1003776686=:29117 Content-Type: TEXT/PLAIN; charset=US-ASCII; name="gethost.c" Content-Transfer-Encoding: BASE64 Content-ID: <20011022205126.L29117@levais.imp.ch> Content-Description: Content-Disposition: attachment; filename="gethost.c" I2luY2x1ZGUgPHN0ZGlvLmg+DQojaW5jbHVkZSA8c3lzL3R5cGVzLmg+DQoj aW5jbHVkZSA8bmV0aW5ldC9pbi5oPg0KI2luY2x1ZGUgPGFycGEvaW5ldC5o Pg0KI2luY2x1ZGUgPG5ldGRiLmg+DQoNCnZvaWQNCnVzYWdlKHZvaWQpDQp7 DQogICAgICAgIHByaW50ZigidXNhZ2U6IGEub3V0IGhvc3RhZGRyZXNzXG4i KTsNCiAgICAgICAgZXhpdCgxKTsNCn0NCg0KaW50DQptYWluKGludCBhcmdj LCBjaGFyICphcmd2W10pDQp7DQogICAgICAgIHN0cnVjdCBpbl9hZGRyIGFk ZHI7DQogICAgICAgIGludCAgICAgcmV0LCAqaW50cDsNCiAgICAgICAgY2hh ciAgICAqKnA7DQogICAgICAgIHN0cnVjdCBob3N0ZW50ICpocDsNCg0KICAg ICAgICBpZiAoYXJnYyAhPSAyKQ0KICAgICAgICAgICAgICAgIHVzYWdlKCk7 DQoNCiAgICAgICAgaHAgPSBnZXRob3N0YnluYW1lKGFyZ3ZbMV0pOw0KICAg ICAgICBpZiAoaHAgPT0gTlVMTCkgew0KICAgICAgICAgICAgICAgIHByaW50 ZigiRVJST1I6IGdldGhvc3RieW5hbWUoXCIlc1wiKVxuIiwgYXJndlsxXSk7 DQogICAgICAgICAgICAgICAgZXhpdCgxKTsNCiAgICAgICAgfQ0KICAgICAg ICBwcmludGYoIiVzOiAiLCBocC0+aF9uYW1lKTsNCiAgICAgICAgcCA9IGhw LT5oX2FsaWFzZXM7DQogICAgICAgIHdoaWxlICgqcCkNCiAgICAgICAgICAg ICAgICBwcmludGYoIiVzXG4iLCAqcCsrKTsNCg0KICAgICAgICBwID0gaHAt PmhfYWRkcl9saXN0Ow0KICAgICAgICB3aGlsZSAoKnApIHsNCiAgICAgICAg ICAgICAgICBpbnRwID0gKGludCAqKSAqcCsrOw0KICAgICAgICAgICAgICAg IHJldCA9ICppbnRwOw0KICAgICAgICAgICAgICAgIGFkZHIuc19hZGRyID0g cmV0Ow0KICAgICAgICAgICAgICAgIHByaW50ZigiJXNcbiIsIGluZXRfbnRv YShhZGRyKSk7DQogICAgICAgIH0NCg0KICAgICAgICByZXR1cm4gMDsNCn0N Cg== --0-2017388155-1003776686=:29117-- 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?20011022204208.Q29117-200000>