Skip to content
Merged
Show file tree
Hide file tree
Changes from 10 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/.cSpellWords.txt
Original file line number Diff line number Diff line change
Expand Up @@ -810,6 +810,7 @@ NCARR
NCFGR
NCONFIG
NCPDT
neighbours
Netif
Nett
netto
Expand Down Expand Up @@ -1360,6 +1361,7 @@ THALT
THRES
tiarmclang
TIDM
TLLA
tmout
TMXBFR
totalappdescnbr
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ jobs:
uses: FreeRTOS/CI-CD-Github-Actions/formatting@main
with:
path: ./
exclude-dirs: source/portable/NetworkInterface/STM32
exclude-dirs: source/portable/NetworkInterface/STM32, test/integration-test/ndp

doxygen:
runs-on: ubuntu-latest
Expand Down
16 changes: 8 additions & 8 deletions source/FreeRTOS_DHCP.c
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
_static Socket_t xDHCPv4Socket;

#if ( ipconfigDHCP_FALL_BACK_AUTO_IP != 0 )
/* Define the Link Layer IP address: 169.254.x.x */
/* Define the Link Layer IP address: 169.254.x.x */

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit (suggestion): We should probably not add formatting changes to the PR

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That won't work. We enforce formatting on each PR.

#define LINK_LAYER_ADDRESS_0 169
#define LINK_LAYER_ADDRESS_1 254

Expand Down Expand Up @@ -170,7 +170,7 @@

return xReturn;
}
/*-----------------------------------------------------------*/
/*-----------------------------------------------------------*/


/**
Expand Down Expand Up @@ -880,7 +880,7 @@
( xDHCPv4Socket != NULL ) ? "open" : "closed",
( int ) xDHCPSocketUserCount ) );
}
/*-----------------------------------------------------------*/
/*-----------------------------------------------------------*/

/**
* @brief Create a DHCP socket with the defined timeouts. The same socket
Expand Down Expand Up @@ -948,7 +948,7 @@
( xDHCPv4Socket != NULL ) ? "open" : "closed",
( int ) xDHCPSocketUserCount ) );
}
/*-----------------------------------------------------------*/
/*-----------------------------------------------------------*/

/**
* @brief Initialise the DHCP state machine by creating DHCP socket and
Expand Down Expand Up @@ -1375,7 +1375,7 @@

return xReturn;
}
/*-----------------------------------------------------------*/
/*-----------------------------------------------------------*/

/**
* @brief Create a partial DHCP message by filling in all the 'constant' fields.
Expand Down Expand Up @@ -1504,7 +1504,7 @@

return pucUDPPayloadBuffer;
}
/*-----------------------------------------------------------*/
/*-----------------------------------------------------------*/

/**
* @brief Create and send a DHCP request message through the DHCP socket.
Expand Down Expand Up @@ -1577,7 +1577,7 @@

return xResult;
}
/*-----------------------------------------------------------*/
/*-----------------------------------------------------------*/

/**
* @brief Create and send a DHCP discover packet through the DHCP socket.
Expand Down Expand Up @@ -1662,7 +1662,7 @@

return xResult;
}
/*-----------------------------------------------------------*/
/*-----------------------------------------------------------*/


#if ( ipconfigDHCP_FALL_BACK_AUTO_IP != 0 )
Expand Down
4 changes: 2 additions & 2 deletions source/FreeRTOS_DHCPv6.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,9 @@

/* Timer parameters */
#ifndef dhcpINITIAL_DHCP_TX_PERIOD
/** @brief DHCP timer period in ms */
/** @brief DHCP timer period in ms */
#define dhcpINITIAL_TIMER_PERIOD ( pdMS_TO_TICKS( 250U ) )
/** @brief DHCP transmit period in ms */
/** @brief DHCP transmit period in ms */
#define dhcpINITIAL_DHCP_TX_PERIOD ( pdMS_TO_TICKS( 5000U ) )
#endif

