Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/tx_afpacket.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ int tx_init(tx_ctx_t *tx, const char *out_iface) {
close(fd);
return -1;
}
memcpy(tx->eth_addr, ifr.ifr_hwaddr.sa_data, 6);

/* Get IPv4 address of the interface */
memset(&ifr, 0, sizeof(ifr));
Expand All @@ -53,7 +54,6 @@ int tx_init(tx_ctx_t *tx, const char *out_iface) {

tx->sock_fd = fd;
tx->ifindex = ifindex;
memcpy(tx->eth_addr, ifr.ifr_hwaddr.sa_data, 6);
return 0;
}

Expand Down