Compare commits

...

9 Commits

Author SHA1 Message Date
Florin Coras
0cb68778ec ldp: add support for TCP_CONGESTION sockopts (VPP-1550)
Change-Id: I0fcf3385cc4fb96f000b84d5f880f74131c0d60f
Signed-off-by: Florin Coras <fcoras@cisco.com>
(cherry picked from commit 0ed24e93b207850078ca7f58cd4106cc4a906952)
2019-01-21 19:34:15 +00:00
Andrew Yourtchenko
1705599efe doxygen formatting fix: prevent stray examples appearing in the docs
The 'example' keyword triggers the creation of very out-of-context
example in the "Examples" top level of documentation. Rename the
keyword in the comment so the comment is still readable, but
does not trigger the doxygen.

Change-Id: Iecbdc236918f9178a034817aa6cea7ab6b2c1654
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2019-01-21 16:05:28 +01:00
Florin Coras
6e5f93e70d session: add support for vrf in session unformat (VPP-1546)
Change-Id: Ic5ba751c2bd2db9af4a21d3db40cc305d1208c30
Signed-off-by: Florin Coras <fcoras@cisco.com>
(cherry picked from commit baee8d498830bbbf54ec76e7c0c887c6373fe985)
2019-01-20 22:57:38 +00:00
Florin Coras
a74ae5886f tcp: fix debugging without cc stats (VPP-1547)
Change-Id: I376856fcadce570bb555064435f5876eefb2befa
Signed-off-by: Florin Coras <fcoras@cisco.com>
(cherry picked from commit 0702554639e5149d9012cc196aa43c3c8d0d7f9b)
2019-01-20 19:21:55 +00:00
Michal Cmarada
af429cb381 fix data_length in IpSec API call (VPP-1548)
Change-Id: Idb2839f6082bd2e052be2bc5417f0ebb43d1c0a6
Signed-off-by: Michal Cmarada <mcmarada@cisco.com>
2019-01-20 15:21:48 +00:00
Neale Ranns
46da5e33a3 VOM: ip-mroute inspect register handler fix
Change-Id: I57689446005da00fa064e2938cfe55a9e1cef9fc
Signed-off-by: Neale Ranns <nranns@cisco.com>
(cherry picked from commit d870ce441272d7057c8cb2b8f9731ebe41a17f0a)
2019-01-20 10:27:57 +00:00
Florin Coras
cbb4565c88 tcp: allow data in passive open ack (VPP-1545)
Change-Id: Iceb99d3f8b7029bd1b1e9ebafb1e0b3790c573e4
Signed-off-by: Florin Coras <fcoras@cisco.com>
(cherry picked from commit 865872ebdb2bbaf3f157e2a9889405b84114d2eb)
2019-01-18 22:10:24 +00:00
Paul Vinciguerra
48872780e8 VTL: Use latest version of syslog_rfc5424_parser (0.2.0) released: 190117
Upstream changes not compatable with: https://gerrit.fd.io/r/#/c/16797/

Running tests using custom test runner
Active filters: file=test_syslog.py, class=None, function=None
Adding tests from directory tree /vpp/test
1 out of 914 tests match specified filters
Not running extended tests (some tests will be skipped)
==============================================================================
Syslog Protocol Test Cases
==============================================================================
Syslog Protocol test                                                     OK

==============================================================================
TEST RESULTS:
     Scheduled tests: 1
      Executed tests: 1
        Passed tests: 1
==============================================================================

Test run was successful

Change-Id: I42f86ae3e7f062c0343025ba16bc6e8d2c34ed50
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
(cherry picked from commit 5011c67058c3c37d344c5d83ab6046700327b7b4)
2019-01-18 17:29:57 +00:00
Andrew Yourtchenko
3e2bc759f4 Initial changes for stable/1901 branch
This patch adds an entry for the defaultbranch in .gitreview

Change-Id: I3dc45492ec51b10524b0a6d894c7e42c352f0daa
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2019-01-16 19:26:41 +01:00
9 changed files with 47 additions and 19 deletions

View File

@ -2,3 +2,4 @@
host=gerrit.fd.io
port=29418
project=vpp
defaultbranch=stable/1901

View File

