Skip to content
Snippets Groups Projects
Commit d728e169 authored by root's avatar root
Browse files

switch syntax for sctp_connectx

parent e91087c2
No related branches found
No related tags found
No related merge requests found
...@@ -3923,6 +3923,7 @@ static int parse_expression_to_sctp_sendv_spa(struct expression *expr, struct sc ...@@ -3923,6 +3923,7 @@ static int parse_expression_to_sctp_sendv_spa(struct expression *expr, struct sc
} }
#endif #endif
#if defined(__FreeBSD__)
static int get_sockaddr_from_list(struct expression *expr, size_t *addr_size, struct sockaddr **addrs, char **error) { static int get_sockaddr_from_list(struct expression *expr, size_t *addr_size, struct sockaddr **addrs, char **error) {
if (expr->type == EXPR_LIST) { if (expr->type == EXPR_LIST) {
struct expression_list *addrs_expr_list = (struct expression_list *)expr->value.list; struct expression_list *addrs_expr_list = (struct expression_list *)expr->value.list;
...@@ -3969,6 +3970,7 @@ static int get_sockaddr_from_list(struct expression *expr, size_t *addr_size, st ...@@ -3969,6 +3970,7 @@ static int get_sockaddr_from_list(struct expression *expr, size_t *addr_size, st
return STATUS_ERR; return STATUS_ERR;
} }
} }
#endif
static int syscall_sctp_sendv(struct state *state, struct syscall_spec *syscall, static int syscall_sctp_sendv(struct state *state, struct syscall_spec *syscall,
struct expression_list *args, struct expression_list *args,
...@@ -4792,6 +4794,11 @@ static int syscall_sctp_connectx(struct state *state, struct syscall_spec *sysca ...@@ -4792,6 +4794,11 @@ static int syscall_sctp_connectx(struct state *state, struct syscall_spec *sysca
return STATUS_ERR; return STATUS_ERR;
assoc_expr = get_arg(args, 3, error); assoc_expr = get_arg(args, 3, error);
if (check_type(assoc_expr, EXPR_LIST, error))
return STATUS_ERR;
if (check_arg_count(assoc_expr->value.list, 1, error))
return STATUS_ERR;
assoc_expr = get_arg(assoc_expr->value.list, 0, error);
if (check_u32_expr(assoc_expr, (u32)live_associd, if (check_u32_expr(assoc_expr, (u32)live_associd,
"sctp_connectx assoc_id", error)) "sctp_connectx assoc_id", error))
return STATUS_ERR; return STATUS_ERR;
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
+0.0 sctp_bindx(3, [...], 1, SCTP_BINDX_ADD_ADDR) = 0 +0.0 sctp_bindx(3, [...], 1, SCTP_BINDX_ADD_ADDR) = 0
// Check the handshake with an empty(!) cookie // Check the handshake with an empty(!) cookie
+0.1 sctp_connectx(3, [...], 1, 3) = 0 +0.1 sctp_connectx(3, [...], 1, [3]) = 0
+0.0 > sctp: INIT[flgs=0, tag=1, a_rwnd=..., os=..., is=..., tsn=1, ...] +0.0 > sctp: INIT[flgs=0, tag=1, a_rwnd=..., os=..., is=..., tsn=1, ...]
+0.1 < sctp: INIT_ACK[flgs=0, tag=2, a_rwnd=1500, os=16, is=16, tsn=1, STATE_COOKIE[len=4, val=...]] +0.1 < sctp: INIT_ACK[flgs=0, tag=2, a_rwnd=1500, os=16, is=16, tsn=1, STATE_COOKIE[len=4, val=...]]
+0.0 > sctp: COOKIE_ECHO[flgs=0, len=4, val=...] +0.0 > sctp: COOKIE_ECHO[flgs=0, len=4, val=...]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment