Skip to content
  • Jones Syue's avatar
    interface: fix if_index is not parsed correctly · 6cadb55d
    Jones Syue authored
    Replace probed_ifaces[i] with ifs.
    
    In SDC 2020 SMB3 Virtual IO Lab,
    run Windows Protocol Test Suite to test FileServer multichannel test cases.
    Samba server has 2 virtual interfaces for VPN connection:
    > name=tun2001, ip/mask=192.168.144.9/22
    > name=tun2002, ip/mask=192.168.144.10/22
    test suite client can ping these 2 ip addresses and browse shares.
    Then client try to use IOCTL FSCTL_QUERY_NETWORK_INTERFACE_INFO to get the
    virtual ip addresses of samba server, but samba server responded it
    without the virtual ip addresses. My VPN setup is point-to-point and the
    virtual interfaces 'tun2001' & 'tun2002' are without flag IFF_BROADCAST.
    So edit smb.conf and add
    "interfaces = ${virtual_ip}/${mask_length};if_index=${id}", like this:
    > interfaces = eth4 eth8 eth11 eth10 qvs0 "192.168.144.9/22;if_index=50" "192.168.144.10/22;if_index=51"
    then samba server IOCTL response could return the virtual ip addresses,
    but found a issue:
    the interface index of virtual ip addresses is always 4294967295
    (0xFFFFFFFF, -1).
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=14514
    
    
    
    Signed-off-by: default avatarJones Syue <jonessyue@qnap.com>
    6cadb55d