@ -632,7 +632,8 @@ ip_mroute::dump(std::ostream& os)
ip_mroute::event_handler::event_handler()
{
OM::register_listener(this);
inspect::register_handler({ "ip-route" }, "ip route configurations", this);
inspect::register_handler({ "ip-mroute" },
"ip multicast route configurations", this);
}
void

View File

@ -1700,6 +1700,11 @@ getsockopt (int fd, int level, int optname,
else
rv = -EFAULT;
break;
case TCP_CONGESTION:
strcpy (optval, "cubic");
*optlen = strlen ("cubic");
rv = 0;
break;
default:
LDBG (0, "ERROR: fd %d: getsockopt SOL_TCP: sid %u, "
"optname %d unsupported!", fd, vlsh, optname);
@ -1808,6 +1813,10 @@ setsockopt (int fd, int level, int optname,
rv = vls_attr (vlsh, VPPCOM_ATTR_SET_TCP_KEEPINTVL,
(void *) optval, &optlen);
break;
case TCP_CONGESTION:
/* Ignore */
rv = 0;
break;
default:
LDBG (0, "ERROR: fd %d: setsockopt() SOL_TCP: vlsh %u"
"optname %d unsupported!", fd, vlsh, optname);

View File

@ -717,9 +717,10 @@ static void
#if WITH_LIBSSL > 0
vlib_main_t *vm = vlib_get_main ();
clib_error_t *error;
int data_len = ntohl (mp->data_len);
u8 *tmp = format (0, "%s", mp->name);
u8 *data = vec_new (u8, mp->data_len);
clib_memcpy (data, mp->data, mp->data_len);
u8 *data = vec_new (u8, data_len);
clib_memcpy (data, mp->data, data_len);
error = ikev2_set_profile_auth (vm, tmp, mp->auth_method, data, mp->is_hex);
vec_free (tmp);
vec_free (data);
@ -742,8 +743,9 @@ vl_api_ikev2_profile_set_id_t_handler (vl_api_ikev2_profile_set_id_t * mp)
vlib_main_t *vm = vlib_get_main ();
clib_error_t *error;
u8 *tmp = format (0, "%s", mp->name);
u8 *data = vec_new (u8, mp->data_len);
clib_memcpy (data, mp->data, mp->data_len);
int data_len = ntohl (mp->data_len);
u8 *data = vec_new (u8, data_len);
clib_memcpy (data, mp->data, data_len);
error = ikev2_set_profile_id (vm, tmp, mp->id_type, data, mp->is_local);
vec_free (tmp);
vec_free (data);

View File

@ -100,12 +100,14 @@ uword
unformat_stream_session_id (unformat_input_t * input, va_list * args)
{
u8 *proto = va_arg (*args, u8 *);
u32 *fib_index = va_arg (*args, u32 *);
ip46_address_t *lcl = va_arg (*args, ip46_address_t *);
ip46_address_t *rmt = va_arg (*args, ip46_address_t *);
u16 *lcl_port = va_arg (*args, u16 *);
u16 *rmt_port = va_arg (*args, u16 *);
u8 *is_ip4 = va_arg (*args, u8 *);
u8 tuple_is_set = 0;
u32 vrf = ~0;
clib_memset (lcl, 0, sizeof (*lcl));
clib_memset (rmt, 0, sizeof (*rmt));
@ -114,10 +116,16 @@ unformat_stream_session_id (unformat_input_t * input, va_list * args)
{
*proto = TRANSPORT_PROTO_TCP;
}
if (unformat (input, "udp"))
else if (unformat (input, "udp"))
{
*proto = TRANSPORT_PROTO_UDP;
}
else
return 0;
if (unformat (input, "vrf %u", &vrf))
;
if (unformat (input, "%U:%d->%U:%d", unformat_ip4_address, &lcl->ip4,
lcl_port, unformat_ip4_address, &rmt->ip4, rmt_port))
{
@ -131,6 +139,13 @@ unformat_stream_session_id (unformat_input_t * input, va_list * args)
tuple_is_set = 1;
}
if (vrf != ~0)
{
fib_protocol_t fib_proto;
fib_proto = *is_ip4 ? FIB_PROTOCOL_IP4 : FIB_PROTOCOL_IP6;
*fib_index = fib_table_find (fib_proto, vrf);
}
return tuple_is_set;
}
@ -138,14 +153,14 @@ uword
unformat_stream_session (unformat_input_t * input, va_list * args)
{
stream_session_t **result = va_arg (*args, stream_session_t **);
u32 lcl_port = 0, rmt_port = 0, fib_index = 0;
ip46_address_t lcl, rmt;
stream_session_t *s;
u8 proto = ~0;
ip46_address_t lcl, rmt;
u32 lcl_port = 0, rmt_port = 0, fib_index = 0;
u8 is_ip4 = 0;
if (!unformat (input, "%U", unformat_stream_session_id, &proto, &lcl, &rmt,
&lcl_port, &rmt_port, &is_ip4))
if (!unformat (input, "%U", unformat_stream_session_id, &proto, &fib_index,
&lcl, &rmt, &lcl_port, &rmt_port, &is_ip4))
return 0;
if (is_ip4)
@ -176,8 +191,8 @@ unformat_transport_connection (unformat_input_t * input, va_list * args)
u32 lcl_port = 0, rmt_port = 0, fib_index = 0;
u8 is_ip4 = 0;
if (!unformat (input, "%U", unformat_stream_session_id, &proto, &lcl, &rmt,
&lcl_port, &rmt_port, &is_ip4))
if (!unformat (input, "%U", unformat_stream_session_id, &fib_index, &proto,
&lcl, &rmt, &lcl_port, &rmt_port, &is_ip4))
return 0;
proto = (proto == (u8) ~ 0) ? suggested_proto : proto;

View File

@ -879,6 +879,7 @@ if (tcp_cc_time_to_print_stats (_tc)) \
}
#else
#define TCP_EVT_CC_STAT_HANDLER(_tc, ...)
#define TCP_EVT_CC_STAT_PRINT(_tc)
#endif
/*

View File

@ -359,6 +359,7 @@ tcp_segment_validate (tcp_worker_ctx_t * wrk, tcp_connection_t * tc0,
/* 4th: check the SYN bit */
if (PREDICT_FALSE (tcp_syn (th0)))
{
*error0 = tcp_ack (th0) ? TCP_ERROR_SYN_ACKS_RCVD : TCP_ERROR_SYNS_RCVD;
/* TODO implement RFC 5961 */
if (tc0->state == TCP_STATE_SYN_RCVD)
{
@ -2712,8 +2713,7 @@ tcp46_rcv_process_inline (vlib_main_t * vm, vlib_node_runtime_t * node,
}
/* Make sure the ack is exactly right */
if (tc0->rcv_nxt != vnet_buffer (b0)->tcp.seq_number || is_fin0
|| vnet_buffer (b0)->tcp.data_len)
if (tc0->rcv_nxt != vnet_buffer (b0)->tcp.seq_number || is_fin0)
{
tcp_connection_reset (tc0);
error0 = TCP_ERROR_SEGMENT_INVALID;
@ -3144,6 +3144,7 @@ tcp46_listen_inline (vlib_main_t * vm, vlib_node_runtime_t * node,
child0->snd_wl2 = vnet_buffer (b0)->tcp.ack_number;
tcp_connection_init_vars (child0);
child0->rto = TCP_RTO_MIN;
TCP_EVT_DBG (TCP_EVT_SYN_RCVD, child0, 1);
if (stream_session_accept (&child0->connection, lc0->c_s_index,

View File

@ -385,7 +385,7 @@ strncat_s (char *__restrict__ dest, rsize_t dmax,
* s1max and ptr are modified to contain the state
* null runtime constraint error or token is not found
*
* @example
* Example:
* char *str2 = " ";
* char str1[100];
* uword len;
@ -457,7 +457,7 @@ strnlen_s (const char *s, size_t maxsize)
* EINVAL runtime constraint error
* ESRCH no match
*
* @example
* Example:
* char *sub = 0;
* char *s1 = "success is not final, failure is not fatal.";
*

View File

@ -7,9 +7,7 @@ parameterized>=0.6.1 # BSD
pexpect # ISC
psutil # BSD
pycodestyle # MIT (Expat license) https://pypi.org/project/pycodestyle/
# used by syslog_rfc5424_parser
pyparsing<2.3.1 # MIT
scapy==2.4.0; python_version >= '2.7' or python_version >= '3.4' # GPL2 https://github.com/secdev/scapy/blob/master/LICENSE
six # MIT
subprocess32 # PSF
syslog_rfc5424_parser # ISC
syslog_rfc5424_parser>=0.2.0 # ISC