Skip to content

Commit

Permalink
Update on 23 Oct 2023. Expand to see details.
Browse files Browse the repository at this point in the history
002a5890e Generated rtxp demo in netxduo/samples folder.
c09d9da51 Add function header in .h for RTP and RTSP
f5a96f35b Update function header and version for 6.3.0
0ff7a6809 Correct dhcpv6 server for ignoring lifetime fields in client request
9a2129c35 Fixed dhcpv6 server not update client record issue
e59d2b5f1 Fix dhcp coverage test compile wanrning
d00655d71 Fix infinite loop issue in TCP & UDP free port find function
c194c74ca Optimize rtp_sender and fix pipeline reported issues
b6df8dea0 Add RTxP feature
38e57e633 Added test case for _nx_snmp_utility_object_id_get().
321c88bd9 Added check for pdu length.
36ffb7c39 Fixed packet double release.
92166d736 Fixed SNMP test cases for v4_small_build
67f071552 Improved buffer length verification for padding.
30cc5d8b2 Fix wait option used in FTP test case
098a97213 Avoid duplicate packet release when DTLS send fails
15313e868 Improved buffer length verification for _nx_snmp_utility_object_id_set().
ecd3904d3 Fixed MSRC 81018
caa004007 Fix the logic of handling close notify packet from peer
2b8c87685 Removed main.c into netxduo/samples folder, then all addons can use it.
c72c66cdc Fixed MSARC 81019 and MSRC 81079
8169be7a6 Fixed MSRC81005 and MSRC81020
41389b76b Fixed packet double release issue in _nx_ftp_client_file_write
19348e408 Combined the functions of processing snmp v1 and v2.
9174b6457 Fixed icmpv6 ra buffer overwrite test case.
6bdc703d9 Fixed packet double release issue in _nx_nat_process_packet
403ecd128 Set nx_smtp_server_packet to NULL to avoided duplicate packet release in _nx_smtp_utility_read_server_code
af5dd00c6 Disable FTP server MSS test case when packet chain is disabled
beadbce12 Enable weekly pipeline build to avoid CodeQL expiration
5a3d88f97 Fixed MSRC 81528
df6a1fc57 unify the code.
18c13bfdb Fixed MSRC 80745.
2cce43f48 Fixed bug in utility/iperf/nx_iperf.c pointer used before set its value.
2477fb81c Update product owners
2f5734ada Fixed MSRC 80686
34e713e26 Fixed data length underflow when TCP MSS is less than 255
7097a7859 Improved the test cases for packet chain.
1ffa13cfa Fixed MSRC 80685
97e2b8d8e Set packet pointer to NULL after released to fix duplicate packet release issue
c1e47efa7 Fix ICMPv6 NS buffer overwrite issue.
c2770ea68 Add ICMPv6 NA buffer overwrite test case.
36bb05f85 Validated TCP header buffer to avoid span in multiple packets
84070bb2a Correct the length of packet buffer to avoid write overflow
5b3b3a10b Dropped packet chain for SNTP data to avoid write overflow
82699872d Onebranch build Image Update: Move pipelines to supported and compliant OneBranch container images
a30171f93 Add a test case to demonstrate IGMP override caused by IP assembly.
72472ff4b Fix MSRC 80746
5d9f1266a Corrected the acked packet count when out of order is enabled
b113ebdc9 Fixed DHCP server local variable type issue
b70863299 Enable codeql in onebranch pipeline
  • Loading branch information
TiejunMS committed Oct 23, 2023
1 parent b53390f commit 531239b
Show file tree
Hide file tree
Showing 138 changed files with 14,003 additions and 3,801 deletions.
220 changes: 110 additions & 110 deletions addons/BSD/nxd_bsd.c

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions addons/BSD/nxd_bsd.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
/* BSD DEFINITIONS RELEASE */
/* */
/* nxd_bsd.h PORTABLE C */
/* 6.x */
/* 6.3.0 */
/* AUTHOR */
/* */
/* Yuxin Zhou, Microsoft Corporation */
Expand All @@ -50,10 +50,10 @@
/* defined IP protocols for */
/* ICMP, IGMP and ICMPv6, */
/* resulting in version 6.1.9 */
/* xx-xx-xxxx Chaoqiong Xiao Modified comment(s), and */
/* 10-31-2023 Chaoqiong Xiao Modified comment(s), and */
/* added option to enable */
/* native APIs with prefix, */
/* resulting in version 6.x */
/* resulting in version 6.3.0 */
/* */
/**************************************************************************/

Expand Down
4 changes: 4 additions & 0 deletions addons/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ set(SOURCES
${CMAKE_CURRENT_LIST_DIR}/web/nx_web_http_client.c
${CMAKE_CURRENT_LIST_DIR}/web/nx_web_http_server.c
${CMAKE_CURRENT_LIST_DIR}/websocket/nx_websocket_client.c
${CMAKE_CURRENT_LIST_DIR}/rtp/nx_rtp_sender.c
${CMAKE_CURRENT_LIST_DIR}/rtsp/nx_rtsp_server.c

# {{END_TARGET_SOURCES}}
)
Expand Down Expand Up @@ -105,4 +107,6 @@ target_include_directories(${PROJECT_NAME} PUBLIC
${CMAKE_CURRENT_LIST_DIR}/tftp
${CMAKE_CURRENT_LIST_DIR}/web
${CMAKE_CURRENT_LIST_DIR}/websocket
${CMAKE_CURRENT_LIST_DIR}/rtp
${CMAKE_CURRENT_LIST_DIR}/rtsp
)
6 changes: 3 additions & 3 deletions addons/azure_iot/samples/sample_azure_iot_embedded_sdk.c
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ static TX_THREAD sample_device_twin_thread;
static ULONG sample_device_twin_thread_stack[SAMPLE_STACK_SIZE / sizeof(ULONG)];
#endif /* DISABLE_DEVICE_TWIN_SAMPLE */

void sample_entry(NX_IP *ip_ptr, NX_PACKET_POOL *pool_ptr, NX_DNS *dns_ptr, UINT (*unix_time_callback)(ULONG *unix_time));
void sample_entry(NX_IP *ip_ptr, NX_PACKET_POOL *pool_ptr, VOID *dns_ptr, UINT (*unix_time_callback)(ULONG *unix_time));
#ifdef ENABLE_DPS_SAMPLE
static UINT sample_dps_entry(UCHAR **iothub_hostname, UINT *iothub_hostname_length,
UCHAR **iothub_device_id, UINT *iothub_device_id_length);
Expand Down Expand Up @@ -283,15 +283,15 @@ static void log_callback(az_log_classification classification, UCHAR *msg, UINT
}
}

