• Paulo Alcantara's avatar
    cifs: handle hostnames that resolve to same ip in failover · e4af35fa
    Paulo Alcantara authored
    In order to support reconnect to hostnames that resolve to same ip
    address, besides relying on the currently set hostname to match DFS
    targets, attempt to resolve the targets and then match their addresses
    with the reconnected server ip address.
    
    For instance, if we have two hostnames "FOO" and "BAR", and both
    resolve to the same ip address, we would be able to handle failover in
    DFS paths like
    
        \\FOO\dfs\link1 -> [ \BAZ\share2 (*), \BAR\share1 ]
        \\FOO\dfs\link2 -> [ \BAZ\share2 (*), \FOO\share1 ]
    
    so when "BAZ" is no longer accessible, link1 and link2 would get
    reconnected despite having different target hostnames.
    Signed-off-by: default avatarPaulo Alcantara (SUSE) <pc@cjr.nz>
    Reviewed-by: default avatarAurelien Aptel <aaptel@suse.com>
    Signed-off-by: default avatarSteve French <stfrench@microsoft.com>
    e4af35fa
smb2pdu.c 145 KB