Skip to content

Do not reset TCP connections when using a RawSocket #1068

@KingCol13

Description

@KingCol13

When the socket set only contains a raw socket, all TCP connections will be reset by the code here:

// The packet wasn't handled by a socket, send a TCP RST packet.
let (ip, tcp) = tcp::Socket::rst_reply(&ip_repr, &tcp_repr);

However, when using a raw socket which can accept TCP, this is unlikely to be desired behaviour.

This code should probably be modified to check if any raw sockets are able to accept the packet before deciding whether to send an RST.

I'm happy to have a go at fixing this, let me know if this sounds unreasonable.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions