Dec-14-2022, 07:37 AM
Hello,
I have created a dummy network device (command: ip link add mydevice type dummy). I'm sending and receiving packets there.
For some reason I receive my own packet which I have sent.
If I bind the same code to another physical network card, there is no echo. Any suggestions please?
Thanks,
I
SENDER:
with socket.socket(socket.AF_PACKET, socket.SOCK_RAW) as rs:
rs.bind(("mydevice", ETH_P_ALL))
sendbytes = rs.send(bpdu)
RECEIVER:
rs.bind(("mydevice", ETH_P_ALL))
buffer=rs.recvfrom(BUFFER_SIZE)[0].hex()
I have created a dummy network device (command: ip link add mydevice type dummy). I'm sending and receiving packets there.
For some reason I receive my own packet which I have sent.
If I bind the same code to another physical network card, there is no echo. Any suggestions please?
Thanks,
I
SENDER:
with socket.socket(socket.AF_PACKET, socket.SOCK_RAW) as rs:
rs.bind(("mydevice", ETH_P_ALL))
sendbytes = rs.send(bpdu)
RECEIVER:
rs.bind(("mydevice", ETH_P_ALL))
buffer=rs.recvfrom(BUFFER_SIZE)[0].hex()