• Xin Long's avatar
    lwtunnel: add support for multiple geneve opts · 2f1d370b
    Xin Long authored
    geneve RFC (draft-ietf-nvo3-geneve-14) allows a geneve packet to carry
    multiple geneve opts, so it's necessary for lwtunnel to support adding
    multiple geneve opts in one lwtunnel route. But vxlan and erspan opts
    are still only allowed to add one option.
    
    With this patch, iproute2 could make it like:
    
      # ip r a 1.1.1.0/24 encap ip id 1 geneve_opts 0:0:12121212,1:2:12121212 \
        dst 10.1.0.2 dev geneve1
    
      # ip r a 1.1.1.0/24 encap ip id 1 vxlan_opts 456 \
        dst 10.1.0.2 dev erspan1
    
      # ip r a 1.1.1.0/24 encap ip id 1 erspan_opts 1:123:0:0 \
        dst 10.1.0.2 dev erspan1
    
    Which are pretty much like cls_flower and act_tunnel_key.
    Signed-off-by: default avatarXin Long <lucien.xin@gmail.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    2f1d370b
ip_tunnel_core.c 22.1 KB