mfontanini / libtins

High-level, multiplatform C++ network packet sniffing and crafting library.
http://libtins.github.io/
BSD 2-Clause "Simplified" License
1.91k stars 377 forks source link

EthernetII src_addr getting overridden #361

Open md5nake opened 5 years ago

md5nake commented 5 years ago

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?

Skärmavbild 2019-07-28 kl  20 46 28

md5nake commented 5 years ago

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