ipsec: make pre-shared keys harder to misuse
[vpp.git] / src / vnet / vxlan-gpe / vxlan_gpe.c
index 8ef94d4..5919e0f 100644 (file)
@@ -544,7 +544,7 @@ int vnet_vxlan_gpe_add_del_tunnel
          vnet_interface_main_t *im = &vnm->interface_main;
          hw_if_index = ngm->free_vxlan_gpe_tunnel_hw_if_indices
            [vec_len (ngm->free_vxlan_gpe_tunnel_hw_if_indices) - 1];
-         _vec_len (ngm->free_vxlan_gpe_tunnel_hw_if_indices) -= 1;
+         vec_dec_len (ngm->free_vxlan_gpe_tunnel_hw_if_indices, 1);
 
          hi = vnet_get_hw_interface (vnm, hw_if_index);
          hi->dev_instance = t - ngm->tunnels;
@@ -594,7 +594,8 @@ int vnet_vxlan_gpe_add_del_tunnel
       fib_prefix_t tun_remote_pfx;
       vnet_flood_class_t flood_class = VNET_FLOOD_CLASS_TUNNEL_NORMAL;
 
-      fib_prefix_from_ip46_addr (&t->remote, &tun_remote_pfx);
+      fib_protocol_t fp = fib_ip_proto (is_ip6);
+      fib_prefix_from_ip46_addr (fp, &t->remote, &tun_remote_pfx);
       if (!ip46_address_is_multicast (&t->remote))
        {
          /* Unicast tunnel -
@@ -618,8 +619,6 @@ int vnet_vxlan_gpe_add_del_tunnel
           * with different VNIs, create the output fib adjacency only if
           * it does not already exist
           */
-         fib_protocol_t fp = fib_ip_proto (is_ip6);
-
          if (vtep_addr_ref (&ngm->vtep_table,
                             t->encap_fib_index, &t->remote) == 1)
            {