summaryrefslogtreecommitdiffstats
path: root/hicn-plugin/src/faces/udp/dpo_udp.c
diff options
context:
space:
mode:
authorAlberto Compagno <acompagn+fdio@cisco.com>2019-03-14 10:58:58 +0100
committerAlberto Compagno <acompagn+fdio@cisco.com>2019-03-14 11:42:21 +0100
commit3ae22de77996e7138107be9716545867210468db (patch)
tree1cff2b1820e430af0d0f48f5a7c6b7fa5bf8947a /hicn-plugin/src/faces/udp/dpo_udp.c
parent982ef728639113069db6af0b7869afc457853a9b (diff)
[HICN-112] Fixed bug on dymanic udp face creation. Fixed visualization of udp faces with "hicn show" command
Change-Id: I8d2898427b19abc707ac7a0c2942576f81094ef9 Signed-off-by: Alberto Compagno <acompagn+fdio@cisco.com>
Diffstat (limited to 'hicn-plugin/src/faces/udp/dpo_udp.c')
-rw-r--r--hicn-plugin/src/faces/udp/dpo_udp.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/hicn-plugin/src/faces/udp/dpo_udp.c b/hicn-plugin/src/faces/udp/dpo_udp.c
index eadcb6abd..987d52bb7 100644
--- a/hicn-plugin/src/faces/udp/dpo_udp.c
+++ b/hicn-plugin/src/faces/udp/dpo_udp.c
@@ -77,7 +77,8 @@ hicn_dpo_udp4_create (dpo_id_t * dpo,
{
u16 net_src_port = clib_host_to_net_u16 (src_port);
u16 net_dst_port = clib_host_to_net_u16 (dst_port);
- hicn_face_t *face = hicn_face_udp4_get (src_ip, dst_ip, src_port, dst_port);
+ hicn_face_t *face =
+ hicn_face_udp4_get (src_ip, dst_ip, net_src_port, net_dst_port);
u8 hicnb_flags;
/* ip_csum_t sum0; */
@@ -86,7 +87,7 @@ hicn_dpo_udp4_create (dpo_id_t * dpo,
return HICN_ERROR_FACE_ALREADY_CREATED;
hicn_dpo_udp4_add_and_lock (dpo, src_ip, dst_ip, net_src_port, net_dst_port,
- node_index, &hicnb_flags);
+ node_index, &hicnb_flags, sw_if);
face = hicn_dpoi_get_from_idx (dpo->dpoi_index);
@@ -97,7 +98,6 @@ hicn_dpo_udp4_create (dpo_id_t * dpo,
face->shared.flags = flags;
face->shared.adj = ip_adj;
- face->shared.sw_if = sw_if;
*face_id = hicn_dpoi_get_index (face);
return HICN_ERROR_NONE;
@@ -124,13 +124,12 @@ hicn_dpo_udp6_create (dpo_id_t * dpo,
return HICN_ERROR_FACE_ALREADY_CREATED;
hicn_dpo_udp6_add_and_lock (dpo, src_ip, dst_ip, net_src_port, net_dst_port,
- node_index, &hicnb_flags);
+ node_index, &hicnb_flags, sw_if);
face = hicn_dpoi_get_from_idx (dpo->dpoi_index);
face->shared.flags = flags;
face->shared.adj = ip_adj;
- face->shared.sw_if = sw_if;
*face_id = hicn_dpoi_get_index (face);
return HICN_ERROR_NONE;