1. 09 Jul, 2020 4 commits
    • Xin Long's avatar
      ip_vti: support IPIP tunnel processing with .cb_handler · 87e66b96
      Xin Long authored
      With tunnel4_input_afinfo added, IPIP tunnel processing in
      ip_vti can be easily done with .cb_handler. So replace the
      processing by calling ip_tunnel_rcv() with it.
      
      v1->v2:
        - no change.
      v2-v3:
        - enable it only when CONFIG_INET_XFRM_TUNNEL is defined, to fix
          the build error, reported by kbuild test robot.
      Signed-off-by: default avatarXin Long <lucien.xin@gmail.com>
      Signed-off-by: default avatarSteffen Klassert <steffen.klassert@secunet.com>
      87e66b96
    • Xin Long's avatar
      tunnel6: add tunnel6_input_afinfo for ipip and ipv6 tunnels · 86afc703
      Xin Long authored
      This patch is to register a callback function tunnel6_rcv_cb with
      is_ipip set in a xfrm_input_afinfo object for tunnel6 and tunnel46.
      
      It will be called by xfrm_rcv_cb() from xfrm_input() when family
      is AF_INET6 and proto is IPPROTO_IPIP or IPPROTO_IPV6.
      
      v1->v2:
        - Fix a sparse warning caused by the missing "__rcu", as Jakub
          noticed.
        - Handle the err returned by xfrm_input_register_afinfo() in
          tunnel6_init/fini(), as Sabrina noticed.
      v2->v3:
        - Add "#if IS_ENABLED(CONFIG_INET6_XFRM_TUNNEL)" to fix the build error
          when xfrm is disabled, reported by kbuild test robot
      Signed-off-by: default avatarXin Long <lucien.xin@gmail.com>
      Signed-off-by: default avatarSteffen Klassert <steffen.klassert@secunet.com>
      86afc703
    • Xin Long's avatar
      tunnel4: add cb_handler to struct xfrm_tunnel · 6df2db5d
      Xin Long authored
      This patch is to register a callback function tunnel4_rcv_cb with
      is_ipip set in a xfrm_input_afinfo object for tunnel4 and tunnel64.
      
      It will be called by xfrm_rcv_cb() from xfrm_input() when family
      is AF_INET and proto is IPPROTO_IPIP or IPPROTO_IPV6.
      
      v1->v2:
        - Fix a sparse warning caused by the missing "__rcu", as Jakub
          noticed.
        - Handle the err returned by xfrm_input_register_afinfo() in
          tunnel4_init/fini(), as Sabrina noticed.
      v2->v3:
        - Add "#if IS_ENABLED(CONFIG_INET_XFRM_TUNNEL)" to fix the build error
          when xfrm is disabled, reported by kbuild test robot.
      Signed-off-by: default avatarXin Long <lucien.xin@gmail.com>
      Signed-off-by: default avatarSteffen Klassert <steffen.klassert@secunet.com>
      6df2db5d
    • Xin Long's avatar
      xfrm: add is_ipip to struct xfrm_input_afinfo · 1475ee0a
      Xin Long authored
      This patch is to add a new member is_ipip to struct xfrm_input_afinfo,
      to allow another group family of callback functions to be registered
      with is_ipip set.
      
      This will be used for doing a callback for struct xfrm(6)_tunnel of
      ipip/ipv6 tunnels in xfrm_input() by calling xfrm_rcv_cb(), which is
      needed by ipip/ipv6 tunnels' support in ip(6)_vti and xfrm interface
      in the next patches.
      Signed-off-by: default avatarXin Long <lucien.xin@gmail.com>
      Signed-off-by: default avatarSteffen Klassert <steffen.klassert@secunet.com>
      1475ee0a
  2. 24 Jun, 2020 1 commit
    • Petr Vaněk's avatar
      xfrm: introduce oseq-may-wrap flag · 428d2459
      Petr Vaněk authored
      RFC 4303 in section 3.3.3 suggests to disable anti-replay for manually
      distributed ICVs in which case the sender does not need to monitor or
      reset the counter. However, the sender still increments the counter and
      when it reaches the maximum value, the counter rolls over back to zero.
      
      This patch introduces new extra_flag XFRM_SA_XFLAG_OSEQ_MAY_WRAP which
      allows sequence number to cycle in outbound packets if set. This flag is
      used only in legacy and bmp code, because esn should not be negotiated
      if anti-replay is disabled (see note in 3.3.3 section).
      Signed-off-by: default avatarPetr Vaněk <pv@excello.cz>
      Acked-by: default avatarChristophe Gouault <christophe.gouault@6wind.com>
      Signed-off-by: default avatarSteffen Klassert <steffen.klassert@secunet.com>
      428d2459
  3. 23 Jun, 2020 16 commits
  4. 22 Jun, 2020 19 commits