32-bit route(8) on amd64 host and jails
pluknet at gmail.com
Fri Oct 14 21:40:22 UTC 2011
On 21 September 2011 16:47, Sergey Kandaurov <pluknet at gmail.com> wrote:
> On 21 September 2011 06:40, Devin Teske <devin.teske at fisglobal.com> wrote:
>> I'm noticing that a 32-bit route(8) shows strange behaviour while running under an amd64 kernel (regardless of whether in the base-host -- utilizing /usr/lib32/libc.so.7 -- or in a jail and/or vimage -- 32-bit in nature; results are same).
>> Executable runs fine, but you can't (a) set the default route or (b) view 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 at 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 at kps0a / # route -n get default
>> route to: default
>> destination: default
>> mask: default
>> gateway: default
>> flags: <UP,GATEWAY,DONE,STATIC>
>> recvpipe sendpipe ssthresh rtt,msec mtu weight expire
>> 0 0 0 0 0 0 -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.
Can you please try this preliminary patch and report back?
You only need to rebuild kernel and reboot with the attached patch
to enable use of e.g. 32-bit route(8) command on amd64 kernel.
No any userland utility needs to rebuild to enable the compatibility.
Tested on 8.2 amd64 only with route get default and route delete/add.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 8780 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-amd64/attachments/20111014/51d57633/rtmsg32.bin
More information about the freebsd-amd64