tech-net archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: COMPAT_50 vs NET_RT_IFLIST



On 25/04/2019 16:08, Mouse wrote:
I have, at work, a program, designed and written under 5.2, that uses
sysctl on <CTL_NET, PF_ROUTE, 0, 0, NET_RT_IFLIST, 0> to get a list of
network interfaces, which it then walks looking for things.  (It's part
of a turnkey system.)

I just now tried running this, with the associated 5.2 userland
fragments, under an 8.0 kernel (I just replaced the 5.2 kernel with an
8.0 kernel on the turnkey system, the idea being to get 8.0's hardware
support).  It fails, complaining about RTM_IFINFO blobs with RTA_IFP
set overrunning available space and about blob version numbers being 4
rather than 3.

Is this expected?  Does COMPAT_50 not extend to this operation?  Or am
I doing something wrong?

I can show exact code if it would help, but before throwing that at
people I thought I'd first ask if it's even supposed to work.

Sounds like you didn't compare rtm_version with RTM_VERSION.
See here in libc:
https://nxr.netbsd.org/xref/src/lib/libc/net/getifaddrs.c#106

Roy


Home | Main Index | Thread Index | Old Index