netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Linux raw socket issue
@ 2017-02-14 10:44 Sriram V
  0 siblings, 0 replies; only message in thread
From: Sriram V @ 2017-02-14 10:44 UTC (permalink / raw)
  To: netdev

Hi,

Apologies if this is not the right mailing list.
I have 2 network interfaces eth0 and eth1. eth0 is the lan and eth1 is the wlan.

I have created a raw socket and bound to eth0 using the below call.

setsockopt(sockfd, SOL_SOCKET, SO_BINDTODEVICE, ifName, strlen(ifName) + 1

I am listening for raw ethernet packets on the eth0. I am getting
packets even if i have removed the
lan cable. I am not sure how the packets from eth1 and sent to eth0?

My program is https://gist.github.com/austinmarton/2862515

I am not sure if there is any IP forwarding causing the issue. There
is a procfs regarding ip forwarding
turning it off or on. does not make any different.


Thanks for your help.

Regards,
Sriram

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2017-02-14 10:44 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-02-14 10:44 Linux raw socket issue Sriram V

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).