ikev2: fix l2 interface 56/25956/3
authorFilip Tehlar <ftehlar@cisco.com>
Tue, 17 Mar 2020 15:26:06 +0000 (15:26 +0000)
committerDamjan Marion <dmarion@me.com>
Sat, 21 Mar 2020 12:08:29 +0000 (12:08 +0000)
Type: fix

Change-Id: Ic6457da31846721e334f144f15d404575eeb73e5
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
src/plugins/ikev2/ikev2.c

index ea99e37..bdc234a 100644 (file)
@@ -1616,9 +1616,11 @@ ikev2_create_tunnel_interface (vnet_main_t * vnm,
     }
 
   a.flags = IPSEC_SA_FLAG_USE_ANTI_REPLAY;
-  a.flags |= IPSEC_SA_FLAG_IS_TUNNEL;
   if (sa->udp_encap)
-    a.flags |= IPSEC_SA_FLAG_UDP_ENCAP;
+    {
+      a.flags |= IPSEC_SA_FLAG_IS_TUNNEL;
+      a.flags |= IPSEC_SA_FLAG_UDP_ENCAP;
+    }
   a.is_rekey = is_rekey;
 
   tr = ikev2_sa_get_td_for_type (proposals, IKEV2_TRANSFORM_TYPE_ESN);