From owner-freebsd-amd64@FreeBSD.ORG Wed Sep 21 17:56:38 2011 Return-Path: Delivered-To: freebsd-amd64@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8AAC7106566C for ; Wed, 21 Sep 2011 17:56:38 +0000 (UTC) (envelope-from peter@wemm.org) Received: from mail-vw0-f44.google.com (mail-vw0-f44.google.com [209.85.212.44]) by mx1.freebsd.org (Postfix) with ESMTP id 4A4D68FC17 for ; Wed, 21 Sep 2011 17:56:37 +0000 (UTC) Received: by vws5 with SMTP id 5so2906699vws.17 for ; Wed, 21 Sep 2011 10:56:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wemm.org; s=google; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=F/Zgeg9L0GlHakHUa/7x7z3yU1Yro2qjSCrFOtuGIk0=; b=xEG0zijYJdCsgUeg2ZVbqZzPDwcveTC4bMRsZRQUFuMkbgykyLo6nUPlhTKEubHRaZ oozTgWrkk2cK5VHc8uyAQ9PhDRUmv40nA54ncIPwXVm1z3XnK5U8ZvB6/+6+58Jv/jW+ zdqjb2veutiQGxE+oWyQVfFlwsNqTBj+ndzsk= MIME-Version: 1.0 Received: by 10.220.168.15 with SMTP id s15mr234081vcy.256.1316626010365; Wed, 21 Sep 2011 10:26:50 -0700 (PDT) Received: by 10.220.98.75 with HTTP; Wed, 21 Sep 2011 10:26:50 -0700 (PDT) In-Reply-To: References: <714EF3C9-33B0-4EF5-B52C-1E95F7F432F9@fisglobal.com> Date: Wed, 21 Sep 2011 10:26:50 -0700 Message-ID: From: Peter Wemm To: Sergey Kandaurov Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: FreeBSD amd64 , Devin Teske , Dave Robison Subject: Re: 32-bit route(8) on amd64 host and jails X-BeenThere: freebsd-amd64@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the AMD64 platform List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Sep 2011 17:56:38 -0000 On Wed, Sep 21, 2011 at 5:47 AM, Sergey Kandaurov wrote= : > On 21 September 2011 06:40, Devin Teske wrote= : >> I'm noticing that a 32-bit route(8) shows strange behaviour while runnin= g under an amd64 kernel (regardless of whether in the base-host -- utilizin= g /usr/lib32/libc.so.7 -- or in a jail and/or vimage -- 32-bit in nature; r= esults are same). >> >> Executable runs fine, but you can't (a) set the default route or (b) vie= w the default route (after successfully setting it with the amd64 build, of= course). >> >> ASIDE: This is under 8.1-RELEASE. >> >> When attempting to set the default route, you get the following... >> >> root@kps0a / # route add -net default 10.10.125.99 >> route: writing to routing socket: Invalid argument >> add net default: gateway 10.10.125.99: Invalid argument >> >> Meanwhile, using the amd64 version, no issues. >> >> When attempting to view the default route, you get the following... >> >> root@kps0a / # route -n get default >> =A0 route to: default >> destination: default >> =A0 =A0 =A0 mask: default >> =A0 =A0gateway: default >> =A0 =A0 =A0flags: >> =A0recvpipe =A0sendpipe =A0ssthresh =A0rtt,msec =A0 =A0mtu =A0 =A0 =A0 = =A0weight =A0 =A0expire >> =A0 =A0 =A0 0 =A0 =A0 =A0 =A0 0 =A0 =A0 =A0 =A0 0 =A0 =A0 =A0 =A0 0 =A0 = =A0 =A0 =A0 0 =A0 =A0 =A0 =A0 0 =A0-1316570637 >> >> It's the "gateway: default" that's out of place. >> > > Currently, FreeBSD has a poor shape of rtsocket freebsd32 compatibility, > AFAIK only sysctl layer (sysctl_rtsock) is aware of it. > That means when a 32bit app writes some data to a routing socket, > kernel expects to receive it in the native ABI, and it doesn't work. We have changes at work to make some of this stuff work. However, in theory we generally don't support administrative tool emulation. Have you considered perhaps putting some static linked native binaries for route,netstat,etc into your jail? --=20 Peter Wemm - peter@wemm.org; peter@FreeBSD.org; peter@yahoo-inc.com; KI6FJV "All of this is for nothing if we don't go to the stars" - JMS/B5 "If Java had true garbage collection, most programs would delete themselves upon execution." -- Robert Sewell