2
0
mirror of https://gitlab.isc.org/isc-projects/dhcp synced 2025-08-31 06:15:55 +00:00

More portable internet addresses; fix endian bug; fix parser bugs

This commit is contained in:
Ted Lemon
1996-02-06 20:25:56 +00:00
parent bbeaeedce3
commit 089fb364df
35 changed files with 1283 additions and 696 deletions

View File

@@ -159,6 +159,7 @@ unsigned char packbuf [65536]; /* Should cover the gnarliest MTU... */
void dispatch ()
{
struct sockaddr_in from;
struct iaddr ifrom;
int fromlen = sizeof from;
fd_set r, w, x;
struct socklist *l;
@@ -201,7 +202,10 @@ void dispatch ()
note ("request from %s, port %d",
inet_ntoa (from.sin_addr),
htons (from.sin_port));
do_packet (packbuf, result, &from, fromlen, l -> sock);
ifrom.len = 4;
memcpy (ifrom.iabuf, &from.sin_addr, ifrom.len);
do_packet (packbuf, result, from.sin_port,
ifrom, l -> sock);
}
} while (1);
}