1. 17 Dec, 2023 3 commits
    • Dmitry Safonov's avatar
      selftests/net: Verify that TCP-AO complies with ignoring ICMPs · a8fcf8ca
      Dmitry Safonov authored
      Hand-crafted ICMP packets are sent to the server, the server checks for
      hard/soft errors and fails if any.
      
      Expected output for ipv4 version:
      > # ./icmps-discard_ipv4
      > 1..3
      > # 3164[lib/setup.c:166] rand seed 1642623745
      > TAP version 13
      > # 3164[lib/proc.c:207]    Snmp6             Ip6InReceives: 0 => 1
      > # 3164[lib/proc.c:207]    Snmp6             Ip6InNoRoutes: 0 => 1
      > # 3164[lib/proc.c:207]    Snmp6               Ip6InOctets: 0 => 76
      > # 3164[lib/proc.c:207]    Snmp6            Ip6InNoECTPkts: 0 => 1
      > # 3164[lib/proc.c:207]      Tcp                    InSegs: 2 => 203
      > # 3164[lib/proc.c:207]      Tcp                   OutSegs: 1 => 202
      > # 3164[lib/proc.c:207]  IcmpMsg                   InType3: 0 => 543
      > # 3164[lib/proc.c:207]     Icmp                    InMsgs: 0 => 543
      > # 3164[lib/proc.c:207]     Icmp            InDestUnreachs: 0 => 543
      > # 3164[lib/proc.c:207]       Ip                InReceives: 2 => 746
      > # 3164[lib/proc.c:207]       Ip                InDelivers: 2 => 746
      > # 3164[lib/proc.c:207]       Ip               OutRequests: 1 => 202
      > # 3164[lib/proc.c:207]    IpExt                  InOctets: 132 => 61684
      > # 3164[lib/proc.c:207]    IpExt                 OutOctets: 68 => 31324
      > # 3164[lib/proc.c:207]    IpExt               InNoECTPkts: 2 => 744
      > # 3164[lib/proc.c:207]   TcpExt               TCPPureAcks: 1 => 2
      > # 3164[lib/proc.c:207]   TcpExt           TCPOrigDataSent: 0 => 200
      > # 3164[lib/proc.c:207]   TcpExt              TCPDelivered: 0 => 199
      > # 3164[lib/proc.c:207]   TcpExt                 TCPAOGood: 2 => 203
      > # 3164[lib/proc.c:207]   TcpExt         TCPAODroppedIcmps: 0 => 541
      > ok 1 InDestUnreachs delivered 543
      > ok 2 Server survived 20000 bytes of traffic
      > ok 3 ICMPs ignored 541
      > # Totals: pass:3 fail:0 xfail:0 xpass:0 skip:0 error:0
      
      Expected output for ipv6 version:
      > # ./icmps-discard_ipv6
      > 1..3
      > # 3186[lib/setup.c:166] rand seed 1642623803
      > TAP version 13
      > # 3186[lib/proc.c:207]    Snmp6             Ip6InReceives: 4 => 568
      > # 3186[lib/proc.c:207]    Snmp6             Ip6InDelivers: 3 => 564
      > # 3186[lib/proc.c:207]    Snmp6            Ip6OutRequests: 2 => 204
      > # 3186[lib/proc.c:207]    Snmp6            Ip6InMcastPkts: 1 => 4
      > # 3186[lib/proc.c:207]    Snmp6           Ip6OutMcastPkts: 0 => 1
      > # 3186[lib/proc.c:207]    Snmp6               Ip6InOctets: 320 => 70420
      > # 3186[lib/proc.c:207]    Snmp6              Ip6OutOctets: 160 => 35512
      > # 3186[lib/proc.c:207]    Snmp6          Ip6InMcastOctets: 72 => 336
      > # 3186[lib/proc.c:207]    Snmp6         Ip6OutMcastOctets: 0 => 76
      > # 3186[lib/proc.c:207]    Snmp6            Ip6InNoECTPkts: 4 => 568
      > # 3186[lib/proc.c:207]    Snmp6               Icmp6InMsgs: 1 => 361
      > # 3186[lib/proc.c:207]    Snmp6              Icmp6OutMsgs: 1 => 2
      > # 3186[lib/proc.c:207]    Snmp6       Icmp6InDestUnreachs: 0 => 360
      > # 3186[lib/proc.c:207]    Snmp6      Icmp6OutMLDv2Reports: 0 => 1
      > # 3186[lib/proc.c:207]    Snmp6              Icmp6InType1: 0 => 360
      > # 3186[lib/proc.c:207]    Snmp6           Icmp6OutType143: 0 => 1
      > # 3186[lib/proc.c:207]      Tcp                    InSegs: 2 => 203
      > # 3186[lib/proc.c:207]      Tcp                   OutSegs: 1 => 202
      > # 3186[lib/proc.c:207]   TcpExt               TCPPureAcks: 1 => 2
      > # 3186[lib/proc.c:207]   TcpExt           TCPOrigDataSent: 0 => 200
      > # 3186[lib/proc.c:207]   TcpExt              TCPDelivered: 0 => 199
      > # 3186[lib/proc.c:207]   TcpExt                 TCPAOGood: 2 => 203
      > # 3186[lib/proc.c:207]   TcpExt         TCPAODroppedIcmps: 0 => 360
      > ok 1 Icmp6InDestUnreachs delivered 360
      > ok 2 Server survived 20000 bytes of traffic
      > ok 3 ICMPs ignored 360
      > # Totals: pass:3 fail:0 xfail:0 xpass:0 skip:0 error:0
      Signed-off-by: default avatarDmitry Safonov <dima@arista.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a8fcf8ca
    • Dmitry Safonov's avatar
      selftests/net: Add TCP-AO library · cfbab37b
      Dmitry Safonov authored
      Provide functions to create selftests dedicated to TCP-AO.
      They can run in parallel, as they use temporary net namespaces.
      They can be very specific to the feature being tested.
      This will allow to create a lot of TCP-AO tests, without complicating
      one binary with many --options and to create scenarios, that are
      hard to put in bash script that uses one binary.
      Signed-off-by: default avatarDmitry Safonov <dima@arista.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      cfbab37b
    • Vladimir Oltean's avatar
      net: phylink: reimplement population of pl->supported for in-band · 37a8997f
      Vladimir Oltean authored
      phylink_parse_mode() populates all possible supported link modes for a
      given phy_interface_t, for the case where a phylib phy may be absent and
      we can't retrieve the supported link modes from that.
      
      Russell points out that since the introduction of the generic validation
      helpers phylink_get_capabilities() and phylink_caps_to_linkmodes(), we
      can rewrite this procedure to populate the pl->supported mask, so that
      instead of spelling out the link modes, we derive an intermediary
      mac_capabilities bit field, and we convert that to the equivalent link
      modes.
      Suggested-by: default avatarRussell King (Oracle) <linux@armlinux.org.uk>
      Signed-off-by: default avatarVladimir Oltean <vladimir.oltean@nxp.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      37a8997f
  2. 16 Dec, 2023 4 commits
  3. 15 Dec, 2023 33 commits