summaryrefslogtreecommitdiffstats
path: root/src/vnet/udp/udp.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/vnet/udp/udp.c')
-rw-r--r--src/vnet/udp/udp.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/src/vnet/udp/udp.c b/src/vnet/udp/udp.c
index 8fa1147b030..b069e720c7c 100644
--- a/src/vnet/udp/udp.c
+++ b/src/vnet/udp/udp.c
@@ -81,13 +81,14 @@ udp_session_bind (u32 session_index, transport_endpoint_t * lcl)
{
udp_main_t *um = vnet_get_udp_main ();
vlib_main_t *vm = vlib_get_main ();
+ transport_endpoint_cfg_t *lcl_ext;
udp_connection_t *listener;
+ udp_dst_port_info_t *pi;
u32 node_index;
void *iface_ip;
- udp_dst_port_info_t *pi;
- pi =
- udp_get_dst_port_info (um, clib_net_to_host_u16 (lcl->port), lcl->is_ip4);
+ pi = udp_get_dst_port_info (um, clib_net_to_host_u16 (lcl->port),
+ lcl->is_ip4);
if (pi)
return -1;
@@ -110,6 +111,11 @@ udp_session_bind (u32 session_index, transport_endpoint_t * lcl)
listener->c_s_index = session_index;
listener->c_fib_index = lcl->fib_index;
listener->flags |= UDP_CONN_F_OWNS_PORT;
+ lcl_ext = (transport_endpoint_cfg_t *) lcl;
+ if (lcl_ext->transport_flags & TRANSPORT_CFG_F_CONNECTED)
+ listener->flags |= UDP_CONN_F_CONNECTED;
+ else
+ listener->c_flags |= TRANSPORT_CONNECTION_F_CLESS;
clib_spinlock_init (&listener->rx_lock);
node_index = lcl->is_ip4 ? udp4_input_node.index : udp6_input_node.index;
@@ -327,6 +333,10 @@ udp_open_connection (transport_endpoint_cfg_t * rmt)
uc->c_proto = TRANSPORT_PROTO_UDP;
uc->c_fib_index = rmt->fib_index;
uc->flags |= UDP_CONN_F_OWNS_PORT;
+ if (rmt->transport_flags & TRANSPORT_CFG_F_CONNECTED)
+ uc->flags |= UDP_CONN_F_CONNECTED;
+ else
+ uc->c_flags |= TRANSPORT_CONNECTION_F_CLESS;
return uc->c_c_index;
}
href='/csit/tree/resources/libraries?h=oper-230911&id=324f01417f17a5347c102179f3d2277a77b116ce'>libraries/python/SchedUtils.py
blob: cfc75344f9d13514a44d0464e7601a3a71c4244d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109