8000 Wrong MAC when sending broadcast · Issue #59 · njh/EtherCard · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Wrong MAC when sending broadcast #59
Closed
@thefrip

Description

@thefrip

Hello,

When sending a broadcast packet (255.255.255.255) the recipient MAC remains to 00:00:00:00:00:00. If not wrong, it should be also set to the broadcast MAC (as for the WOL packets for instance).

I made the following fix in tcpip.cpp, function EtherCard::udpPrepare:

replaced
if ((dip[0] & 0xF0) == 0xE0) // multicast address

by
if ((dip[0] & 0xF0) == 0xE0 || *((long *) dip) == 0xFFFFFFFF) // multicast or broadcast address

Seems to work.

Rgds,

L.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0