Skip to content
  • Daniel P. Berrangé's avatar
    046f98d0
    block: pass desired TLS hostname through from block driver client · 046f98d0
    Daniel P. Berrangé authored
    
    
    In
    
      commit a71d597b
      Author: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
      Date:   Thu Jun 10 13:08:00 2021 +0300
    
        block/nbd: reuse nbd_co_do_establish_connection() in nbd_open()
    
    the use of the 'hostname' field from the BDRVNBDState struct was
    lost, and 'nbd_connect' just hardcoded it to match the IP socket
    address. This was a harmless bug at the time since we block use
    with anything other than IP sockets.
    
    Shortly though, we want to allow the caller to override the hostname
    used in the TLS certificate checks. This is to allow for TLS
    when doing port forwarding or tunneling. Thus we need to reinstate
    the passing along of the 'hostname'.
    
    Reviewed-by: default avatarEric Blake <eblake@redhat.com>
    Signed-off-by: default avatarDaniel P. Berrangé <berrange@redhat.com>
    Message-Id: <20220304193610.3293146-3-berrange@redhat.com>
    Signed-off-by: default avatarEric Blake <eblake@redhat.com>
    046f98d0
    block: pass desired TLS hostname through from block driver client
    Daniel P. Berrangé authored
    
    
    In
    
      commit a71d597b
      Author: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
      Date:   Thu Jun 10 13:08:00 2021 +0300
    
        block/nbd: reuse nbd_co_do_establish_connection() in nbd_open()
    
    the use of the 'hostname' field from the BDRVNBDState struct was
    lost, and 'nbd_connect' just hardcoded it to match the IP socket
    address. This was a harmless bug at the time since we block use
    with anything other than IP sockets.
    
    Shortly though, we want to allow the caller to override the hostname
    used in the TLS certificate checks. This is to allow for TLS
    when doing port forwarding or tunneling. Thus we need to reinstate
    the passing along of the 'hostname'.
    
    Reviewed-by: default avatarEric Blake <eblake@redhat.com>
    Signed-off-by: default avatarDaniel P. Berrangé <berrange@redhat.com>
    Message-Id: <20220304193610.3293146-3-berrange@redhat.com>
    Signed-off-by: default avatarEric Blake <eblake@redhat.com>
Loading