Code Review
/
vpp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
gtpu: use explicit types in api
[vpp.git]
/
src
/
plugins
/
gtpu
/
gtpu.c
diff --git
a/src/plugins/gtpu/gtpu.c
b/src/plugins/gtpu/gtpu.c
index
7612055
..
8a1610c
100644
(file)
--- a/
src/plugins/gtpu/gtpu.c
+++ b/
src/plugins/gtpu/gtpu.c
@@
-379,7
+379,7
@@
int vnet_gtpu_add_del_tunnel
u32 sw_if_index = ~0;
gtpu4_tunnel_key_t key4;
gtpu6_tunnel_key_t key6;
u32 sw_if_index = ~0;
gtpu4_tunnel_key_t key4;
gtpu6_tunnel_key_t key6;
-
u32 is_ip6 = a->is_ip6
;
+
bool is_ip6 = !ip46_address_is_ip4 (&a->dst)
;
if (!is_ip6)
{
if (!is_ip6)
{
@@
-520,8
+520,9
@@
int vnet_gtpu_add_del_tunnel
.frp_addr = zero_addr,
.frp_sw_if_index = 0xffffffff,
.frp_fib_index = ~0,
.frp_addr = zero_addr,
.frp_sw_if_index = 0xffffffff,
.frp_fib_index = ~0,
- .frp_weight =
0
,
+ .frp_weight =
1
,
.frp_flags = FIB_ROUTE_PATH_LOCAL,
.frp_flags = FIB_ROUTE_PATH_LOCAL,
+ .frp_mitf_flags = MFIB_ITF_FLAG_FORWARD,
};
const mfib_prefix_t mpfx = {
.fp_proto = fp,
};
const mfib_prefix_t mpfx = {
.fp_proto = fp,
@@
-535,17
+536,14
@@
int vnet_gtpu_add_del_tunnel
* - the accepting interface is that from the API
*/
mfib_table_entry_path_update (t->encap_fib_index,
* - the accepting interface is that from the API
*/
mfib_table_entry_path_update (t->encap_fib_index,
- &mpfx,
- MFIB_SOURCE_GTPU,
- &path, MFIB_ITF_FLAG_FORWARD);
+ &mpfx, MFIB_SOURCE_GTPU, &path);
path.frp_sw_if_index = a->mcast_sw_if_index;
path.frp_flags = FIB_ROUTE_PATH_FLAG_NONE;
path.frp_sw_if_index = a->mcast_sw_if_index;
path.frp_flags = FIB_ROUTE_PATH_FLAG_NONE;
+ path.frp_mitf_flags = MFIB_ITF_FLAG_ACCEPT;
mfei = mfib_table_entry_path_update (t->encap_fib_index,
&mpfx,
mfei = mfib_table_entry_path_update (t->encap_fib_index,
&mpfx,
- MFIB_SOURCE_GTPU,
- &path,
- MFIB_ITF_FLAG_ACCEPT);
+ MFIB_SOURCE_GTPU, &path);
/*
* Create the mcast adjacency to send traffic to the group
/*
* Create the mcast adjacency to send traffic to the group
@@
-822,7
+820,6
@@
gtpu_add_del_tunnel_command_fn (vlib_main_t * vm,
clib_memset (a, 0, sizeof (*a));
a->is_add = is_add;
clib_memset (a, 0, sizeof (*a));
a->is_add = is_add;
- a->is_ip6 = ipv6_set;
#define _(x) a->x = x;
foreach_copy_field;
#define _(x) a->x = x;
foreach_copy_field;