1
0
mirror of https://github.com/rtbrick/bngblaster.git synced 2024-05-06 15:54:57 +00:00

fix: ifreq struct must be passed as pointer to ioctl

This commit is contained in:
Istvan Ruzman
2021-07-09 14:15:43 +02:00
parent 2be10d5114
commit 03e35c3a2a

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;