Dear Christoph, thank you very much for your quick response and your insightful comments in the upstream bug report.
> Just in case, adding "net.ifnames=0" to the kernel command line restores the > old behaviour - but I understand there are various reasons, up to and > including > layer 9, to not do that. Of course... <offtopic> Up to now we managed to get around systemd and all the extra effects it has. As we are afraid that bullseye may be the last usable debian version that can be operated without systemd, we at least need to test an upgrade path. </offtopic> > > Looking into the source revealed that "eth" is hardcoded in aoe-sancheck.c > > to find valid interfaces. > Yeah, that doesn't make much sense nowadays. The code really should probe the > interface's capabilities instead, I've made a suggestion in the related > upstream bug. You are absolutely right; I refreshed the patch to check for: * IFF_NOARP * IFF_UP * IFF_LOOPBACK > > The trivial patch attached fixes the issue while still being able to > > correctly identify old interface names as well. > > We'd be very glad if this patch could still make it into bullseye... ;-) > Understood. I'll see what upstream will do about that, quite frankly, > your patch is rather last resort - and I know we're in a time frame > here. Thank you for asking for better solutions... :) I hope, the attache version two of the patch better fits the bill! all the best, Adi
--- a/aoe-sancheck.c +++ b/aoe-sancheck.c @@ -513,8 +513,18 @@ ethlist(char **ifs, int nifs) ifr.ifr_ifindex = i; if (ioctl(s, SIOCGIFNAME, &ifr) < 0) continue; - if (strncmp(ifr.ifr_name, "eth", 3)) + // get interface flags + if (ioctl(s, SIOCGIFFLAGS, &ifr) < 0) continue; + // only use interfaces that use arp protocol + if (ifr.ifr_flags & IFF_NOARP) + continue; + // only use interfaces that are up + if (!(ifr.ifr_flags & IFF_UP)) + continue; + // skip loopback interfaces + if (ifr.ifr_flags & IFF_LOOPBACK) + continue; inserteth(ifs, nifs, ifr.ifr_name); n++; }
signature.asc
Description: PGP signature