commit - 11d6e15cefcc75b4f00c31bcbfe78c0b5eec6340
commit + 3fd3a9cfb5d755547263639da63ddf02c1da99bd
blob - b2f75596c7a2341b035284c80351db2dd73c1944
blob + 7da1c63710f2852205df3e10d461e0d6b93ab569
--- conf.c
+++ conf.c
void conf_patch(FILE *output, int ifs, char *ifname)
{
struct ifreq ifr;
+ char ifix_buf[IFNAMSIZ];
memset(&ifr, 0, sizeof(ifr));
strlcpy(ifr.ifr_name, ifname, IFNAMSIZ);
if (ioctl(ifs, SIOCGIFPAIR, &ifr) == 0 && ifr.ifr_index != 0 &&
- if_indextoname(ifr.ifr_index, ifname) != NULL)
- fprintf(output, " patch %s\n", ifname);
+ if_indextoname(ifr.ifr_index, ifix_buf) != NULL)
+ fprintf(output, " patch %s\n", ifix_buf);
}
void conf_parent(FILE *output, int ifs, char *ifname)