1
0
mirror of https://github.com/mfontanini/libtins synced 2026-01-26 20:01:35 +01:00

Fixed bug when calling BIOCIMMEDIATE on *BSD.

This commit is contained in:
Matias F
2014-02-10 12:33:48 -03:00
parent fbef2e765d
commit 4c4a5f6c03

View File

@@ -163,7 +163,8 @@ void PacketSender::open_l2_socket(const NetworkInterface& iface) {
throw socket_open_error(make_error_string());
}
// Use immediate mode
if(ioctl(sock, BIOCIMMEDIATE, &buffer_size) < 0)
u_int value = 1;
if(ioctl(sock, BIOCIMMEDIATE, &value) < 0)
throw socket_open_error(make_error_string());
// Get the buffer size
if(ioctl(sock, BIOCGBLEN, &buffer_size) < 0)