https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=235920
--- Comment #1 from [email protected] --- We can test that the interface is actually renamed via ioctl() via: #include <stdio.h> #include <string.h> #include <sys/types.h> #include <sys/socket.h> #include <net/if.h> #include <sys/ioctl.h> ------- int list_devices() { char data[4096]; struct ifconf ifc; struct ifreq *ifr; int sk,length; unsigned int idx; sk = socket(AF_INET, SOCK_DGRAM, 0); if(sk < 0) { perror("socket"); return 0; } ifc.ifc_len = sizeof(data); ifc.ifc_buf = (caddr_t)data; if(ioctl(sk, SIOCGIFCONF, &ifc) < 0) { perror("ioctl(SIOCGIFCONF)"); return 0; } ifr = (struct ifreq*)data; for(int i=0;i<ifc.ifc_len;) { length=IFNAMSIZ + ifr->ifr_addr.sa_len; idx=if_nametoindex(ifr->ifr_name); printf("Found: %s [index: %d]\n", ifr->ifr_name,idx); ifr=(struct ifr*)((char*)ifr+length); i+=length; } return 0; } ---------- ifr->ifr_name is changing, but the index is the same (and this is normal?). However, some information remains from the old interface, and this affects http://man.freebsd.org/alloc_unr_specific/9 -- You are receiving this mail because: You are the assignee for the bug. _______________________________________________ [email protected] mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-bugs To unsubscribe, send any mail to "[email protected]"
