1. 13 Jul, 2020 2 commits
  2. 10 Jul, 2020 1 commit
    • Steffen Klassert's avatar
      Merge remote-tracking branch 'origin/testing' · 2d4c7986
      Steffen Klassert authored
      Xin Long says:
      
      ==================
      Now ipip and ipv6 tunnels processing is supported by xfrm4/6_tunnel,
      but not in vti and xfrmi. This feature is needed by processing those
      uncompressed small fragments and packets when using comp protocol.
      It means vti and xfrmi won't be able to accept small fragments or
      packets when using comp protocol, which is not expected.
      
      xfrm4/6_tunnel eventually calls xfrm_input() to process ipip and ipv6
      tunnels with an ipip/ipv6-proto state (a child state of comp-proto
      state), and vti and xfrmi should do the same.
      
      The extra things for vti to do is:
      
        - vti_input() should be called before xfrm_input() to set
          XFRM_TUNNEL_SKB_CB(skb)->tunnel.ip4/6 = tunnel. [A]
      
        - vti_rcv_cb() should be called after xfrm_input() to update
          the skb->dev. [B]
      
      And the extra things for xfrmi to do is:
      
         - The ipip/ipv6-proto state should be assigned if_id from its
           parent's state. [C]
      
         - xfrmi_rcv_cb() should be called after xfrm_input() to update
           the skb->dev. [D]
      
      Patch 4-7 does the things in [A].
      
      To implement [B] and [D], patch 1-3 is to build a callback function
      for xfrm4/6_tunnel, which can be called after xfrm_input(), similar
      to xfrm4/6_protocol's .cb_handler. vti and xfrmi only needs to give
      their own callback function in patch 4-7 and 9-10, which already
      exists: vti_rcv_cb() and xfrmi_rcv_cb().
      
      Patch 8 is to do the thing in [C] by assigning child tunnel's if_id
      from its parent tunnel.
      
      With the whole patch series, the segments or packets with any size
      can work with ipsec comp proto on vti and xfrmi.
      
      v1->v2:
        - See Patch 2-3.
      v2->v3:
        - See Patch 2-3, 4, 6, 9-10.
      ==================
      Signed-off-by: default avatarSteffen Klassert <steffen.klassert@secunet.com>
      2d4c7986
  3. 09 Jul, 2020 10 commits
  4. 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
  5. 23 Jun, 2020 16 commits
  6. 22 Jun, 2020 10 commits