void sample_entry(NX_IP *ip_ptr, NX_PACKET_POOL *pool_ptr, NX_DNS *dns_ptr, UINT (*unix_time_callback)(ULONG *unix_time))
void sample_entry(NX_IP *ip_ptr, NX_PACKET_POOL *pool_ptr, VOID *dns_ptr, UINT (*unix_time_callback)(ULONG *unix_time))
{
UINT status = 0;
UINT loop = NX_TRUE;

nx_azure_iot_log_init(log_callback);

/* Create Azure IoT handler. */
if ((status = nx_azure_iot_create(&nx_azure_iot, (UCHAR *)"Azure IoT", ip_ptr, pool_ptr, dns_ptr,
if ((status = nx_azure_iot_create(&nx_azure_iot, (UCHAR *)"Azure IoT", ip_ptr, pool_ptr, (NX_DNS *)dns_ptr,
nx_azure_iot_thread_stack, sizeof(nx_azure_iot_thread_stack),
NX_AZURE_IOT_THREAD_PRIORITY, unix_time_callback)))
{
Expand Down
6 changes: 3 additions & 3 deletions addons/azure_iot/samples/sample_azure_iot_embedded_sdk_pnp.c
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ static SAMPLE_CLIENT client;
#define prov_client client.prov_client
#endif /* ENABLE_DPS_SAMPLE */

void sample_entry(NX_IP *ip_ptr, NX_PACKET_POOL *pool_ptr, NX_DNS *dns_ptr, UINT (*unix_time_callback)(ULONG *unix_time));
void sample_entry(NX_IP *ip_ptr, NX_PACKET_POOL *pool_ptr, VOID *dns_ptr, UINT (*unix_time_callback)(ULONG *unix_time));

#ifdef ENABLE_DPS_SAMPLE
static UINT sample_dps_entry(NX_AZURE_IOT_PROVISIONING_CLIENT *prov_client_ptr,
Expand Down Expand Up @@ -984,7 +984,7 @@ static void log_callback(az_log_classification classification, UCHAR *msg, UINT
}
}

void sample_entry(NX_IP *ip_ptr, NX_PACKET_POOL *pool_ptr, NX_DNS *dns_ptr, UINT (*unix_time_callback)(ULONG *unix_time))
void sample_entry(NX_IP *ip_ptr, NX_PACKET_POOL *pool_ptr, VOID *dns_ptr, UINT (*unix_time_callback)(ULONG *unix_time))
{
UINT status = 0;
UINT loop = NX_TRUE;
Expand All @@ -993,7 +993,7 @@ ULONG app_events;
nx_azure_iot_log_init(log_callback);

/* Create Azure IoT handler. */
if ((status = nx_azure_iot_create(&nx_azure_iot, (UCHAR *)"Azure IoT", ip_ptr, pool_ptr, dns_ptr,
if ((status = nx_azure_iot_create(&nx_azure_iot, (UCHAR *)"Azure IoT", ip_ptr, pool_ptr, (NX_DNS *)dns_ptr,
nx_azure_iot_thread_stack, sizeof(nx_azure_iot_thread_stack),
NX_AZURE_IOT_THREAD_PRIORITY, unix_time_callback)))
{
Expand Down
12 changes: 6 additions & 6 deletions addons/dhcp/nxd_dhcp_client.c
Original file line number Diff line number Diff line change
Expand Up @@ -3552,7 +3552,7 @@ NX_DHCP_INTERFACE_RECORD *interface_record = NX_NULL;
/* FUNCTION RELEASE */
/* */
/* _nxe_dhcp_state_change_notify PORTABLE C */
/* 6.x */
/* 6.3.0 */
/* AUTHOR */
/* */
/* Yuxin Zhou, Microsoft Corporation */
Expand Down Expand Up @@ -3586,9 +3586,9 @@ NX_DHCP_INTERFACE_RECORD *interface_record = NX_NULL;
/* 05-19-2020 Yuxin Zhou Initial Version 6.0 */
/* 09-30-2020 Yuxin Zhou Modified comment(s), */
/* resulting in version 6.1 */
/* xx-xx-xxxx Haiqing Zhao Modified comment(s), and */
/* 10-31-2023 Haiqing Zhao Modified comment(s), and */
/* corrected caller checking, */
/* resulting in version 6.x */
/* resulting in version 6.3.0 */
/* */
/**************************************************************************/
UINT _nxe_dhcp_state_change_notify(NX_DHCP *dhcp_ptr, VOID (*dhcp_state_change_notify)(NX_DHCP *dhcp_ptr, UCHAR new_state))
Expand Down Expand Up @@ -6995,7 +6995,7 @@ UINT name_length;
/* FUNCTION RELEASE */
/* */
/* _nx_dhcp_client_send_with_zero_source_address PORTABLE C */
/* 6.x */
/* 6.3.0 */
/* AUTHOR */
/* */
/* Yuxin Zhou, Microsoft Corporation */
Expand Down Expand Up @@ -7042,9 +7042,9 @@ UINT name_length;
/* udp socket send and ip */
/* header add, */
/* resulting in version 6.1.12 */
/* xx-xx-xxxx Tiejun Zhou Modified comment(s), */
/* 10-31-2023 Tiejun Zhou Modified comment(s), */
/* supported random IP id, */
/* resulting in version 6.x */
/* resulting in version 6.3.0 */
/* */
/**************************************************************************/
static UINT _nx_dhcp_client_send_with_zero_source_address(NX_DHCP *dhcp_ptr, UINT iface_index, NX_PACKET *packet_ptr)
Expand Down
25 changes: 16 additions & 9 deletions addons/dhcp/nxd_dhcp_server.c
Original file line number Diff line number Diff line change
Expand Up @@ -2669,7 +2669,7 @@ CHAR *buffer;
/* FUNCTION RELEASE */
/* */
/* _nx_dhcp_server_packet_process PORTABLE C */
/* 6.1 */
/* 6.3.0 */
/* AUTHOR */
/* */
/* Yuxin Zhou, Microsoft Corporation */
Expand Down Expand Up @@ -2714,6 +2714,10 @@ CHAR *buffer;
/* 05-19-2020 Yuxin Zhou Initial Version 6.0 */
/* 09-30-2020 Yuxin Zhou Modified comment(s), */
/* resulting in version 6.1 */
/* 10-31-2023 Bo Chen Modified comment(s), corrected*/
/* the logic of verifying the */
/* incoming packet length, */
/* resulting in version 6.3.0 */
/* */
/**************************************************************************/
static UINT _nx_dhcp_server_packet_process(NX_DHCP_SERVER *dhcp_ptr, NX_PACKET *packet_ptr)
Expand Down Expand Up @@ -2778,6 +2782,10 @@ ULONG offset;
return(status);
}

/* Update the prepend pointer to make sure that the IP header and UDP header also are copied into new packet. */
packet_ptr -> nx_packet_prepend_ptr -= 28;
packet_ptr -> nx_packet_length += 28;

/* Verify the incoming packet does not exceed our DHCP Server packet payload. */
if ((ULONG)(new_packet_ptr -> nx_packet_data_end - new_packet_ptr -> nx_packet_prepend_ptr) < (packet_ptr -> nx_packet_length))
{
Expand All @@ -2790,10 +2798,6 @@ ULONG offset;

return(NX_DHCP_INADEQUATE_PACKET_POOL_PAYLOAD);
}

/* Update the prepend pointer to make sure that the IP header and UDP header also are copied into new packet. */
packet_ptr -> nx_packet_prepend_ptr -= 28;
packet_ptr -> nx_packet_length += 28;

/* Initialize the offset to the beginning of the packet buffer. */
offset = 0;
Expand Down Expand Up @@ -4812,7 +4816,7 @@ UINT lease_time;
/* FUNCTION RELEASE */
/* */
/* _nx_dhcp_server_extract_information PORTABLE C */
/* 6.1 */
/* 6.3.0 */
/* AUTHOR */
/* */
/* Yuxin Zhou, Microsoft Corporation */
Expand Down Expand Up @@ -4865,6 +4869,9 @@ UINT lease_time;
/* and write overflow, */
/* fixed compiler warnings, */
/* resulting in version 6.1 */
/* 10-31-2023 Haiqing Zhao Modified comment(s), and */
/* improved internal logic, */
/* resulting in version 6.3.0 */
/* */
/**************************************************************************/
static UINT _nx_dhcp_server_extract_information(NX_DHCP_SERVER *dhcp_ptr, NX_DHCP_CLIENT **dhcp_client_ptr,
Expand All @@ -4873,7 +4880,7 @@ static UINT _nx_dhcp_server_extract_information(NX_DHCP_SERVER *dhcp_ptr, NX_DH

UINT status;
ULONG value;
UINT size = 0;
ULONG size = 0;
ULONG xid;
UCHAR *work_ptr;
ULONG client_mac_msw;
Expand Down Expand Up @@ -5063,7 +5070,7 @@ NX_DHCP_CLIENT *temp_client_rec_ptr;
work_ptr++;

/* Get the option length. */
_nx_dhcp_server_get_data(work_ptr, 1, (ULONG *)&size);
_nx_dhcp_server_get_data(work_ptr, 1, &size);

/* Move up the buffer pointer to the next option. */
work_ptr++;
Expand All @@ -5083,7 +5090,7 @@ NX_DHCP_CLIENT *temp_client_rec_ptr;
{

/* Process as any other option. */
_nx_dhcp_process_option_data(temp_client_rec_ptr, (CHAR *)work_ptr, (UCHAR)value, NX_TRUE, size);
_nx_dhcp_process_option_data(temp_client_rec_ptr, (CHAR *)work_ptr, (UCHAR)value, NX_TRUE, (UINT)size);
}
}

Expand Down
Loading

0 comments on commit 531239b

Please sign in to comment.