mirror of
https://repo.or.cz/socat.git
synced 2025-07-14 23:33:23 +00:00
added struct sockaddr_ll to union sockaddr_union to avoid "strict aliasing"
This commit is contained in:
parent
30a3ec3baa
commit
a8a8626c2f
5 changed files with 15 additions and 8 deletions
|
@ -1,5 +1,5 @@
|
|||
/* source: xioread.c */
|
||||
/* Copyright Gerhard Rieger 2001-2009 */
|
||||
/* Copyright Gerhard Rieger 2001-2010 */
|
||||
/* Published under the GNU General Public License V.2, see file COPYING */
|
||||
|
||||
/* this is the source of the extended read function */
|
||||
|
@ -148,7 +148,7 @@ ssize_t xioread(xiofile_t *file, void *buff, size_t bufsiz) {
|
|||
*/
|
||||
#if defined(PF_PACKET) && defined(PACKET_OUTGOING)
|
||||
if (from.soa.sa_family == PF_PACKET) {
|
||||
if ((((struct sockaddr_ll *)&from.soa)->sll_pkttype & PACKET_OUTGOING)
|
||||
if ((from.ll.sll_pkttype & PACKET_OUTGOING)
|
||||
== 0) {
|
||||
errno = EAGAIN; return -1;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue