libnetutils/packet.c - fix a raw socket reception race am: 74346aac9c
Change-Id: I9c57bf11896d4bb975a1f053dee9c23e61c013f2
This commit is contained in:
commit
e6877b7f16
1 changed files with 1 additions and 1 deletions
|
|
@ -40,7 +40,7 @@
|
|||
int fatal(const char*);
|
||||
|
||||
int open_raw_socket(const char* ifname __unused, uint8_t hwaddr[ETH_ALEN], int if_index) {
|
||||
int s = socket(PF_PACKET, SOCK_DGRAM, htons(ETH_P_IP));
|
||||
int s = socket(PF_PACKET, SOCK_DGRAM, 0);
|
||||
if (s < 0) return fatal("socket(PF_PACKET)");
|
||||
|
||||
struct sockaddr_ll bindaddr = {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue