Hi Roy,
Roy Marples wrote:
On 14/01/2021 11:03, Simon Burge wrote:
Sure, I will have a look. Anything IPv6 related I might need a helping
hand to get a test case though :).
As they share a similar structure, you solve one you likely solve the other.
I can assume you have working IPv4 ;)
In general where we can define the structure that are passed in an
interface, regardless if it's a ioctl or sysctl or whatever, we should
try to design the structure so that it's the same regardless of if it's
built with 32-bit or 64-bit userlands.
The issue with in_nbrinfo and in6_nbrinfo is that there's a "long" in
the structure, so this has different sizes depending on your native long
size.
I _think_ this is the is value out of the la_asked member of struct
llentry which is a uint16_t so we can just make it an int the your
structures will align nicely. In both cases the ifname name is 16
bytes. For in_nbrinfo in_addr is effectively an int so we have just
four ints after the ifname. For in6_nbrinfo the in6_addr is 128 bytes
so aligns nicely, then a couple more ints after that.
If "asked" is from struct llentry then the attached patch should work
without requiring any compat32 support. If you're happy with this, I'll
test a bit more then commit.