• Kuniyuki Iwashima's avatar
    selftest: tcp: Add v4-mapped-v6 cases in bind_wildcard.c. · 8637d8e8
    Kuniyuki Iwashima authored
    We add these 8 test cases in bind_wildcard.c to check bind() conflicts.
    
      1st bind()          2nd bind()
      ---------           ---------
      0.0.0.0             ::FFFF:0.0.0.0
      ::FFFF:0.0.0.0      0.0.0.0
      0.0.0.0             ::FFFF:127.0.0.1
      ::FFFF:127.0.0.1    0.0.0.0
      127.0.0.1           ::FFFF:0.0.0.0
      ::FFFF:0.0.0.0      127.0.0.1
      127.0.0.1           ::FFFF:127.0.0.1
      ::FFFF:127.0.0.1    127.0.0.1
    
    All test passed without bhash2 and with bhash2 and this series.
    
     Before bhash2:
      $ uname -r
      6.0.0-rc1-00393-g0bf73255
      $ ./bind_wildcard
      ...
      # PASSED: 16 / 16 tests passed.
    
     Just after bhash2:
      $ uname -r
      6.0.0-rc1-00394-g28044fc1
      $ ./bind_wildcard
      ...
      ok 15 bind_wildcard.v4_local_v6_v4mapped_local.v4_v6
      not ok 16 bind_wildcard.v4_local_v6_v4mapped_local.v6_v4
      # FAILED: 15 / 16 tests passed.
    
     On net.git:
      $ ./bind_wildcard
      ...
      not ok 14 bind_wildcard.v4_local_v6_v4mapped_any.v6_v4
      not ok 16 bind_wildcard.v4_local_v6_v4mapped_local.v6_v4
      # FAILED: 13 / 16 tests passed.
    
     With this series:
      $ ./bind_wildcard
      ...
      # PASSED: 16 / 16 tests passed.
    Signed-off-by: default avatarKuniyuki Iwashima <kuniyu@amazon.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    8637d8e8
bind_wildcard.c 3.36 KB