1. 13 May, 2024 10 commits
  2. 11 May, 2024 28 commits
  3. 10 May, 2024 2 commits
    • David S. Miller's avatar
      Merge tag 'gtp-24-05-07' of git://git.kernel.org/pub/scm/linux/kernel/git/pablo/gtp · f8beae07
      David S. Miller authored
      Pablo neira Ayuso says:
      
      ====================
      gtp pull request 24-05-07
      
      This v3 includes:
      - fix for clang uninitialized variable per Jakub.
      - address Smatch and Coccinelle reports per Simon
      - remove inline in new IPv6 support per Simon
      - fix memleaks in netlink control plane per Simon
      -o-
      
      The following patchset contains IPv6 GTP driver support for net-next,
      this also includes IPv6 over IPv4 and vice-versa:
      
      Patch #1 removes a unnecessary stack variable initialization in the
               socket routine.
      
      Patch #2 deals with GTP extension headers. This variable length extension
               header to decapsulate packets accordingly. Otherwise, packets are
               dropped when these extension headers are present which breaks
               interoperation with other non-Linux based GTP implementations.
      
      Patch #3 prepares for IPv6 support by moving IPv4 specific fields in PDP
               context objects to a union.
      
      Patch #4 adds IPv6 support while retaining backward compatibility.
               Three new attributes allows to declare an IPv6 GTP tunnel
               GTPA_FAMILY, GTPA_PEER_ADDR6 and GTPA_MS_ADDR6 as well as
               IFLA_GTP_LOCAL6 to declare the IPv6 GTP UDP socket. Up to this
               patch, only IPv6 outer in IPv6 inner is supported.
      
      Patch #5 uses IPv6 address /64 prefix for UE/MS in the inner headers.
               Unlike IPv4, which provides a 1:1 mapping between UE/MS,
               IPv6 tunnel encapsulates traffic for /64 address as specified
               by 3GPP TS. Patch has been split from Patch #4 to highlight
               this behaviour.
      
      Patch #6 passes up IPv6 link-local traffic, such as IPv6 SLAAC, for
               handling to userspace so they are handled as control packets.
      
      Patch #7 prepares to allow for GTP IPv4 over IPv6 and vice-versa by
               moving IP specific debugging out of the function to build
               IPv4 and IPv6 GTP packets.
      
      Patch #8 generalizes TOS/DSCP handling following similar approach as
               in the existing iptunnel infrastructure.
      
      Patch #9 adds a helper function to build an IPv4 GTP packet in the outer
               header.
      
      Patch #10 adds a helper function to build an IPv6 GTP packet in the outer
                header.
      
      Patch #11 adds support for GTP IPv4-over-IPv6 and vice-versa.
      
      Patch #12 allows to use the same TID/TEID (tunnel identifier) for inner
                IPv4 and IPv6 packets for better UE/MS dual stack integration.
      
      This series integrates with the osmocom.org project CI and TTCN-3 test
      infrastructure (Oliver Smith) as well as the userspace libgtpnl library.
      
      Thanks to Harald Welte, Oliver Smith and Pau Espin for reviewing and
      providing feedback through the osmocom.org redmine platform to make this
      happen.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      f8beae07
    • Florian Westphal's avatar
      netfilter: nf_tables: allow clone callbacks to sleep · fa23e0d4
      Florian Westphal authored
      Sven Auhagen reports transaction failures with following error:
        ./main.nft:13:1-26: Error: Could not process rule: Cannot allocate memory
        percpu: allocation failed, size=16 align=8 atomic=1, atomic alloc failed, no space left
      
      This points to failing pcpu allocation with GFP_ATOMIC flag.
      However, transactions happen from user context and are allowed to sleep.
      
      One case where we can call into percpu allocator with GFP_ATOMIC is
      nft_counter expression.
      
      Normally this happens from control plane, so this could use GFP_KERNEL
      instead.  But one use case, element insertion from packet path,
      needs to use GFP_ATOMIC allocations (nft_dynset expression).
      
      At this time, .clone callbacks always use GFP_ATOMIC for this reason.
      
      Add gfp_t argument to the .clone function and pass GFP_KERNEL or
      GFP_ATOMIC flag depending on context, this allows all clone memory
      allocations to sleep for the normal (transaction) case.
      
      Cc: Sven Auhagen <sven.auhagen@voleatech.de>
      Signed-off-by: default avatarFlorian Westphal <fw@strlen.de>
      Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
      fa23e0d4