Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong perrx statement #2

Open
janus opened this issue Jun 25, 2018 · 0 comments
Open

Wrong perrx statement #2

janus opened this issue Jun 25, 2018 · 0 comments

Comments

@janus
Copy link

janus commented Jun 25, 2018

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);

}`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant