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

ETH_HDR_LEN in arp_recv_cb #7

Open
GoogleCodeExporter opened this issue Apr 4, 2016 · 2 comments
Open

ETH_HDR_LEN in arp_recv_cb #7

GoogleCodeExporter opened this issue Apr 4, 2016 · 2 comments

Comments

@GoogleCodeExporter
Copy link

A suggestion is to change the instances of ETH_HDR_LEN in arp_recv_cb
to req->inter->if_dloff.

The offset for standard ethernet packets (DL_EN10MB link type) is 14
but when you set monitoring interface to "any" the offset becomes 16 as
the link type turns to DLT_LINUX_SLL. Thus
the decoding does not succeed as the line
arp = (struct arp_hdr *) (pkt+ETH_HDR_LEN); 
will yield to incorrect offset for arp header. 





Original issue reported on code.google.com by antona...@gmail.com on 12 Feb 2008 at 12:22

@GoogleCodeExporter
Copy link
Author

If I got it, we can change the instances in arp_send function at 
arp_pack_hdr_ethip too, for supporting the modularity and avoid from
bad assigns like you said.

Original comment by syigit...@gmail.com on 26 Feb 2009 at 9:00

@GoogleCodeExporter
Copy link
Author

Well, I changed something according to your suggestion and I looked to arp_send
function again. The patch is only for arp_recv_cb.

Original comment by syigit...@gmail.com on 5 Mar 2009 at 11:37

Attachments:

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

No branches or pull requests

1 participant