1. Jan 12, 2023
  2. Jan 11, 2023
  3. Jan 10, 2023
  4. Jan 09, 2023
    • Mirsad Goran Todorovac's avatar
      af_unix: selftest: Fix the size of the parameter to connect() · 7d6ceeb1
      Mirsad Goran Todorovac authored
      
      
      Adjust size parameter in connect() to match the type of the parameter, to
      fix "No such file or directory" error in selftests/net/af_unix/
      test_oob_unix.c:127.
      
      The existing code happens to work provided that the autogenerated pathname
      is shorter than sizeof (struct sockaddr), which is why it hasn't been
      noticed earlier.
      
      Visible from the trace excerpt:
      
      bind(3, {sa_family=AF_UNIX, sun_path="unix_oob_453059"}, 110) = 0
      clone(child_stack=NULL, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x7fa6a6577a10) = 453060
      [pid <child>] connect(6, {sa_family=AF_UNIX, sun_path="unix_oob_45305"}, 16) = -1 ENOENT (No such file or directory)
      
      BUG: The filename is trimmed to sizeof (struct sockaddr).
      
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Eric Dumazet <edumazet@google.com>
      Cc: Jakub Kicinski <kuba@kernel.org>
      Cc: Paolo Abeni <pabeni@redhat.com>
      Cc: Shuah Khan <shuah@kernel.org>
      Cc: Kuniyuki Iwashima <kuniyu@amazon.co.jp>
      Cc: Florian Westphal <fw@strlen.de>
      Reviewed-by: default avatarFlorian Westphal <fw@strlen.de>
      Fixes: 314001f0
      
       ("af_unix: Add OOB support")
      Signed-off-by: default avatarMirsad Goran Todorovac <mirsad.todorovac@alu.unizg.hr>
      Reviewed-by: default avatarKuniyuki Iwashima <kuniyu@amazon.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      7d6ceeb1
    • Horatiu Vultur's avatar
      net: lan966x: Allow to add rules in TCAM even if not enabled · 76761bab
      Horatiu Vultur authored
      The blamed commit implemented the vcap_operations to allow to add an
      entry in the TCAM. One of the callbacks is to validate the supported
      keysets. If the TCAM lookup was not enabled, then this will return
      failure so no entries could be added.
      This doesn't make much sense, as you can enable at a later point the
      TCAM. Therefore change it such to allow entries in TCAM even it is not
      enabled.
      
      Fixes: 4426b78c
      
       ("net: lan966x: Add port keyset config and callback interface")
      Signed-off-by: default avatarHoratiu Vultur <horatiu.vultur@microchip.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      76761bab