diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2020-02-18 08:30:00 +0100 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2020-02-18 10:31:02 +0100 |
| commit | b97f1e694a1c096eac2f48c6e3ca47e8a3c4693c (patch) | |
| tree | 9bfcd027798b3ff86edb380cefa8edb77c2db099 /executor/common_linux.h | |
| parent | 1ce142dcc7e25341405592c66bcb7cb0d60d2b3a (diff) | |
sys/linux: add broadcast mac address
Code in net/ethernet/eth.c does this:
__be16 eth_type_trans(struct sk_buff *skb, struct net_device *dev)
{
...
if (unlikely(!ether_addr_equal_64bits(eth->h_dest,
dev->dev_addr))) {
if (unlikely(is_multicast_ether_addr_64bits(eth->h_dest))) {
if (ether_addr_equal_64bits(eth->h_dest, dev->broadcast))
skb->pkt_type = PACKET_BROADCAST;
else
skb->pkt_type = PACKET_MULTICAST;
} else {
skb->pkt_type = PACKET_OTHERHOST;
}
}
Multicast and broadcast are distinct and dev->broadcast seems to be ffffffffffff
by default, so add another multicast mac address that will serve as PACKET_MULTICAST.
Diffstat (limited to 'executor/common_linux.h')
0 files changed, 0 insertions, 0 deletions
