1
0
Fork 0
mirror of https://repo.or.cz/socat.git synced 2025-07-20 09:52:56 +00:00

merged feature raw network interface

This commit is contained in:
Gerhard Rieger 2008-09-23 00:09:19 +02:00
commit 784e378ede
18 changed files with 293 additions and 25 deletions

View file

@ -144,6 +144,15 @@ ssize_t xioread(xiofile_t *file, void *buff, size_t bufsiz) {
errno = _errno;
return -1;
}
/* on packet type we also receive outgoing packets, this is not desired
*/
if (from.soa.sa_family == PF_PACKET) {
if ((((struct sockaddr_ll *)&from.soa)->sll_pkttype & PACKET_OUTGOING)
== 0) {
errno = EAGAIN; return -1;
}
}
Notice2("received packet with "F_Zu" bytes from %s",
bytes,
sockaddr_info(&from.soa, fromlen, infobuff, sizeof(infobuff)));