fix: ifreq struct must be passed as pointer to ioctl

This commit is contained in:
Istvan Ruzman
2021-07-09 14:18:03 +02:00
parent 2be10d5114
commit 03e35c3a2a
+1 -1
View File
@@ -438,7 +438,7 @@ bbl_io_add_interface(bbl_ctx_s *ctx, bbl_interface_s *interface) {
}
ifr.ifr_flags |= IFF_PROMISC;
if (ioctl(interface->io.fd_rx, SIOCSIFFLAGS, ifr) == -1){
if (ioctl(interface->io.fd_rx, SIOCSIFFLAGS, &ifr) == -1){
LOG(ERROR, "Setting socket flags error %s (%d) when setting promiscuous mode for interface %s\n",
strerror(errno), errno, interface->name);
return false;