X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fvnet%2Fipsec%2Fipsec_if.c;h=7d6c725e5397a8f94a349bf6e84dafbef3868811;hb=1e3aa5e213c23588981ee17d1413a0441a40527a;hp=304c52eac7c10b139fed83292488df1916608f9d;hpb=25edf14369b27ab3dfcda14b69dc53148c9ccf7e;p=vpp.git diff --git a/src/vnet/ipsec/ipsec_if.c b/src/vnet/ipsec/ipsec_if.c index 304c52eac7c..7d6c725e539 100644 --- a/src/vnet/ipsec/ipsec_if.c +++ b/src/vnet/ipsec/ipsec_if.c @@ -69,11 +69,15 @@ ipsec_if_tunnel_stack (adj_index_t ai) sa = ipsec_sa_get (it->output_sa_index); + /* *INDENT-OFF* */ fib_prefix_t pfx = { .fp_addr = sa->tunnel_dst_addr, - .fp_len = (sa->is_tunnel_ip6 ? 128 : 32), - .fp_proto = (sa->is_tunnel_ip6 ? FIB_PROTOCOL_IP6 : FIB_PROTOCOL_IP4), + .fp_len = (ipsec_sa_is_set_IS_TUNNEL_V6(sa) ? 128 : 32), + .fp_proto = (ipsec_sa_is_set_IS_TUNNEL_V6(sa) ? + FIB_PROTOCOL_IP6 : + FIB_PROTOCOL_IP4), }; + /* *INDENT-ON* */ adj_midchain_delegate_stack (ai, sa->tx_fib_index, &pfx); } @@ -286,7 +290,7 @@ ipsec_add_del_tunnel_if_internal (vnet_main_t * vnm, if (args->udp_encap) flags |= IPSEC_SA_FLAG_UDP_ENCAP; if (args->esn) - flags |= IPSEC_SA_FLAG_USE_EXTENDED_SEQ_NUM; + flags |= IPSEC_SA_FLAG_USE_ESN; if (args->anti_replay) flags |= IPSEC_SA_FLAG_USE_ANTI_REPLAY;