Expand Down
16 changes: 8 additions & 8 deletions source/FreeRTOS_DNS.c
Original file line number Diff line number Diff line change
Expand Up @@ -689,7 +689,7 @@ const MACAddress_t xMDNS_MacAddressIPv6 = { { 0x33, 0x33, 0x00, 0x00, 0x00, 0xFB
( xFamily == FREERTOS_AF_INET6 ) ? pdTRUE : pdFALSE );
}
}
else /* When ipconfigDNS_USE_CALLBACKS enabled, ppxAddressInfo is always non null. */
else /* When ipconfigDNS_USE_CALLBACKS enabled, ppxAddressInfo is always non null. */
{
/* The IP address is known, do the call-back now. */
pCallbackFunction( pcHostName, pvSearchID, *( ppxAddressInfo ) );
Expand All @@ -716,7 +716,7 @@ const MACAddress_t xMDNS_MacAddressIPv6 = { { 0x33, 0x33, 0x00, 0x00, 0x00, 0xFB

return ulIPAddress;
}
/*-----------------------------------------------------------*/
/*-----------------------------------------------------------*/

#if ( ipconfigUSE_IPv6 != 0 )

Expand Down Expand Up @@ -898,7 +898,7 @@ const MACAddress_t xMDNS_MacAddressIPv6 = { { 0x33, 0x33, 0x00, 0x00, 0x00, 0xFB
{
#if ( ipconfigUSE_IPv4 != 0 )
case xPreferenceIPv4:
pxAddress->sin_address.ulIP_IPv4 = ipMDNS_IP_ADDRESS; /* Is in network byte order. */
pxAddress->sin_address.ulIP_IPv4 = ipMDNS_IP_ADDRESS; /* Is in network byte order. */
/* sin_family is default set to FREERTOS_AF_INET */
break;
#endif /* ( ipconfigUSE_IPv4 != 0 ) */
Expand Down Expand Up @@ -933,7 +933,7 @@ const MACAddress_t xMDNS_MacAddressIPv6 = { { 0x33, 0x33, 0x00, 0x00, 0x00, 0xFB
{
#if ( ipconfigUSE_IPv4 != 0 )
case xPreferenceIPv4:
pxAddress->sin_address.ulIP_IPv4 = ipLLMNR_IP_ADDR; /* Is in network byte order. */
pxAddress->sin_address.ulIP_IPv4 = ipLLMNR_IP_ADDR; /* Is in network byte order. */
pxAddress->sin_family = FREERTOS_AF_INET;
break;
#endif /* ( ipconfigUSE_IPv4 != 0 ) */
Expand Down Expand Up @@ -1073,7 +1073,7 @@ const MACAddress_t xMDNS_MacAddressIPv6 = { { 0x33, 0x33, 0x00, 0x00, 0x00, 0xFB
uint16_t usPort )
{
uint32_t ulIPAddress = 0U;
BaseType_t xExpected;
BaseType_t xExpected = pdFALSE;
Comment thread
AniruddhaKanhere marked this conversation as resolved.
Resolved

/* MISRA Ref 11.3.1 [Misaligned access] */
/* More details at: https://github.com/FreeRTOS/FreeRTOS-Plus-TCP/blob/main/MISRA.md#rule-113 */
Expand All @@ -1082,7 +1082,7 @@ const MACAddress_t xMDNS_MacAddressIPv6 = { { 0x33, 0x33, 0x00, 0x00, 0x00, 0xFB

#if ( ipconfigUSE_MDNS == 1 )
/* _HT_ changed 'pxReceiveBuffer->sin_port' to 'usPort' */
if( FreeRTOS_ntohs( usPort ) == ipMDNS_PORT ) /* mDNS port 5353. */
if( FreeRTOS_ntohs( usPort ) == ipMDNS_PORT ) /* mDNS port 5353. */
{
/* In mDNS, the query ID field is ignored. */
xExpected = pdTRUE;
Expand Down Expand Up @@ -1447,7 +1447,7 @@ const MACAddress_t xMDNS_MacAddressIPv6 = { { 0x33, 0x33, 0x00, 0x00, 0x00, 0xFB

return ulIPAddress;
}
/*-----------------------------------------------------------*/
/*-----------------------------------------------------------*/

/**
* @brief Create the DNS message in the zero copy buffer passed in the first parameter.
Expand Down Expand Up @@ -1607,7 +1607,7 @@ const MACAddress_t xMDNS_MacAddressIPv6 = { { 0x33, 0x33, 0x00, 0x00, 0x00, 0xFB
/* The packet was not consumed. */
return pdFAIL;
}
/*-----------------------------------------------------------*/
/*-----------------------------------------------------------*/


#if ( ipconfigUSE_NBNS == 1 )
Expand Down
16 changes: 11 additions & 5 deletions source/FreeRTOS_IP.c
Original file line number Diff line number Diff line change
Expand Up @@ -1823,17 +1823,24 @@ static void prvProcessEthernetPacket( NetworkBufferDescriptor_t * const pxNetwor
#if ipconfigIS_ENABLED( ipconfigUSE_IPv6 )
if( pxNDWaitingNetworkBuffer == NULL )
{
const IPPacket_IPv6_t * pxIPPacket = ( const IPPacket_IPv6_t * ) pxNetworkBuffer->pucEthernetBuffer;
memcpy( pxNetworkBuffer->xIPAddress.xIP_IPv6.ucBytes,
pxIPPacket->xIPHeader.xSourceAddress.ucBytes,
ipSIZE_OF_IPv6_ADDRESS );

FreeRTOS_debug_printf( ( "pxNDWaitingNetworkBuffer: Storing packet from %pip\n",
pxNetworkBuffer->xIPAddress.xIP_IPv6.ucBytes ) );
pxNDWaitingNetworkBuffer = pxNetworkBuffer;
vIPTimerStartNDResolution( ipND_RESOLUTION_MAX_DELAY );

FreeRTOS_debug_printf( ( "NDBuffer: = %pip\n", pxNDWaitingNetworkBuffer->xIPAddress.xIP_IPv6.ucBytes ) );
iptraceDELAYED_ND_REQUEST_STARTED();
}
else
#endif /* if ipconfigIS_ENABLED( ipconfigUSE_IPv6 ) */
{
/* We are already waiting on one resolution. This frame will be dropped. */
vReleaseNetworkBufferAndDescriptor( pxNetworkBuffer );

FreeRTOS_debug_printf( ( "NDBuffer: = full/release\n" ) );
iptraceDELAYED_ND_BUFFER_FULL();
}

Expand Down Expand Up @@ -2131,7 +2138,8 @@ static eFrameProcessingResult_t prvProcessIPPacket( const IPPacket_t * pxIPPacke
{
#if ( ipconfigUSE_IPv6 != 0 )
case ipIPv6_FRAME_TYPE:
vNDRefreshCacheEntry( &( pxIPPacket->xEthernetHeader.xSourceAddress ), &( pxIPHeader_IPv6->xSourceAddress ), pxNetworkBuffer->pxEndPoint );
vNDRefreshCacheEntryAge( &( pxIPPacket->xEthernetHeader.xSourceAddress ),
&( pxIPHeader_IPv6->xSourceAddress ) );
break;
#endif /* ( ipconfigUSE_IPv6 != 0 ) */

Expand Down Expand Up @@ -2163,9 +2171,7 @@ static eFrameProcessingResult_t prvProcessIPPacket( const IPPacket_t * pxIPPacke
* went wrong because it will not be able to validate what it
* receives. */
#if ( ipconfigREPLY_TO_INCOMING_PINGS == 1 ) || ( ipconfigSUPPORT_OUTGOING_PINGS == 1 )
{
eReturn = ProcessICMPPacket( pxNetworkBuffer );
}
#endif /* ( ipconfigREPLY_TO_INCOMING_PINGS == 1 ) || ( ipconfigSUPPORT_OUTGOING_PINGS == 1 ) */
break;
#endif /* ( ipconfigUSE_IPv4 != 0 ) */
Expand Down
5 changes: 4 additions & 1 deletion source/FreeRTOS_IP_Timers.c
Original file line number Diff line number Diff line change
Expand Up @@ -694,7 +694,10 @@ static BaseType_t prvIPTimerCheck( IPTimer_t * pxTimer )
void vIPSetDHCP_RATimerEnableState( NetworkEndPoint_t * pxEndPoint,
BaseType_t xEnableState )
{
FreeRTOS_printf( ( "vIPSetDHCP_RATimerEnableState: %s\n", ( xEnableState != 0 ) ? "On" : "Off" ) );
if( ( xEnableState != 0 ) && ( pxEndPoint->xDHCP_RATimer.bActive != 0 ) )
{
FreeRTOS_printf( ( "vIPSetDHCP_RATimerEnableState: %s\n", ( xEnableState != 0 ) ? "On" : "Off" ) );
Comment thread
AniruddhaKanhere marked this conversation as resolved.
Resolved
}

/* 'xDHCP_RATimer' is shared between DHCP (IPv4) and RA/SLAAC (IPv6). */
if( xEnableState != 0 )
Expand Down
Loading
Loading