This is the mail archive of the
ecos-patches@sourceware.org
mailing list for the eCos project.
[Bug 1001656] FreeBSD: add AF_PACKET socket familiy
- From: bugzilla-daemon at bugs dot ecos dot sourceware dot org
- To: ecos-patches at ecos dot sourceware dot org
- Date: Fri, 06 Dec 2013 15:37:38 +0000
- Subject: [Bug 1001656] FreeBSD: add AF_PACKET socket familiy
- Authentication-results: sourceware.org; auth=none
- Auto-submitted: auto-generated
- References: <bug-1001656-104 at http dot bugs dot ecos dot sourceware dot org/>
Please do not reply to this email, use the link below.
http://bugs.ecos.sourceware.org/show_bug.cgi?id=1001656
--- Comment #12 from Bernd Edlinger <bernd.edlinger@hotmail.de> ---
Hi,
thanks for reporting this.
I had not done much testing in the IPv6 area.
The issue with the bind is, that
sockaddr sa1=*sa;
copies exacly 32 bytes. So all sockaddr_xx structures should
have at least 32 bytes, otherwise we get access beyound the end
at this point.
I had not seen that sockaddr_in6 is shorter than sockaddr.
that looks wrong indeed.
I'd suggest you try to make sockaddr 4 bytes larger
struct sockaddr_in6 {
u_int8_t sin6_len; /* length of this struct(sa_family_t)*/
u_int8_t sin6_family; /* AF_INET6 (sa_family_t) */
u_int16_t sin6_port; /* Transport layer port # (in_port_t)*/
u_int32_t sin6_flowinfo; /* IP6 flow information */
struct in6_addr sin6_addr; /* IP6 address */
u_int32_t sin6_scope_id; /* scope zone index */
char sin6_zero[4]; /* padding */
};
does this work?
--
You are receiving this mail because:
You are on the CC list for the bug.