libtins
libtins copied to clipboard
EthernetII src_addr getting overridden
Consider the following example program:
#include <tins/tins.h>
int main()
{
Tins::PacketSender sender;
Tins::EthernetII("d4:61:9d:36:c4:68", "70:81:eb:24:52:b7").send(sender, "en0");
return 0;
}
It simply sends out an empty EthernetII packet which should originate from 70:81:eb:24:52:b7. But apparently the source is overridden at send-time and set to this device's MAC (as shown in the screenshot below). Is this intended behaviour, and is it circumventable?

If it matters, I'm running macOS Mojave (10.14.5). Thanks in advance