• R
    RDS tcp loopback connection can hang · aced3ce5
    Rao Shoaib 提交于
    When TCP is used as transport and a program on the
    system connects to RDS port 16385, connection is
    accepted but denied per the rules of RDS. However,
    RDS connections object is left in the list. Next
    loopback connection will select that connection
    object as it is at the head of list. The connection
    attempt will hang as the connection object is set
    to connect over TCP which is not allowed
    
    The issue can be reproduced easily, use rds-ping
    to ping a local IP address. After that use any
    program like ncat to connect to the same IP
    address and port 16385. This will hang so ctrl-c out.
    Now try rds-ping, it will hang.
    
    To fix the issue this patch adds checks to disallow
    the connection object creation and destroys the
    connection object.
    Signed-off-by: NRao Shoaib <rao.shoaib@oracle.com>
    Signed-off-by: NDavid S. Miller <davem@davemloft.net>
    aced3ce5
connection.c 26.3 KB