> The reason I'm thinking along these lines is that the id_alloc() scheme > being used to allocate minor numbers for open streams doesn't prevent > clashing with the device's minor numbers (which happen to the the IP > interface's interface index).
Right. ipnet_create_if() needs to allocate its minors from the same space as ipnet_open(), rather than by using the ifindex, and then form the if_dev using that allocated minor rather than the ifindex. On a related note, seems like there should be an ipnet_if_getdev() function which just returns a if_dev to sdev_ipnetops.c, so that sdev_ipnetops doesn't need to have any knowledge about the guts of the ipnetif_t or its locking/access rules. -- meem
