Git Product home page Git Product logo

Comments (8)

mdlayher avatar mdlayher commented on August 21, 2024

Neat. I'm good with that. Mind sending a PR?

from arp.

mdlayher avatar mdlayher commented on August 21, 2024

Actually, why would that check cause an issue? The surrounding code just checks for MAC addresses of at least length 6.

from arp.

jcatana avatar jcatana commented on August 21, 2024

Yeah, that is fine, but the if len(srcHW) != len(dstHW) fails it . My source is 12 and dst is 6

from arp.

mdlayher avatar mdlayher commented on August 21, 2024

Apologies, I haven't ever tried that. How does that work? I'd expect that you'd be ARPing to another IPoIB device on the other side that also has a 12 byte address.

The ARP packet allocates enough space for the length of the source address at the moment, so the 6 empty bytes on the destination are just ignored?

I'm happy to loosen the restriction, I'd just like to understand what's going on here. If you have some links, that'd be helpful.

from arp.

mdlayher avatar mdlayher commented on August 21, 2024

In addition, this RFC seems to indicate both addresses would be 20 bytes: https://tools.ietf.org/html/rfc4391#section-9.2.

from arp.

jcatana avatar jcatana commented on August 21, 2024

Maybe it's upstream for you in "net" because I think that's how you are getting MAC address.
How can I help debug this and see what is being compared at that point? Just add fmt module and print it out? I've tried but I'm fairly bad at go.

from arp.

dacrystal avatar dacrystal commented on August 21, 2024

From MetalLB:
https://github.com/danderson/metallb/blob/30e6f68bade331367ddb3a772593d137af21e4d8/internal/layer2/arp.go#L52

pkt, err := arp.NewPacket(op, a.hardwareAddr, ip, ethernet.Broadcast, ip)

As from the above, it use ethernet.Broadcast as dstHW (Gratuitous ARP). And that's why it always fail for IP over Infiniband( 20bytes)

I belief removing the check would resolve the issue or check for destHW is not equal to ethernet.Broadcast too.

EDIT: MetalLB in L2 mode uses gratuitous ARP.

from arp.

mdlayher avatar mdlayher commented on August 21, 2024

Let me know if this is all set now, thanks!

from arp.

Related Issues (14)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.