/*
- * Copyright (c) 2017 Cisco and/or its affiliates.
+ * Copyright (c) 2017-2019 Cisco and/or its affiliates.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at:
#include <vnet/udp/udp_encap.h>
#include <vnet/fib/fib_entry.h>
+#include <vnet/fib/fib_entry_track.h>
#include <vnet/fib/fib_table.h>
#include <vnet/dpo/drop_dpo.h>
.fp_addr = *dst_ip,
};
- ue->ue_fib_entry_index =
- fib_table_entry_special_add (fib_index,
- &dst_pfx,
- FIB_SOURCE_RR, FIB_ENTRY_FLAG_NONE);
- ue->ue_fib_sibling =
- fib_entry_child_add (ue->ue_fib_entry_index,
- FIB_NODE_TYPE_UDP_ENCAP, uei);
-
+ ue->ue_fib_entry_index = fib_entry_track (fib_index,
+ &dst_pfx,
+ FIB_NODE_TYPE_UDP_ENCAP,
+ uei, &ue->ue_fib_sibling);
udp_encap_restack (ue);
return (uei);
ue = udp_encap_get (uei);
// FIXME
- s = format (s, "udp-ecap:[%d]: ip-fib-index:%d ", uei, ue->ue_fib_index);
+ s = format (s, "udp-encap:[%d]: ip-fib-index:%d ", uei, ue->ue_fib_index);
if (FIB_PROTOCOL_IP4 == ue->ue_ip_proto)
{
s = format (s, "ip:[src:%U, dst:%U] udp:[src:%d, dst:%d]",
*/
dpo_reset (&ue->ue_dpo);
- fib_entry_child_remove (ue->ue_fib_entry_index, ue->ue_fib_sibling);
- fib_table_entry_delete_index (ue->ue_fib_entry_index, FIB_SOURCE_RR);
-
+ fib_entry_untrack (ue->ue_fib_entry_index, ue->ue_fib_sibling);
pool_put (udp_encap_pool, ue);
}