diff options
| author | Michael Brown | 2008-05-19 17:19:46 +0200 |
|---|---|---|
| committer | Michael Brown | 2008-05-19 17:19:46 +0200 |
| commit | 1dcc60e5ad4fe9653035282615e780c0bf64ce9e (patch) | |
| tree | 1ee0e4b3e1aa2c4f17e1fe031bdac09a1b42e18c /src | |
| parent | [iSCSI] Offer CHAP authentication only if we have a username and password (diff) | |
| download | ipxe-1dcc60e5ad4fe9653035282615e780c0bf64ce9e.tar.gz ipxe-1dcc60e5ad4fe9653035282615e780c0bf64ce9e.tar.xz ipxe-1dcc60e5ad4fe9653035282615e780c0bf64ce9e.zip | |
[IPv4] Fix multicast address checking
From: Viswanath Krishnamurthy <viswa.krish@gmail.com>
The current ipv4 incorrectly checks the IP address for multicast address.
This causes valid IPv4 unicast address to be trated as multicast address
For e.g if the PXE/tftp server IP address is 192.168.4.XXX where XXX is
224 or greater, it gets treated as multicast address and a ethernet
multicast address is sent out on the wire causing timeouts
Diffstat (limited to 'src')
| -rw-r--r-- | src/net/ipv4.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/net/ipv4.c b/src/net/ipv4.c index 591293b7f..82a13c334 100644 --- a/src/net/ipv4.c +++ b/src/net/ipv4.c @@ -273,7 +273,7 @@ static int ipv4_ll_addr ( struct in_addr dest, struct in_addr src, memcpy ( ll_dest, ll_protocol->ll_broadcast, ll_protocol->ll_addr_len ); return 0; - } else if ( IN_MULTICAST ( dest.s_addr ) ) { + } else if ( IN_MULTICAST ( ntohl ( dest.s_addr ) ) ) { /* Special case: IPv4 multicast over Ethernet. This * code may need to be generalised once we find out * what happens for other link layers. |
