mahatma-kaganovich / honeyd

Automatically exported from code.google.com/p/honeyd
0 stars 0 forks source link

ETH_HDR_LEN in arp_recv_cb #7

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
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 commented 8 years ago
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 commented 8 years ago
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: