aboutsummaryrefslogtreecommitdiffstats
path: root/Demos/Device/ClassDriver/RNDISEthernet/Lib/UDP.c
diff options
context:
space:
mode:
Diffstat (limited to 'Demos/Device/ClassDriver/RNDISEthernet/Lib/UDP.c')
-rw-r--r--Demos/Device/ClassDriver/RNDISEthernet/Lib/UDP.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/Demos/Device/ClassDriver/RNDISEthernet/Lib/UDP.c b/Demos/Device/ClassDriver/RNDISEthernet/Lib/UDP.c
index dbd33d15d..ea679512b 100644
--- a/Demos/Device/ClassDriver/RNDISEthernet/Lib/UDP.c
+++ b/Demos/Device/ClassDriver/RNDISEthernet/Lib/UDP.c
@@ -55,12 +55,13 @@ int16_t UDP_ProcessUDPPacket(void* IPHeaderInStart, void* UDPHeaderInStart, void
DecodeUDPHeader(UDPHeaderInStart);
- /* Check to see if the UDP packet is a DHCP packet */
- if (SwapEndian_16(UDPHeaderIN->DestinationPort) == UDP_PORT_DHCP_REQUEST)
+ switch (SwapEndian_16(UDPHeaderIN->DestinationPort))
{
- RetSize = DHCP_ProcessDHCPPacket(IPHeaderInStart,
- &((uint8_t*)UDPHeaderInStart)[sizeof(UDP_Header_t)],
- &((uint8_t*)UDPHeaderOutStart)[sizeof(UDP_Header_t)]);
+ case UDP_PORT_DHCP_REQUEST:
+ RetSize = DHCP_ProcessDHCPPacket(IPHeaderInStart,
+ &((uint8_t*)UDPHeaderInStart)[sizeof(UDP_Header_t)],
+ &((uint8_t*)UDPHeaderOutStart)[sizeof(UDP_Header_t)]);
+ break;
}
/* Check to see if the protocol processing routine has filled out a response */