Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Forms a proper multicast MAC address for multicast IP. #413

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

wladwm
Copy link

@wladwm wladwm commented Apr 21, 2021

No description provided.

memcpy(&cMac[3],dip+1,3);
cMac[3]&=0x7f;
EtherCard::copyMac(gPB + ETH_DST_MAC, cMac);
} else
// see http://tldp.org/HOWTO/Multicast-HOWTO-2.html
// multicast or broadcast address, https://github.com/njh/EtherCard/issues/59
if ((dip[0] & 0xF0) == 0xE0 || *((unsigned long*) dip) == 0xFFFFFFFF || !memcmp(broadcastip,dip,IP_LEN))
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't this a duplicate if statement condition?

@wladwm
Copy link
Author

wladwm commented Apr 21, 2021 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants