Skip to content

Commit 6a0ce66

Browse files
moninom1ActoryOuevpopovEmil Popov
authored
Fixes mDNS over IPv6 (FreeRTOS#977)
* Add more descriptions of ipconfigDRIVER_INCLUDED_RX_IP_CHECKSUM (FreeRTOS#947) * Fixes mDNS over IPv6. (FreeRTOS#949) Co-authored-by: Emil Popov <[email protected]> Co-authored-by: ActoryOu <[email protected]> Co-authored-by: Monika Singh <[email protected]> --------- Co-authored-by: ActoryOu <[email protected]> Co-authored-by: Emil Popov <[email protected]> Co-authored-by: Emil Popov <[email protected]>
1 parent 3210021 commit 6a0ce66

File tree

39 files changed

+89
-75
lines changed

39 files changed

+89
-75
lines changed

source/FreeRTOS_UDP_IPv6.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -608,6 +608,16 @@ BaseType_t xProcessReceivedUDPPacket_IPv6( NetworkBufferDescriptor_t * pxNetwork
608608
else
609609
#endif /* ipconfigUSE_LLMNR */
610610

611+
#if ( ipconfigUSE_DNS == 1 ) && ( ipconfigUSE_MDNS == 1 )
612+
/* A MDNS request, check for the destination port. */
613+
if( ( usPort == FreeRTOS_ntohs( ipMDNS_PORT ) ) ||
614+
( pxUDPPacket_IPv6->xUDPHeader.usSourcePort == FreeRTOS_ntohs( ipMDNS_PORT ) ) )
615+
{
616+
xReturn = ( BaseType_t ) ulDNSHandlePacket( pxNetworkBuffer );
617+
}
618+
else
619+
#endif /* ipconfigUSE_MDNS */
620+
611621
#if ( ipconfigUSE_NBNS == 1 )
612622
/* a NetBIOS request, check for the destination port */
613623
if( ( usPort == FreeRTOS_htons( ipNBNS_PORT ) ) ||

source/include/FreeRTOSIPConfigDefaults.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -978,7 +978,11 @@
978978

979979
/* When ipconfigDRIVER_INCLUDED_RX_IP_CHECKSUM is enabled,
980980
* the network interface is responsible for checking the checksums
981-
* of the incoming packets.
981+
* of the incoming packets. If hardware supports checking TCP checksum only,
982+
* the network interface layer should handle the same for other protocols,
983+
* such as IP/UDP/ICMP/etc, and give the checksum verified packets to the
984+
* FreeRTOS-plus-TCP stack.
985+
*
982986
* This can be either done in hardware, or by calling the checksum
983987
* functions.
984988
*/

test/Coverity/ConfigFiles/FreeRTOSIPConfig.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,8 @@
5959
* on). Valid options are pdFREERTOS_BIG_ENDIAN and pdFREERTOS_LITTLE_ENDIAN. */
6060
#define ipconfigBYTE_ORDER pdFREERTOS_LITTLE_ENDIAN
6161

62-
/* If the network card/driver includes checksum offloading (IP/TCP/UDP checksums)
63-
* then set ipconfigDRIVER_INCLUDED_RX_IP_CHECKSUM to 1 to prevent the software
62+
/* If the network card/driver includes checksum offloading then set
63+
* ipconfigDRIVER_INCLUDED_RX_IP_CHECKSUM to 1 to prevent the software
6464
* stack repeating the checksum calculations. */
6565
#define ipconfigDRIVER_INCLUDED_RX_IP_CHECKSUM 0
6666

test/build-combination/AllDisable/FreeRTOSIPConfig.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@
5555
* on). Valid options are pdFREERTOS_BIG_ENDIAN and pdFREERTOS_LITTLE_ENDIAN. */
5656
#define ipconfigBYTE_ORDER pdFREERTOS_LITTLE_ENDIAN
5757

58-
/* If the network card/driver includes checksum offloading (IP/TCP/UDP checksums)
59-
* then set ipconfigDRIVER_INCLUDED_RX_IP_CHECKSUM to 1 to prevent the software
58+
/* If the network card/driver includes checksum offloading then set
59+
* ipconfigDRIVER_INCLUDED_RX_IP_CHECKSUM to 1 to prevent the software
6060
* stack repeating the checksum calculations. */
6161
#define ipconfigDRIVER_INCLUDED_RX_IP_CHECKSUM 0
6262

test/build-combination/AllEnable/FreeRTOSIPConfig.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,8 @@
7878
* on). Valid options are pdFREERTOS_BIG_ENDIAN and pdFREERTOS_LITTLE_ENDIAN. */
7979
#define ipconfigBYTE_ORDER pdFREERTOS_LITTLE_ENDIAN
8080

81-
/* If the network card/driver includes checksum offloading (IP/TCP/UDP checksums)
82-
* then set ipconfigDRIVER_INCLUDED_RX_IP_CHECKSUM to 1 to prevent the software
81+
/* If the network card/driver includes checksum offloading then set
82+
* ipconfigDRIVER_INCLUDED_RX_IP_CHECKSUM to 1 to prevent the software
8383
* stack repeating the checksum calculations. */
8484
#define ipconfigDRIVER_INCLUDED_RX_IP_CHECKSUM 1
8585

test/build-combination/Enable_IPv4/FreeRTOSIPConfig.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,8 @@
8282
* on). Valid options are pdFREERTOS_BIG_ENDIAN and pdFREERTOS_LITTLE_ENDIAN. */
8383
#define ipconfigBYTE_ORDER pdFREERTOS_LITTLE_ENDIAN
8484

85-
/* If the network card/driver includes checksum offloading (IP/TCP/UDP checksums)
86-
* then set ipconfigDRIVER_INCLUDED_RX_IP_CHECKSUM to 1 to prevent the software
85+
/* If the network card/driver includes checksum offloading then set
86+
* ipconfigDRIVER_INCLUDED_RX_IP_CHECKSUM to 1 to prevent the software
8787
* stack repeating the checksum calculations. */
8888
#define ipconfigDRIVER_INCLUDED_RX_IP_CHECKSUM 1
8989

test/build-combination/Enable_IPv4_IPv6/FreeRTOSIPConfig.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,8 @@
8282
* on). Valid options are pdFREERTOS_BIG_ENDIAN and pdFREERTOS_LITTLE_ENDIAN. */
8383
#define ipconfigBYTE_ORDER pdFREERTOS_LITTLE_ENDIAN
8484

85-
/* If the network card/driver includes checksum offloading (IP/TCP/UDP checksums)
86-
* then set ipconfigDRIVER_INCLUDED_RX_IP_CHECKSUM to 1 to prevent the software
85+
/* If the network card/driver includes checksum offloading then set
86+
* ipconfigDRIVER_INCLUDED_RX_IP_CHECKSUM to 1 to prevent the software
8787
* stack repeating the checksum calculations. */
8888
#define ipconfigDRIVER_INCLUDED_RX_IP_CHECKSUM 1
8989

test/build-combination/Enable_IPv4_TCP/FreeRTOSIPConfig.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,8 @@
8282
* on). Valid options are pdFREERTOS_BIG_ENDIAN and pdFREERTOS_LITTLE_ENDIAN. */
8383
#define ipconfigBYTE_ORDER pdFREERTOS_LITTLE_ENDIAN
8484

85-
/* If the network card/driver includes checksum offloading (IP/TCP/UDP checksums)
86-
* then set ipconfigDRIVER_INCLUDED_RX_IP_CHECKSUM to 1 to prevent the software
85+
/* If the network card/driver includes checksum offloading then set
86+
* ipconfigDRIVER_INCLUDED_RX_IP_CHECKSUM to 1 to prevent the software
8787
* stack repeating the checksum calculations. */
8888
#define ipconfigDRIVER_INCLUDED_RX_IP_CHECKSUM 1
8989

test/build-combination/Enable_IPv6/FreeRTOSIPConfig.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,8 @@
8282
* on). Valid options are pdFREERTOS_BIG_ENDIAN and pdFREERTOS_LITTLE_ENDIAN. */
8383
#define ipconfigBYTE_ORDER pdFREERTOS_LITTLE_ENDIAN
8484

85-
/* If the network card/driver includes checksum offloading (IP/TCP/UDP checksums)
86-
* then set ipconfigDRIVER_INCLUDED_RX_IP_CHECKSUM to 1 to prevent the software
85+
/* If the network card/driver includes checksum offloading then set
86+
* ipconfigDRIVER_INCLUDED_RX_IP_CHECKSUM to 1 to prevent the software
8787
* stack repeating the checksum calculations. */
8888
#define ipconfigDRIVER_INCLUDED_RX_IP_CHECKSUM 1
8989

test/build-combination/Enable_IPv6_TCP/FreeRTOSIPConfig.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,8 @@
8282
* on). Valid options are pdFREERTOS_BIG_ENDIAN and pdFREERTOS_LITTLE_ENDIAN. */
8383
#define ipconfigBYTE_ORDER pdFREERTOS_LITTLE_ENDIAN
8484

85-
/* If the network card/driver includes checksum offloading (IP/TCP/UDP checksums)
86-
* then set ipconfigDRIVER_INCLUDED_RX_IP_CHECKSUM to 1 to prevent the software
85+
/* If the network card/driver includes checksum offloading then set
86+
* ipconfigDRIVER_INCLUDED_RX_IP_CHECKSUM to 1 to prevent the software
8787
* stack repeating the checksum calculations. */
8888
#define ipconfigDRIVER_INCLUDED_RX_IP_CHECKSUM 1
8989

0 commit comments

Comments
 (0)