Skip to content

Commit a4bb497

Browse files
author
Tero Heinonen
authored
Add check for interface when receiving CoAP request (#92)
Check that receive interface ID is matching to interface ID registered to URI.
1 parent bca55ce commit a4bb497

13 files changed

+74
-35
lines changed

source/coap_connection_handler.c

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -537,7 +537,7 @@ static int timer_status(int8_t timer_id)
537537
return TIMER_STATE_CANCELLED;
538538
}
539539

540-
static int read_data(socket_callback_t *sckt_data, internal_socket_t *sock, ns_address_t *src_address, uint8_t dst_address[static 16])
540+
static int read_data(socket_callback_t *sckt_data, internal_socket_t *sock, ns_address_t *src_address, uint8_t dst_address[static 16], int8_t *interface)
541541
{
542542
sock->data_len = 0;
543543
if (sckt_data->event_type == SOCKET_DATA && sckt_data->d_len > 0) {
@@ -584,6 +584,7 @@ static int read_data(socket_callback_t *sckt_data, internal_socket_t *sock, ns_a
584584
}
585585
if (pkt) {
586586
memcpy(dst_address, pkt->ipi6_addr, 16);
587+
*interface = pkt->ipi6_ifindex;
587588
} else {
588589
goto return_failure;
589590
}
@@ -613,8 +614,9 @@ static void secure_recv_sckt_msg(void *cb_res)
613614
ns_address_t src_address;
614615
uint8_t dst_address[16] = {0};
615616
memset(&src_address, 0, sizeof(ns_address_t));
617+
int8_t interface_id = -1;
616618

617-
if (sock && read_data(sckt_data, sock, &src_address, dst_address) == 0) {
619+
if (sock && read_data(sckt_data, sock, &src_address, dst_address, &interface_id) == 0) {
618620
/* If received from multicast address, reject */
619621
if (*(dst_address) == 0xFF) {
620622
return;
@@ -683,7 +685,7 @@ static void secure_recv_sckt_msg(void *cb_res)
683685
ns_dyn_mem_free(data);
684686
} else {
685687
if (sock->parent->_recv_cb) {
686-
sock->parent->_recv_cb(sock->socket, src_address.address, src_address.identifier, dst_address, data, len);
688+
sock->parent->_recv_cb(sock->socket, interface_id, src_address.address, src_address.identifier, dst_address, data, len);
687689
}
688690
ns_dyn_mem_free(data);
689691
}
@@ -699,10 +701,11 @@ static void recv_sckt_msg(void *cb_res)
699701
internal_socket_t *sock = int_socket_find_by_socket_id(sckt_data->socket_id);
700702
ns_address_t src_address;
701703
uint8_t dst_address[16];
704+
int8_t interface_id = -1;
702705

703-
if (sock && read_data(sckt_data, sock, &src_address, dst_address) == 0) {
706+
if (sock && read_data(sckt_data, sock, &src_address, dst_address, &interface_id) == 0) {
704707
if (sock->parent && sock->parent->_recv_cb) {
705-
sock->parent->_recv_cb(sock->socket, src_address.address, src_address.identifier, dst_address, sock->data, sock->data_len);
708+
sock->parent->_recv_cb(sock->socket, interface_id, src_address.address, src_address.identifier, dst_address, sock->data, sock->data_len);
706709
}
707710
ns_dyn_mem_free(sock->data);
708711
sock->data = NULL;
@@ -711,6 +714,8 @@ static void recv_sckt_msg(void *cb_res)
711714

712715
int coap_connection_handler_virtual_recv(coap_conn_handler_t *handler, uint8_t address[static 16], uint16_t port, uint8_t *data_ptr, uint16_t data_len)
713716
{
717+
int8_t interface_id = -1;
718+
714719
if(!handler || !handler->socket) {
715720
return -1;
716721
}
@@ -787,7 +792,7 @@ int coap_connection_handler_virtual_recv(coap_conn_handler_t *handler, uint8_t a
787792
return 0;
788793
} else {
789794
if (sock->parent->_recv_cb) {
790-
sock->parent->_recv_cb(sock->socket, address, port, ns_in6addr_any, data, len);
795+
sock->parent->_recv_cb(sock->socket, interface_id, address, port, ns_in6addr_any, data, len);
791796
}
792797
ns_dyn_mem_free(data);
793798
data = NULL;
@@ -798,7 +803,7 @@ int coap_connection_handler_virtual_recv(coap_conn_handler_t *handler, uint8_t a
798803
} else {
799804
/* unsecure*/
800805
if (sock->parent->_recv_cb) {
801-
sock->parent->_recv_cb(sock->socket, address, port, ns_in6addr_any, sock->data, sock->data_len);
806+
sock->parent->_recv_cb(sock->socket, interface_id, address, port, ns_in6addr_any, sock->data, sock->data_len);
802807
}
803808
if (sock->data) {
804809
ns_dyn_mem_free(sock->data);

source/coap_message_handler.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -239,8 +239,8 @@ coap_transaction_t *coap_message_handler_find_transaction(uint8_t *address_ptr,
239239
return transaction_find_by_address( address_ptr, port );
240240
}
241241

242-
int16_t coap_message_handler_coap_msg_process(coap_msg_handler_t *handle, int8_t socket_id, const uint8_t source_addr_ptr[static 16], uint16_t port, const uint8_t dst_addr_ptr[static 16],
243-
uint8_t *data_ptr, uint16_t data_len, int16_t (cb)(int8_t, sn_coap_hdr_s *, coap_transaction_t *))
242+
int16_t coap_message_handler_coap_msg_process(coap_msg_handler_t *handle, int8_t socket_id, int8_t interface_id, const uint8_t source_addr_ptr[static 16], uint16_t port, const uint8_t dst_addr_ptr[static 16],
243+
uint8_t *data_ptr, uint16_t data_len, int16_t (cb)(int8_t, int8_t, sn_coap_hdr_s *, coap_transaction_t *))
244244
{
245245
sn_nsdl_addr_s src_addr;
246246
sn_coap_hdr_s *coap_message;
@@ -285,7 +285,7 @@ int16_t coap_message_handler_coap_msg_process(coap_msg_handler_t *handle, int8_t
285285
transaction_ptr->token_len = coap_message->token_len;
286286
}
287287
transaction_ptr->remote_port = port;
288-
if (cb(socket_id, coap_message, transaction_ptr) < 0) {
288+
if (cb(socket_id, interface_id, coap_message, transaction_ptr) < 0) {
289289
// negative return value = message ignored -> delete transaction
290290
transaction_delete(transaction_ptr);
291291
}

source/coap_service_api.c

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
#include "coap_message_handler.h"
3737
#include "mbed-coap/sn_coap_protocol.h"
3838

39-
static int16_t coap_msg_process_callback(int8_t socket_id, sn_coap_hdr_s *coap_message, coap_transaction_t *transaction_ptr);
39+
static int16_t coap_msg_process_callback(int8_t socket_id, int8_t interface_id, sn_coap_hdr_s *coap_message, coap_transaction_t *transaction_ptr);
4040

4141
typedef struct uri_registration {
4242
char *uri_ptr;
@@ -210,7 +210,7 @@ static void service_event_handler(arm_event_s *event)
210210
eventOS_event_timer_request((uint8_t)COAP_TICK_TIMER, ARM_LIB_SYSTEM_TIMER_EVENT, tasklet_id, 1000);
211211
}
212212

213-
static int16_t coap_msg_process_callback(int8_t socket_id, sn_coap_hdr_s *coap_message, coap_transaction_t *transaction_ptr)
213+
static int16_t coap_msg_process_callback(int8_t socket_id, int8_t interface_id, sn_coap_hdr_s *coap_message, coap_transaction_t *transaction_ptr)
214214
{
215215
coap_service_t *this;
216216
if (!coap_message || !transaction_ptr) {
@@ -229,6 +229,11 @@ static int16_t coap_msg_process_callback(int8_t socket_id, sn_coap_hdr_s *coap_m
229229
return -1;
230230
}
231231

232+
if ((interface_id != -1) && (this->interface_id != interface_id)) {
233+
tr_debug("uri %.*s not registered to interface %d", coap_message->uri_path_len, coap_message->uri_path_ptr, interface_id);
234+
return 0;
235+
}
236+
232237
uri_registration_t *uri_reg_ptr = uri_registration_find(this, coap_message->uri_path_ptr, coap_message->uri_path_len);
233238
if (uri_reg_ptr && uri_reg_ptr->request_recv_cb) {
234239
tr_debug("Service %d, call request recv cb uri %.*s", this->service_id, coap_message->uri_path_len, coap_message->uri_path_ptr);
@@ -244,7 +249,7 @@ static int16_t coap_msg_process_callback(int8_t socket_id, sn_coap_hdr_s *coap_m
244249
return -1;
245250
}
246251

247-
static int recv_cb(int8_t socket_id, uint8_t src_address[static 16], uint16_t port, const uint8_t dst_address[static 16], unsigned char *data, int len)
252+
static int recv_cb(int8_t socket_id, int8_t interface_id, uint8_t src_address[static 16], uint16_t port, const uint8_t dst_address[static 16], unsigned char *data, int len)
248253
{
249254
uint8_t *data_ptr = NULL;
250255
uint16_t data_len = 0;
@@ -263,7 +268,7 @@ static int recv_cb(int8_t socket_id, uint8_t src_address[static 16], uint16_t po
263268
tr_debug("service recv socket data len %d ", data_len);
264269

265270
//parse coap message what CoAP to use
266-
int ret = coap_message_handler_coap_msg_process(coap_service_handle, socket_id, src_address, port, dst_address, data_ptr, data_len, &coap_msg_process_callback);
271+
int ret = coap_message_handler_coap_msg_process(coap_service_handle, socket_id, interface_id, src_address, port, dst_address, data_ptr, data_len, &coap_msg_process_callback);
267272
own_free(data_ptr);
268273
return ret;
269274
}

source/include/coap_connection_handler.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
struct internal_socket_s;
3636

3737
typedef int send_to_socket_cb(int8_t socket_id, const uint8_t address[static 16], uint16_t port, const void *, int);
38-
typedef int receive_from_socket_cb(int8_t socket_id, uint8_t src_address[static 16], uint16_t port, const uint8_t dst_address[static 16], unsigned char *, int);
38+
typedef int receive_from_socket_cb(int8_t socket_id, int8_t interface_id, uint8_t src_address[static 16], uint16_t port, const uint8_t dst_address[static 16], unsigned char *, int);
3939
typedef int get_pw_cb(int8_t socket_id, uint8_t address[static 16], uint16_t port, coap_security_keys_t *security_ptr);
4040
typedef void security_done_cb(int8_t socket_id, uint8_t address[static 16], uint16_t port, uint8_t keyblock[static 40]);
4141

source/include/coap_message_handler.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,8 @@ extern coap_transaction_t *coap_message_handler_transaction_valid(coap_transacti
7676

7777
extern coap_transaction_t *coap_message_handler_find_transaction(uint8_t *address_ptr, uint16_t port);
7878

79-
extern int16_t coap_message_handler_coap_msg_process(coap_msg_handler_t *handle, int8_t socket_id, const uint8_t source_addr_ptr[static 16], uint16_t port, const uint8_t dst_addr_ptr[static 16],
80-
uint8_t *data_ptr, uint16_t data_len, int16_t (cb)(int8_t, sn_coap_hdr_s *, coap_transaction_t *));
79+
extern int16_t coap_message_handler_coap_msg_process(coap_msg_handler_t *handle, int8_t socket_id, int8_t interface_id, const uint8_t source_addr_ptr[static 16], uint16_t port, const uint8_t dst_addr_ptr[static 16],
80+
uint8_t *data_ptr, uint16_t data_len, int16_t (cb)(int8_t, int8_t, sn_coap_hdr_s *, coap_transaction_t *));
8181

8282
extern uint16_t coap_message_handler_request_send(coap_msg_handler_t *handle, int8_t service_id, uint8_t options, const uint8_t destination_addr[static 16],
8383
uint16_t destination_port, sn_coap_msg_type_e msg_type, sn_coap_msg_code_e msg_code, const char *uri, sn_coap_content_format_e cont_type,

test/coap-service/unittest/coap_message_handler/test_coap_message_handler.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ bool test_coap_message_handler_coap_msg_process()
133133
uint8_t buf[16];
134134
memset(&buf, 1, 16);
135135
/*Handler is null*/
136-
if( -1 != coap_message_handler_coap_msg_process(NULL, 0, buf, 22, ns_in6addr_any, NULL, 0, NULL))
136+
if( -1 != coap_message_handler_coap_msg_process(NULL, 0, -1, buf, 22, ns_in6addr_any, NULL, 0, NULL))
137137
return false;
138138

139139
retCounter = 1;
@@ -143,14 +143,14 @@ bool test_coap_message_handler_coap_msg_process()
143143

144144
sn_coap_protocol_stub.expectedHeader = NULL;
145145
/* Coap parse returns null */
146-
if( -1 != coap_message_handler_coap_msg_process(handle, 0, buf, 22, ns_in6addr_any, NULL, 0, process_cb))
146+
if( -1 != coap_message_handler_coap_msg_process(handle, 0, -1, buf, 22, ns_in6addr_any, NULL, 0, process_cb))
147147
return false;
148148

149149
sn_coap_protocol_stub.expectedHeader = (sn_coap_hdr_s *)malloc(sizeof(sn_coap_hdr_s));
150150
memset(sn_coap_protocol_stub.expectedHeader, 0, sizeof(sn_coap_hdr_s));
151151
sn_coap_protocol_stub.expectedHeader->coap_status = 66;
152152
/* Coap library responds */
153-
if( -1 != coap_message_handler_coap_msg_process(handle, 0, buf, 22, ns_in6addr_any, NULL, 0, process_cb))
153+
if( -1 != coap_message_handler_coap_msg_process(handle, 0, -1, buf, 22, ns_in6addr_any, NULL, 0, process_cb))
154154
return false;
155155

156156
sn_coap_protocol_stub.expectedHeader = (sn_coap_hdr_s *)malloc(sizeof(sn_coap_hdr_s));
@@ -159,7 +159,7 @@ bool test_coap_message_handler_coap_msg_process()
159159
sn_coap_protocol_stub.expectedHeader->msg_code = 1;
160160
retValue = 0;
161161
/* request received */
162-
if( 0 != coap_message_handler_coap_msg_process(handle, 0, buf, 22, ns_in6addr_any, NULL, 0, process_cb))
162+
if( 0 != coap_message_handler_coap_msg_process(handle, 0, -1, buf, 22, ns_in6addr_any, NULL, 0, process_cb))
163163
return false;
164164

165165
sn_coap_protocol_stub.expectedHeader = (sn_coap_hdr_s *)malloc(sizeof(sn_coap_hdr_s));
@@ -168,15 +168,15 @@ bool test_coap_message_handler_coap_msg_process()
168168
sn_coap_protocol_stub.expectedHeader->msg_code = 1;
169169
nsdynmemlib_stub.returnCounter = 1;
170170
retValue = -1;
171-
if( 0 != coap_message_handler_coap_msg_process(handle, 0, buf, 22, ns_in6addr_any, NULL, 0, process_cb))
171+
if( 0 != coap_message_handler_coap_msg_process(handle, 0, -1, buf, 22, ns_in6addr_any, NULL, 0, process_cb))
172172
return false;
173173

174174
sn_coap_protocol_stub.expectedHeader = (sn_coap_hdr_s *)malloc(sizeof(sn_coap_hdr_s));
175175
memset(sn_coap_protocol_stub.expectedHeader, 0, sizeof(sn_coap_hdr_s));
176176
sn_coap_protocol_stub.expectedHeader->coap_status = COAP_STATUS_OK;
177177
sn_coap_protocol_stub.expectedHeader->msg_code = 333;
178178

179-
if( -1 != coap_message_handler_coap_msg_process(handle, 0, buf, 22, ns_in6addr_any, NULL, 0, process_cb))
179+
if( -1 != coap_message_handler_coap_msg_process(handle, 0, -1, buf, 22, ns_in6addr_any, NULL, 0, process_cb))
180180
return false;
181181

182182
sn_coap_protocol_stub.expectedHeader = (sn_coap_hdr_s *)malloc(sizeof(sn_coap_hdr_s));
@@ -197,7 +197,7 @@ bool test_coap_message_handler_coap_msg_process()
197197
sn_coap_protocol_stub.expectedHeader->msg_id = 2;
198198
// sn_coap_protocol_stub.expectedHeader->token_ptr = (uint8_t*)malloc(4);
199199
// memset(sn_coap_protocol_stub.expectedHeader->token_ptr, 1, 4);
200-
if( -1 != coap_message_handler_coap_msg_process(handle, 0, buf, 22, ns_in6addr_any, NULL, 0, process_cb))
200+
if( -1 != coap_message_handler_coap_msg_process(handle, 0, -1, buf, 22, ns_in6addr_any, NULL, 0, process_cb))
201201
return false;
202202

203203
// free(sn_coap_protocol_stub.expectedHeader->token_ptr);

test/coap-service/unittest/coap_service_api/coap_service_apitest.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,3 +117,9 @@ TEST(coap_service_api, test_coap_service_handshake_limit_set)
117117
{
118118
CHECK(test_coap_service_handshake_limit_set())
119119
}
120+
121+
TEST(coap_service_api, test_coap_service_secure_session_close)
122+
{
123+
CHECK(test_coap_service_secure_session_close())
124+
}
125+

test/coap-service/unittest/coap_service_api/test_coap_service_api.c

Lines changed: 27 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -352,22 +352,22 @@ bool test_conn_handler_callbacks()
352352

353353
if( thread_conn_handler_stub.receive_from_sock_cb ){
354354
coap_message_handler_stub.int16_value = 2;
355-
if( -1 != thread_conn_handler_stub.receive_from_sock_cb(1, buf, 12, NULL, NULL, 0))
355+
if( -1 != thread_conn_handler_stub.receive_from_sock_cb(1, -1, buf, 12, NULL, NULL, 0))
356356
return false;
357357

358358
nsdynmemlib_stub.returnCounter = 1;
359359
uint8_t * ptr = ns_dyn_mem_alloc(5);
360360
memset(ptr, 3, 5);
361361
nsdynmemlib_stub.returnCounter = 1;
362-
if( 2 != thread_conn_handler_stub.receive_from_sock_cb(1, buf, 12, NULL, ptr, 5))
362+
if( 2 != thread_conn_handler_stub.receive_from_sock_cb(1, -1, buf, 12, NULL, ptr, 5))
363363
return false;
364364
ns_dyn_mem_free(ptr);
365365
coap_message_handler_stub.int16_value = 0;
366366

367367
//This could be moved to own test function,
368368
//but thread_conn_handler_stub.receive_from_sock_cb must be called successfully
369369
if( coap_message_handler_stub.cb ){
370-
if( -1 != coap_message_handler_stub.cb(1, NULL, NULL) )
370+
if( -1 != coap_message_handler_stub.cb(1, -1, NULL, NULL) )
371371
return false;
372372

373373
sn_coap_hdr_s * coap = (sn_coap_hdr_s *)malloc(sizeof(sn_coap_hdr_s));
@@ -377,21 +377,21 @@ bool test_conn_handler_callbacks()
377377
coap->uri_path_ptr = &uri;
378378
coap->uri_path_len=2;
379379

380-
if( -1 != coap_message_handler_stub.cb(1, coap, NULL) )
380+
if( -1 != coap_message_handler_stub.cb(1, -1, coap, NULL) )
381381
return false;
382382

383383
thread_conn_handler_stub.bool_value = true;
384384
nsdynmemlib_stub.returnCounter = 2;
385385
if( 0 != coap_service_register_uri(1, "as", 1, &request_recv_cb) )
386386
return false;
387387

388-
if( -1 != coap_message_handler_stub.cb(1, coap, NULL) )
388+
if( -1 != coap_message_handler_stub.cb(1, -1, coap, NULL) )
389389
return false;
390390

391391
coap_transaction_t *tr = (coap_transaction_t *)malloc(sizeof(coap_transaction_t));
392392
memset(tr, 0, sizeof(coap_transaction_t));
393393

394-
if( 2 != coap_message_handler_stub.cb(1, coap, tr) )
394+
if( 2 != coap_message_handler_stub.cb(1, -1, coap, tr) )
395395
return false;
396396

397397
free(tr);
@@ -589,3 +589,24 @@ bool test_coap_service_handshake_limit_set()
589589

590590
return true;
591591
}
592+
593+
bool test_coap_service_secure_session_close()
594+
{
595+
int service_id;
596+
uint8_t addr_ptr[16] = {0};
597+
598+
thread_conn_handler_stub.handler_obj = (coap_conn_handler_t*)malloc(sizeof(coap_conn_handler_t));
599+
memset(thread_conn_handler_stub.handler_obj, 0, sizeof(coap_conn_handler_t));
600+
601+
nsdynmemlib_stub.returnCounter = 1;
602+
service_id = coap_service_initialize(1, 2, 0, NULL, NULL );
603+
604+
coap_service_close_secure_connection(0, NULL, 0);
605+
606+
coap_service_close_secure_connection(service_id, NULL, 0);
607+
608+
coap_service_close_secure_connection(service_id, addr_ptr, 1234);
609+
610+
coap_service_delete(service_id);
611+
free(thread_conn_handler_stub.handler_obj);
612+
}

test/coap-service/unittest/coap_service_api/test_coap_service_api.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,8 @@ bool test_coap_service_if_find_by_socket();
5959

6060
bool test_coap_service_handshake_limit_set();
6161

62+
bool test_coap_service_secure_session_close();
63+
6264

6365
#ifdef __cplusplus
6466
}

test/coap-service/unittest/stub/coap_connection_handler_stub.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ int coap_connection_handler_virtual_recv(coap_conn_handler_t *handler, uint8_t a
3333
return thread_conn_handler_stub.int_value;
3434
}
3535

36-
coap_conn_handler_t *connection_handler_create(int (*recv_cb)(int8_t socket_id, uint8_t src_address[static 16], uint16_t port, const uint8_t dst_address[static 16], unsigned char *, int),
36+
coap_conn_handler_t *connection_handler_create(int (*recv_cb)(int8_t socket_id, int8_t interface_id, uint8_t src_address[static 16], uint16_t port, const uint8_t dst_address[static 16], unsigned char *, int),
3737
int (*send_cb)(int8_t socket_id, uint8_t const address[static 16], uint16_t port, const void *, int),
3838
int (*pw_cb)(int8_t socket_id, uint8_t address[static 16], uint16_t port, coap_security_keys_t *security_ptr),
3939
void(*done_cb)(int8_t socket_id, uint8_t address[static 16], uint16_t port, uint8_t keyblock[static KEY_BLOCK_LEN]) )

test/coap-service/unittest/stub/coap_connection_handler_stub.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ typedef struct {
3232
coap_conn_handler_t *handler_obj;
3333

3434
int (*send_to_sock_cb)(int8_t socket_id, uint8_t address[static 16], uint16_t port, const void *, int);
35-
int (*receive_from_sock_cb)(int8_t socket_id, uint8_t src_address[static 16], uint16_t port, const uint8_t dst_address[static 16], unsigned char *data, int len);
35+
int (*receive_from_sock_cb)(int8_t socket_id, int8_t interface_id, uint8_t src_address[static 16], uint16_t port, const uint8_t dst_address[static 16], unsigned char *data, int len);
3636
int (*get_passwd_cb)(int8_t socket_id, uint8_t address[static 16], uint16_t port, coap_security_keys_t *security_ptr);
3737
void (*sec_done_cb)(int8_t socket_id, uint8_t address[static 16], uint16_t port, uint8_t keyblock[static 40]);
3838

test/coap-service/unittest/stub/coap_message_handler_stub.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@ coap_transaction_t *coap_message_handler_find_transaction(uint8_t *address_ptr,
5454
return coap_message_handler_stub.coap_tx_ptr;
5555
}
5656

57-
int16_t coap_message_handler_coap_msg_process(coap_msg_handler_t *handle, int8_t socket_id, const uint8_t source_addr_ptr[static 16], uint16_t port, const uint8_t dst_addr_ptr[static 16],
58-
uint8_t *data_ptr, uint16_t data_len, int16_t (cb)(int8_t, sn_coap_hdr_s *, coap_transaction_t *))
57+
int16_t coap_message_handler_coap_msg_process(coap_msg_handler_t *handle, int8_t socket_id, int8_t interface_id, const uint8_t source_addr_ptr[static 16], uint16_t port, const uint8_t dst_addr_ptr[static 16],
58+
uint8_t *data_ptr, uint16_t data_len, int16_t (cb)(int8_t, int8_t, sn_coap_hdr_s *, coap_transaction_t *))
5959
{
6060
coap_message_handler_stub.cb = cb;
6161
return coap_message_handler_stub.int16_value;

0 commit comments

Comments
 (0)