mirror of
https://repo.or.cz/socat.git
synced 2025-07-13 07:03:25 +00:00
adapted conditionals to genericsocket, interface
This commit is contained in:
parent
674b0e608d
commit
084726e981
6 changed files with 39 additions and 6 deletions
|
@ -146,14 +146,14 @@ ssize_t xioread(xiofile_t *file, void *buff, size_t bufsiz) {
|
|||
}
|
||||
/* on packet type we also receive outgoing packets, this is not desired
|
||||
*/
|
||||
#ifdef PF_PACKET
|
||||
#if defined(PF_PACKET) && defined(PACKET_OUTGOING)
|
||||
if (from.soa.sa_family == PF_PACKET) {
|
||||
if ((((struct sockaddr_ll *)&from.soa)->sll_pkttype & PACKET_OUTGOING)
|
||||
== 0) {
|
||||
errno = EAGAIN; return -1;
|
||||
}
|
||||
}
|
||||
#endif /* PF_PACKET */
|
||||
#endif /* defined(PF_PACKET) && defined(PACKET_OUTGOING) */
|
||||
|
||||
Notice2("received packet with "F_Zu" bytes from %s",
|
||||
bytes,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue