Testing on hosts with firewalls
Florian Weimer
fweimer@redhat.com
Fri Dec 30 12:20:00 GMT 2016
On 12/30/2016 12:35 AM, Mike Frysinger wrote:
> /* Equiv of `ip link set up lo`. Kernel will assign 127.0.0.1 for us. */
> strcpy(ifr.ifr_name, "lo");
> if (ioctl(sock, SIOCGIFFLAGS, &ifr) < 0)
> err(1, "ioctl(SIOCGIFFLAGS) failed");
>
> /* The kernel preserves ifr.ifr_name for use. */
> ifr.ifr_flags |= IFF_UP | IFF_RUNNING;
> if (ioctl(sock, SIOCSIFFLAGS, &ifr) < 0)
> err(1, "ioctl(SIOCSIFFLAGS) failed");
Thanks, this works.
Initial testing shows that my DNS tests are now much more reliable. In
fact, I could no longer reproduce those dropped packets. This looks the
way to go.
Florian
More information about the Libc-alpha
mailing list