This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: RE : Possible fix for duplicated ARP entries in the FreeBSDstack


Arnaud Chataignier wrote:
Thank you all for the analysis. I was encountering this bug from a long
time now, and fixing it is great news for me.

One person did post a temporary patch to this problem a long time ago,
but it didn't seem to really correct the cause of the problem, it was
just avoiding it :
http://sourceware.org/ml/ecos-discuss/2004-11/msg00150.html

May anyone post a patch corresponding to this real correction ? As far
as I understand, it is only a matter of changing the size of the sa_data
member back to 14 ?

No, the increase in size of the sa_data member was apparently needed for IPv6. The fix is as I stated first: the sockaddr_inarp struct must be padded to match the size of the sockaddr struct. This can be done by adding a sin_zero member at the end of this struct, defined in include/netinet/if_ether.h. Like this:


struct sockaddr_inarp {
  u_char  sin_len;
  u_char  sin_family;
  u_short sin_port;
  struct  in_addr sin_addr;
  struct  in_addr sin_srcaddr;
  u_short sin_tos;
  u_short sin_other;
  char    sin_zero[16];
#define SIN_PROXY 1
};

Regards,
SM

--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]