Files
oldlinux-files/Minix/2.0.0/fixes/fix-2
2024-02-19 00:21:39 -05:00

38 lines
1.0 KiB
Plaintext

This fix avoids a crash of the TCP/IP server if it is sent a huge "ping"
packet. This only works for Minix in 32-bit mode, because we simply
increase the number of buffers inside inet to allow it to handle a big
packet. 16-bit Minix can't have more buffers.
To apply this fix do the following as bin:
! cd /usr
! patch -p0 < "this-file"
And build a new kernel normally. You will find the original buf.c
file renamed to buf.c~ in src/inet/. You may wish to delete it
to clean things up.
Note that it is much quicker and easier to simple change "128" in "192"
in buf.c with an editor.
diff -c -r /save/std/2.0.0/src/inet/buf.c ./src/inet/buf.c
*** /save/std/2.0.0/src/inet/buf.c Fri Dec 29 18:08:10 1995
--- ./src/inet/buf.c Thu Oct 24 19:26:02 1996
***************
*** 20,26 ****
#define USE_MALLOCS 0
#ifndef BUF512_NR
! #define BUF512_NR (sizeof(int) == 2 ? 40 : 128)
#endif
#define ACC_NR 200
--- 20,26 ----
#define USE_MALLOCS 0
#ifndef BUF512_NR
! #define BUF512_NR (sizeof(int) == 2 ? 40 : 192)
#endif
#define ACC_NR 200