• KOVACS Krisztian's avatar
    tcp: Port redirection support for TCP · a3116ac5
    KOVACS Krisztian authored
    Current TCP code relies on the local port of the listening socket
    being the same as the destination address of the incoming
    connection. Port redirection used by many transparent proxying
    techniques obviously breaks this, so we have to store the original
    destination port address.
    
    This patch extends struct inet_request_sock and stores the incoming
    destination port value there. It also modifies the handshake code to
    use that value as the source port when sending reply packets.
    Signed-off-by: default avatarKOVACS Krisztian <hidden@sch.bme.hu>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    a3116ac5
syncookies.c 9.99 KB