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 Thu, 25 Apr 2019, Roy Marples wrote:

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

Hmmm, I would've expected it to work.

Since you're running on an 8.0 kernel, it's definitely not something that I broke during the [pgoyette_compat] branch work, but whatever might need fixing will likely need to be adapted to the new order.

Let me know if there's any way I can help.



+--------------------+--------------------------+-----------------------+
| Paul Goyette       | PGP Key fingerprint:     | E-mail addresses:     |
| (Retired)          | FA29 0E3B 35AF E8AE 6651 | paul%whooppee.com@localhost     |
| Software Developer | 0786 F758 55DE 53BA 7731 | pgoyette%netbsd.org@localhost   |
+--------------------+--------------------------+-----------------------+


Home | Main Index | Thread Index | Old Index