Cathy Zhou wrote: > I can think two solutions: > > a. using strcmp(), and only allow fallback for certain drivers, > including ib and vni. > > b. only fallback when opening /dev/net/<ifN> returns ENOENT. > > I think b would solve the problem in this scenario but it might not > cover all cases. > > What do you think?
I also think b is appropriate. I think that all errors other than ENOENT point towards a problem with the attempted access of an existing /dev/net node which the calling process needs to know about. Either EPERM, EEXIST, or whatever. We'd only want to fall back if the node in /dev/net doesn't exist. -Seb
