tapip icon indicating copy to clipboard operation
tapip copied to clipboard

Wrong perrx statement

Open janus opened this issue 7 years ago • 0 comments

This line , perrx("ioctl SIOCGIFHWADDR"); should be , perrx("ioctl SIOCGIFMTU");

void getmtu_tap(unsigned char *name, int *mtu){ struct ifreq ifr = {};

`strcpy(ifr.ifr_name, (char *)name);
/* get net order hardware address */
if (ioctl(skfd, SIOCGIFMTU, (void *)&ifr) < 0) {
	close(skfd);
	perrx("ioctl SIOCGIFHWADDR");
}
*mtu = ifr.ifr_mtu;
dbg("mtu: %d", ifr.ifr_mtu);

}`

janus avatar Jun 25 '18 12:06 janus