tech-net archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Adding ifam_pid to ifa_msghdr
Date: Wed, 31 Aug 2016 07:50:27 +0100
From: Roy Marples <roy%marples.name@localhost>
Message-ID: <1554126.CUJfhTUsDq%uberpc.marples.name@localhost>
Christos can answer if I have missed something, but ...
| I looked ......... and have no idea what you are alluding to.
You're changing the size of the struct (and incidentally, not doing it
in a way that is portable to different alignment strategies - you either
need to explicitly align the new field, or supply padding fields to force it)
With a different struct size, at the very least (even if the routing
socket can deal, which I'm not sure of) the sysctl interface needs to
be versioned.
Aside from that, this ...
+#if !defined(COMPAT_14) && !defined(COMPAT_50)
+ ifam.ifam_pid = curproc->p_pid;
+#endif
is certainly not what you want. You might just as well write that
as ...
+/***
+ ifam.ifam_pid = curproc->p_pid;
+***/
for most purposes, as those COMPAT symbols are usually defined.
You're not using them as intended - the COMPAT_XX symbols should
be used to add extra (old) code to remain bin compat with earlier
kernels, not to remove code from current kernels.
kre
Home |
Main Index |
Thread Index |
Old Index