On 08/08/13(Thu) 21:34, Alexander Bluhm wrote: > On Thu, Aug 08, 2013 at 01:47:17PM +0200, Martin Pieuchot wrote: > > On 08/08/13(Thu) 01:06, Alexander Bluhm wrote: > > > Hi, > > > > > > To control the lifetime of IPv6 addresses, prefixes and default > > > routers, the kernel and ndp use a bunch of expire fields. Currently > > > they are int or long, but expire should always be time_t. Move > > > vltime and pltime to u_int32_t everywhere. Sort struct fields by > > > size. Struct inet6_ndpr_msghdr is not used at all, so remove it. > > > > It looks to me that the in6_oprlist structure is here only for some > > binary compatibility. So changing its fields makes no sense, however > > I think you can completely remove it as it has been introduced in > > 2002 and nothing use the SIOCGPRLST_IN6 ioctl(2) anymore. ;) > > We have the code > oprl->prefix[i].expire = pr->ndpr_expire; > in the kernel right now. It is wrong to leave in6_oprlist.prefix->expire > as u_long and ndpr_expire as time_t. > > Binary compatibility for ndp will break with this diff anyway and > for most programs with the big time_t diff. > > Ndp implements ioctl(s, SIOCGPRLST_IN6, (caddr_t)&pr), but does not > use it because of #ifdef. > > I would like to do it this way: > 1. fix time_t in all structures with this diff > 2. throw away #ifdef in ndp > 3. remove obsolete ioctl from kernel > 4. remove obsolete struct from header > > ok?
I think it's safer to do 1. after the three other steps, but I don't really have a strong opinion. You have my ok for this diff but you might also consider folding this change into the big time_t diff. Alternatively you can also split this diff into the kernel-only part (changing the nd_defrouter and nd_prefix structure) and the part also used by userland applications. Martin