diff -urN linux-2.5.6/drivers/net/Config.help linux/drivers/net/Config.help --- linux-2.5.6/drivers/net/Config.help Thu Mar 7 21:18:07 2002 +++ linux/drivers/net/Config.help Sun Mar 10 13:14:14 2002 @@ -433,6 +433,19 @@ If you don't know what to use this for, you don't need it. +CONFIG_NET_RANDOM + If you say Y here, network device interrupts will contribute to the + kernel entropy pool. Normally, block devices and some other devices + feed the pool. Some systems, such as those that are headless or diskless, + need additional entropy sources. Some people, however, feel that network + devices should not contribute to /dev/random because an external attacker + could observe incoming packets in an attempt to learn the entropy pool's + state. If you say N, no network device will contribute entropy. + + If you believe there is a chance of your network packets being observed + and you doubt the security of the entropy pool's one-way hash, do not + enable this. If unsure, say N. + CONFIG_ETHERTAP If you say Y here (and have said Y to "Kernel/User network link driver", above) and create a character special file /dev/tap0 with diff -urN linux-2.5.6/drivers/net/Config.in linux/drivers/net/Config.in --- linux-2.5.6/drivers/net/Config.in Thu Mar 7 21:18:08 2002 +++ linux/drivers/net/Config.in Sun Mar 10 13:14:14 2002 @@ -9,6 +9,7 @@ tristate 'Bonding driver support' CONFIG_BONDING tristate 'EQL (serial line load balancing) support' CONFIG_EQUALIZER tristate 'Universal TUN/TAP device driver support' CONFIG_TUN +bool 'Allow Net Devices to contribute to /dev/random' CONFIG_NET_RANDOM if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then tristate 'Ethertap network tap (OBSOLETE)' CONFIG_ETHERTAP fi diff -urN linux-2.5.6/include/asm-alpha/signal.h linux/include/asm-alpha/signal.h --- linux-2.5.6/include/asm-alpha/signal.h Thu Mar 7 21:18:36 2002 +++ linux/include/asm-alpha/signal.h Sun Mar 10 13:14:14 2002 @@ -121,8 +121,15 @@ #define SA_PROBE SA_ONESHOT #define SA_SAMPLE_RANDOM SA_RESTART #define SA_SHIRQ 0x40000000 + +#ifdef CONFIG_NET_RANDOM +#define SA_NET_RANDOM SA_SAMPLE_RANDOM +#else +#define SA_NET_RANDOM 0 #endif +#endif /* __KERNEL__ */ + #define SIG_BLOCK 1 /* for blocking signals */ #define SIG_UNBLOCK 2 /* for unblocking signals */ #define SIG_SETMASK 3 /* for setting the signal mask */ diff -urN linux-2.5.6/include/asm-arm/signal.h linux/include/asm-arm/signal.h --- linux-2.5.6/include/asm-arm/signal.h Thu Mar 7 21:18:30 2002 +++ linux/include/asm-arm/signal.h Sun Mar 10 13:14:14 2002 @@ -126,8 +126,15 @@ #define SA_SAMPLE_RANDOM 0x10000000 #define SA_IRQNOMASK 0x08000000 #define SA_SHIRQ 0x04000000 + +#ifdef CONFIG_NET_RANDOM +#define SA_NET_RANDOM SA_SAMPLE_RANDOM +#else +#define SA_NET_RANDOM 0 #endif +#endif /* __KERNEL__ */ + #define SIG_BLOCK 0 /* for blocking signals */ #define SIG_UNBLOCK 1 /* for unblocking signals */ #define SIG_SETMASK 2 /* for setting the signal mask */ diff -urN linux-2.5.6/include/asm-cris/signal.h linux/include/asm-cris/signal.h --- linux-2.5.6/include/asm-cris/signal.h Thu Mar 7 21:18:19 2002 +++ linux/include/asm-cris/signal.h Sun Mar 10 13:14:14 2002 @@ -120,8 +120,15 @@ #define SA_PROBE SA_ONESHOT #define SA_SAMPLE_RANDOM SA_RESTART #define SA_SHIRQ 0x04000000 + +#ifdef CONFIG_NET_RANDOM +#define SA_NET_RANDOM SA_SAMPLE_RANDOM +#else +#define SA_NET_RANDOM 0 #endif +#endif /* __KERNEL__ */ + #define SIG_BLOCK 0 /* for blocking signals */ #define SIG_UNBLOCK 1 /* for unblocking signals */ #define SIG_SETMASK 2 /* for setting the signal mask */ diff -urN linux-2.5.6/include/asm-i386/signal.h linux/include/asm-i386/signal.h --- linux-2.5.6/include/asm-i386/signal.h Thu Mar 7 21:18:15 2002 +++ linux/include/asm-i386/signal.h Sun Mar 10 13:14:14 2002 @@ -120,8 +120,15 @@ #define SA_PROBE SA_ONESHOT #define SA_SAMPLE_RANDOM SA_RESTART #define SA_SHIRQ 0x04000000 + +#ifdef CONFIG_NET_RANDOM +#define SA_NET_RANDOM SA_SAMPLE_RANDOM +#else +#define SA_NET_RANDOM 0 #endif +#endif /* __KERNEL__ */ + #define SIG_BLOCK 0 /* for blocking signals */ #define SIG_UNBLOCK 1 /* for unblocking signals */ #define SIG_SETMASK 2 /* for setting the signal mask */ diff -urN linux-2.5.6/include/asm-ia64/signal.h linux/include/asm-ia64/signal.h --- linux-2.5.6/include/asm-ia64/signal.h Thu Mar 7 21:18:13 2002 +++ linux/include/asm-ia64/signal.h Sun Mar 10 13:14:14 2002 @@ -116,6 +116,12 @@ #define SA_SAMPLE_RANDOM SA_RESTART #define SA_SHIRQ 0x04000000 +#ifdef CONFIG_NET_RANDOM +#define SA_NET_RANDOM SA_SAMPLE_RANDOM +#else +#define SA_NET_RANDOM 0 +#endif + #endif /* __KERNEL__ */ #define SIG_BLOCK 0 /* for blocking signals */ diff -urN linux-2.5.6/include/asm-m68k/signal.h linux/include/asm-m68k/signal.h --- linux-2.5.6/include/asm-m68k/signal.h Thu Mar 7 21:18:15 2002 +++ linux/include/asm-m68k/signal.h Sun Mar 10 13:14:14 2002 @@ -116,8 +116,15 @@ #define SA_PROBE SA_ONESHOT #define SA_SAMPLE_RANDOM SA_RESTART #define SA_SHIRQ 0x04000000 + +#ifdef CONFIG_NET_RANDOM +#define SA_NET_RANDOM SA_SAMPLE_RANDOM +#else +#define SA_NET_RANDOM 0 #endif +#endif /* __KERNEL__ */ + #define SIG_BLOCK 0 /* for blocking signals */ #define SIG_UNBLOCK 1 /* for unblocking signals */ #define SIG_SETMASK 2 /* for setting the signal mask */ diff -urN linux-2.5.6/include/asm-mips/signal.h linux/include/asm-mips/signal.h --- linux-2.5.6/include/asm-mips/signal.h Thu Mar 7 21:18:23 2002 +++ linux/include/asm-mips/signal.h Sun Mar 10 13:14:14 2002 @@ -111,6 +111,12 @@ #define SA_SAMPLE_RANDOM SA_RESTART #define SA_SHIRQ 0x02000000 +#ifdef CONFIG_NET_RANDOM +#define SA_NET_RANDOM SA_SAMPLE_RANDOM +#else +#define SA_NET_RANDOM 0 +#endif + #endif /* __KERNEL__ */ #define SIG_BLOCK 1 /* for blocking signals */ diff -urN linux-2.5.6/include/asm-mips64/signal.h linux/include/asm-mips64/signal.h --- linux-2.5.6/include/asm-mips64/signal.h Thu Mar 7 21:18:17 2002 +++ linux/include/asm-mips64/signal.h Sun Mar 10 13:14:14 2002 @@ -111,6 +111,12 @@ #define SA_SAMPLE_RANDOM SA_RESTART #define SA_SHIRQ 0x02000000 +#ifdef CONFIG_NET_RANDOM +#define SA_NET_RANDOM SA_SAMPLE_RANDOM +#else +#define SA_NET_RANDOM 0 +#endif + #endif /* __KERNEL__ */ #define SIG_BLOCK 1 /* for blocking signals */ diff -urN linux-2.5.6/include/asm-parisc/signal.h linux/include/asm-parisc/signal.h --- linux-2.5.6/include/asm-parisc/signal.h Thu Mar 7 21:18:28 2002 +++ linux/include/asm-parisc/signal.h Sun Mar 10 13:14:14 2002 @@ -100,6 +100,12 @@ #define SA_SAMPLE_RANDOM SA_RESTART #define SA_SHIRQ 0x04000000 +#ifdef CONFIG_NET_RANDOM +#define SA_NET_RANDOM SA_SAMPLE_RANDOM +#else +#define SA_NET_RANDOM 0 +#endif + #endif /* __KERNEL__ */ #define SIG_BLOCK 0 /* for blocking signals */ diff -urN linux-2.5.6/include/asm-ppc/signal.h linux/include/asm-ppc/signal.h --- linux-2.5.6/include/asm-ppc/signal.h Thu Mar 7 21:18:11 2002 +++ linux/include/asm-ppc/signal.h Sun Mar 10 13:14:14 2002 @@ -114,8 +114,15 @@ #define SA_PROBE SA_ONESHOT #define SA_SAMPLE_RANDOM SA_RESTART #define SA_SHIRQ 0x04000000 + +#ifdef CONFIG_NET_RANDOM +#define SA_NET_RANDOM SA_SAMPLE_RANDOM +#else +#define SA_NET_RANDOM 0 #endif +#endif /* __KERNEL__ */ + #define SIG_BLOCK 0 /* for blocking signals */ #define SIG_UNBLOCK 1 /* for unblocking signals */ #define SIG_SETMASK 2 /* for setting the signal mask */ diff -urN linux-2.5.6/include/asm-ppc64/signal.h linux/include/asm-ppc64/signal.h --- linux-2.5.6/include/asm-ppc64/signal.h Thu Mar 7 21:18:28 2002 +++ linux/include/asm-ppc64/signal.h Sun Mar 10 13:14:14 2002 @@ -112,8 +112,15 @@ #define SA_PROBE SA_ONESHOT #define SA_SAMPLE_RANDOM SA_RESTART #define SA_SHIRQ 0x04000000 + +#ifdef CONFIG_NET_RANDOM +#define SA_NET_RANDOM SA_SAMPLE_RANDOM +#else +#define SA_NET_RANDOM 0 #endif +#endif /* __KERNEL__ */ + #define SIG_BLOCK 0 /* for blocking signals */ #define SIG_UNBLOCK 1 /* for unblocking signals */ #define SIG_SETMASK 2 /* for setting the signal mask */ diff -urN linux-2.5.6/include/asm-s390/signal.h linux/include/asm-s390/signal.h --- linux-2.5.6/include/asm-s390/signal.h Thu Mar 7 21:18:16 2002 +++ linux/include/asm-s390/signal.h Sun Mar 10 13:14:14 2002 @@ -127,8 +127,15 @@ #define SA_PROBE SA_ONESHOT #define SA_SAMPLE_RANDOM SA_RESTART #define SA_SHIRQ 0x04000000 + +#ifdef CONFIG_NET_RANDOM +#define SA_NET_RANDOM SA_SAMPLE_RANDOM +#else +#define SA_NET_RANDOM 0 #endif +#endif /* __KERNEL__ */ + #define SIG_BLOCK 0 /* for blocking signals */ #define SIG_UNBLOCK 1 /* for unblocking signals */ #define SIG_SETMASK 2 /* for setting the signal mask */ diff -urN linux-2.5.6/include/asm-s390x/signal.h linux/include/asm-s390x/signal.h --- linux-2.5.6/include/asm-s390x/signal.h Thu Mar 7 21:18:08 2002 +++ linux/include/asm-s390x/signal.h Sun Mar 10 13:14:14 2002 @@ -127,8 +127,15 @@ #define SA_PROBE SA_ONESHOT #define SA_SAMPLE_RANDOM SA_RESTART #define SA_SHIRQ 0x04000000 + +#ifdef CONFIG_NET_RANDOM +#define SA_NET_RANDOM SA_SAMPLE_RANDOM +#else +#define SA_NET_RANDOM 0 #endif +#endif /* __KERNEL__ */ + #define SIG_BLOCK 0 /* for blocking signals */ #define SIG_UNBLOCK 1 /* for unblocking signals */ #define SIG_SETMASK 2 /* for setting the signal mask */ diff -urN linux-2.5.6/include/asm-sh/signal.h linux/include/asm-sh/signal.h --- linux-2.5.6/include/asm-sh/signal.h Thu Mar 7 21:18:05 2002 +++ linux/include/asm-sh/signal.h Sun Mar 10 13:14:14 2002 @@ -107,8 +107,15 @@ #define SA_PROBE SA_ONESHOT #define SA_SAMPLE_RANDOM SA_RESTART #define SA_SHIRQ 0x04000000 + +#ifdef CONFIG_NET_RANDOM +#define SA_NET_RANDOM SA_SAMPLE_RANDOM +#else +#define SA_NET_RANDOM 0 #endif +#endif /* __KERNEL__ */ + #define SIG_BLOCK 0 /* for blocking signals */ #define SIG_UNBLOCK 1 /* for unblocking signals */ #define SIG_SETMASK 2 /* for setting the signal mask */ diff -urN linux-2.5.6/include/asm-sparc/signal.h linux/include/asm-sparc/signal.h --- linux-2.5.6/include/asm-sparc/signal.h Thu Mar 7 21:18:54 2002 +++ linux/include/asm-sparc/signal.h Sun Mar 10 13:14:14 2002 @@ -176,8 +176,15 @@ #define SA_PROBE SA_ONESHOT #define SA_SAMPLE_RANDOM SA_RESTART #define SA_STATIC_ALLOC 0x80 + +#ifdef CONFIG_NET_RANDOM +#define SA_NET_RANDOM SA_SAMPLE_RANDOM +#else +#define SA_NET_RANDOM 0 #endif +#endif /* __KERNEL__ */ + /* Type of a signal handler. */ #ifdef __KERNEL__ typedef void (*__sighandler_t)(int, int, struct sigcontext *, char *); diff -urN linux-2.5.6/include/asm-sparc64/signal.h linux/include/asm-sparc64/signal.h --- linux-2.5.6/include/asm-sparc64/signal.h Thu Mar 7 21:18:19 2002 +++ linux/include/asm-sparc64/signal.h Sun Mar 10 13:14:14 2002 @@ -192,8 +192,15 @@ #define SA_PROBE SA_ONESHOT #define SA_SAMPLE_RANDOM SA_RESTART #define SA_STATIC_ALLOC 0x80 + +#ifdef CONFIG_NET_RANDOM +#define SA_NET_RANDOM SA_SAMPLE_RANDOM +#else +#define SA_NET_RANDOM 0 #endif +#endif /* __KERNEL__ */ + /* Type of a signal handler. */ #ifdef __KERNEL__ typedef void (*__sighandler_t)(int, struct sigcontext *); diff -urN linux-2.5.6/include/asm-x86_64/signal.h linux/include/asm-x86_64/signal.h --- linux-2.5.6/include/asm-x86_64/signal.h Thu Mar 7 21:18:05 2002 +++ linux/include/asm-x86_64/signal.h Sun Mar 10 13:14:14 2002 @@ -125,8 +125,15 @@ #define SA_PROBE SA_ONESHOT #define SA_SAMPLE_RANDOM SA_RESTART #define SA_SHIRQ 0x04000000 + +#ifdef CONFIG_NET_RANDOM +#define SA_NET_RANDOM SA_SAMPLE_RANDOM +#else +#define SA_NET_RANDOM 0 #endif +#endif /* __KERNEL__ */ + #define SIG_BLOCK 0 /* for blocking signals */ #define SIG_UNBLOCK 1 /* for unblocking signals */ #define SIG_SETMASK 2 /* for setting the signal mask */