Comments (8)
Neat. I'm good with that. Mind sending a PR?
from arp.
Actually, why would that check cause an issue? The surrounding code just checks for MAC addresses of at least length 6.
from arp.
Yeah, that is fine, but the if len(srcHW) != len(dstHW)
fails it . My source is 12 and dst is 6
from arp.
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.
In addition, this RFC seems to indicate both addresses would be 20 bytes: https://tools.ietf.org/html/rfc4391#section-9.2.
from arp.
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.
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.
Let me know if this is all set now, thanks!
from arp.
Related Issues (14)
- Windows Support? HOT 5
- How is SetDeadline supposed to work? HOT 8
- Linux (docker and raspberry pi): Resolve() not returning HOT 2
- raw.ProtocolARP no longer exists
- go generate produces error HOT 2
- Suggestion: Continuous Fuzzing
- WriteTo doesn't respect destination hardware address
- I need example to learn your code, Have you time? please, i need it~ HOT 1
- Suggestion: provide a New...() for mock/fake client
- Indirect dependency library `golang.org/x/textv0.3.0` has a security issue
- Not implemented on Windows HOT 1
- No matching arp response on MacOS
- Operation not permitted HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from arp.