tylertreat / comcast

Simulating shitty network connections so you can build better systems.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Probablistically dropping outbound traffic is a poor simulation of packet loss.

kportertx opened this issue · comments

The kernel sends the client an eperm when tc or iptables drops a packet. In real packet loss, the client wouldn't be made immediately aware that the packet didn't reach its destination. The process I'm testing responds to eperm by closing down the socket and trying again on a new socket.

See https://www.spinics.net/lists/netfilter/msg42592.html.

I worked around this by rerouting the packet to a port, 9999, which hopefully isn't used - this solution probably isn't ideal here.

That said, if the intention is to run these scripts on a machine acting as a router then this isn't an issue.