mirror of
https://gitlab.isc.org/isc-projects/dhcp
synced 2025-09-03 15:56:00 +00:00
Slightly less gnarly MTU
This commit is contained in:
@@ -155,7 +155,7 @@ void listen_on (port, address)
|
|||||||
sockets = tmp;
|
sockets = tmp;
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned char packbuf [65536]; /* Should cover the gnarliest MTU... */
|
unsigned char packbuf [4095]; /* Should cover the gnarliest MTU... */
|
||||||
|
|
||||||
void dispatch ()
|
void dispatch ()
|
||||||
{
|
{
|
||||||
@@ -208,6 +208,7 @@ void dispatch ()
|
|||||||
htons (from.sin_port));
|
htons (from.sin_port));
|
||||||
ifrom.len = 4;
|
ifrom.len = 4;
|
||||||
memcpy (ifrom.iabuf, &from.sin_addr, ifrom.len);
|
memcpy (ifrom.iabuf, &from.sin_addr, ifrom.len);
|
||||||
|
|
||||||
do_packet (packbuf, result, from.sin_port,
|
do_packet (packbuf, result, from.sin_port,
|
||||||
ifrom, l -> sock);
|
ifrom, l -> sock);
|
||||||
}
|
}
|
||||||
|
3
socket.c
3
socket.c
@@ -155,7 +155,7 @@ void listen_on (port, address)
|
|||||||
sockets = tmp;
|
sockets = tmp;
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned char packbuf [65536]; /* Should cover the gnarliest MTU... */
|
unsigned char packbuf [4095]; /* Should cover the gnarliest MTU... */
|
||||||
|
|
||||||
void dispatch ()
|
void dispatch ()
|
||||||
{
|
{
|
||||||
@@ -208,6 +208,7 @@ void dispatch ()
|
|||||||
htons (from.sin_port));
|
htons (from.sin_port));
|
||||||
ifrom.len = 4;
|
ifrom.len = 4;
|
||||||
memcpy (ifrom.iabuf, &from.sin_addr, ifrom.len);
|
memcpy (ifrom.iabuf, &from.sin_addr, ifrom.len);
|
||||||
|
|
||||||
do_packet (packbuf, result, from.sin_port,
|
do_packet (packbuf, result, from.sin_port,
|
||||||
ifrom, l -> sock);
|
ifrom, l -> sock);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user