1. 09 Jul, 2020 2 commits
    • 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 21 commits