Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
a0f3dc93
Commit
a0f3dc93
authored
Nov 23, 2007
by
Linus Torvalds
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Import pre2.0.11
parent
77b785ce
Changes
59
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
59 changed files
with
839 additions
and
1373 deletions
+839
-1373
CREDITS
CREDITS
+1
-1
Documentation/isdn/README.audio
Documentation/isdn/README.audio
+3
-3
MAINTAINERS
MAINTAINERS
+2
-2
Makefile
Makefile
+1
-1
arch/i386/defconfig
arch/i386/defconfig
+1
-0
arch/i386/kernel/time.c
arch/i386/kernel/time.c
+1
-1
arch/ppc/kernel/raw_printf.c
arch/ppc/kernel/raw_printf.c
+0
-1200
drivers/block/ide-cd.c
drivers/block/ide-cd.c
+18
-8
drivers/isdn/isdn_tty.c
drivers/isdn/isdn_tty.c
+1
-1
drivers/isdn/teles/isdnl3.c
drivers/isdn/teles/isdnl3.c
+1
-1
drivers/net/Space.c
drivers/net/Space.c
+9
-1
drivers/net/new_tunnel.c
drivers/net/new_tunnel.c
+1
-0
drivers/scsi/Config.in
drivers/scsi/Config.in
+10
-8
drivers/scsi/atari_scsi.c
drivers/scsi/atari_scsi.c
+1
-0
drivers/scsi/scsi.c
drivers/scsi/scsi.c
+7
-5
drivers/scsi/scsi_ioctl.c
drivers/scsi/scsi_ioctl.c
+19
-3
drivers/scsi/sd.c
drivers/scsi/sd.c
+2
-0
drivers/scsi/sr.c
drivers/scsi/sr.c
+1
-0
drivers/sound/Config.in
drivers/sound/Config.in
+256
-11
drivers/sound/sequencer.c
drivers/sound/sequencer.c
+3
-0
fs/Config.in
fs/Config.in
+3
-3
fs/buffer.c
fs/buffer.c
+12
-10
fs/ext2/ioctl.c
fs/ext2/ioctl.c
+5
-4
fs/locks.c
fs/locks.c
+7
-1
fs/ncpfs/dir.c
fs/ncpfs/dir.c
+10
-0
fs/ncpfs/file.c
fs/ncpfs/file.c
+5
-4
fs/ncpfs/inode.c
fs/ncpfs/inode.c
+3
-0
include/asm-i386/posix_types.h
include/asm-i386/posix_types.h
+4
-0
include/asm-i386/statfs.h
include/asm-i386/statfs.h
+8
-4
include/asm-m68k/posix_types.h
include/asm-m68k/posix_types.h
+4
-0
include/asm-m68k/statfs.h
include/asm-m68k/statfs.h
+8
-4
include/asm-ppc/statfs.h
include/asm-ppc/statfs.h
+8
-4
include/asm-sparc/posix_types.h
include/asm-sparc/posix_types.h
+4
-0
include/asm-sparc/statfs.h
include/asm-sparc/statfs.h
+8
-4
include/linux/interrupt.h
include/linux/interrupt.h
+1
-0
include/linux/sched.h
include/linux/sched.h
+0
-1
include/linux/swap.h
include/linux/swap.h
+3
-1
include/linux/sysctl.h
include/linux/sysctl.h
+17
-9
include/net/ip_masq.h
include/net/ip_masq.h
+1
-0
ipc/msg.c
ipc/msg.c
+1
-0
kernel/exit.c
kernel/exit.c
+1
-0
mm/kmalloc.c
mm/kmalloc.c
+2
-0
mm/page_alloc.c
mm/page_alloc.c
+1
-0
mm/page_io.c
mm/page_io.c
+1
-1
mm/swap.c
mm/swap.c
+1
-1
net/bridge/Makefile
net/bridge/Makefile
+1
-1
net/bridge/sysctl_net_bridge.c
net/bridge/sysctl_net_bridge.c
+13
-0
net/core/datagram.c
net/core/datagram.c
+15
-3
net/ipv4/arp.c
net/ipv4/arp.c
+45
-30
net/ipv4/icmp.c
net/ipv4/icmp.c
+58
-26
net/ipv4/ip_forward.c
net/ipv4/ip_forward.c
+25
-2
net/ipv4/ip_masq.c
net/ipv4/ip_masq.c
+106
-5
net/ipv4/sysctl_net_ipv4.c
net/ipv4/sysctl_net_ipv4.c
+25
-0
net/ipv4/tcp_input.c
net/ipv4/tcp_input.c
+2
-2
net/ipv4/tcp_timer.c
net/ipv4/tcp_timer.c
+1
-1
net/netlink.c
net/netlink.c
+16
-1
net/netsyms.c
net/netsyms.c
+10
-0
net/sysctl_net.c
net/sysctl_net.c
+14
-0
scripts/Menuconfig
scripts/Menuconfig
+52
-5
No files found.
CREDITS
View file @
a0f3dc93
...
...
@@ -735,7 +735,7 @@ D: Author of the dialog utility, foundation
D: for Menuconfig's lxdialog.
N: Volker Lendecke
E: lendecke@namu01.
gwdg
.de
E: lendecke@namu01.
Num.Math.Uni-Goettingen
.de
D: Kernel smbfs (to mount WfW, NT and OS/2 network drives.)
D: NCP filesystem support (to mount NetWare volumes)
S: Innersteweg 11
...
...
Documentation/isdn/README.audio
View file @
a0f3dc93
...
...
@@ -32,7 +32,7 @@ All audio mode commands have the one of the following form:
where xx is a two-character code and v are alphanumerical parameters.
The following commands are supported:
AT+VNH=x Auto hangup sett
t
ing. NO EFFECT, supported
AT+VNH=x Auto hangup setting. NO EFFECT, supported
for compatibility only.
AT+VNH? Always reporting "1"
AT+VNH=? Always reporting "1"
...
...
@@ -100,7 +100,7 @@ General behavior and description of data formats/protocol.
<DLE>c FAX calling tone received.
<DLE>b busy tone received.
<DLE>q quiet. Silence detected after non-silence.
<DLE>s silence. Silence de
c
tected from the
<DLE>s silence. Silence detected from the
start of recording.
Any character sent by the application, except XON (0x11) or XOFF (0x13)
...
...
@@ -109,7 +109,7 @@ General behavior and description of data formats/protocol.
Audio playback.
When sending audio data, upon AT+VTX command, emulator responds with
CONNECT, and starts transfering data from application to the phone line.
CONNECT, and starts transfer
r
ing data from application to the phone line.
The same DLE sequences apply to this mode.
MAINTAINERS
View file @
a0f3dc93
...
...
@@ -217,7 +217,7 @@ S: Maintained
NCP FILESYSTEM:
P: Volker Lendecke
M: lendecke@namu01.
gwdg
.de
M: lendecke@namu01.
Num.Math.Uni-Goettingen
.de
L: linware@sh.cvut.cz
S: Maintained
...
...
@@ -253,7 +253,7 @@ S: Maintained
SMB FILESYSTEM:
P: Volker Lendecke
M: lendecke@namu01.
gwdg
.de
M: lendecke@namu01.
Num.Math.Uni-Goettingen
.de
L: samba@listproc.anu.edu.au
S: Odd Fixes
...
...
Makefile
View file @
a0f3dc93
VERSION
=
1
PATCHLEVEL
=
99
SUBLEVEL
=
1
0
SUBLEVEL
=
1
1
ARCH
=
i386
...
...
arch/i386/defconfig
View file @
a0f3dc93
...
...
@@ -142,6 +142,7 @@ CONFIG_NFS_FS=y
CONFIG_ISO9660_FS=y
# CONFIG_HPFS_FS is not set
# CONFIG_SYSV_FS is not set
# CONFIG_UFS_FS is not set
#
# Character devices
...
...
arch/i386/kernel/time.c
View file @
a0f3dc93
...
...
@@ -122,7 +122,7 @@ static unsigned long do_fast_gettimeoffset(void)
/*
* Due to rounding errors (and jiffies inconsistencies),
* we need to check the result so that we'll get a timer
* that is monoton
ous
.
* that is monoton
ic
.
*/
if
(
edx
>=
997670
/
HZ
)
edx
=
997670
/
HZ
-
1
;
...
...
arch/ppc/kernel/raw_printf.c
deleted
100644 → 0
View file @
77b785ce
This diff is collapsed.
Click to expand it.
drivers/block/ide-cd.c
View file @
a0f3dc93
...
...
@@ -98,6 +98,8 @@
* from Gerhard Zuber <zuber@berlin.snafu.de>.
* Let open succeed even if there's no loaded disc.
* 3.13 May 19, 1996 -- Fixes for changer code.
* 3.14 May 29, 1996 -- Add work-around for Vertos 600.
* (From Hennus Bergman <hennus@sky.ow.nl>.)
*
* NOTE: Direct audio reads will only work on some types of drive.
* So far, i've received reports of success for Sony and Toshiba drives.
...
...
@@ -2597,6 +2599,13 @@ void ide_cdrom_setup (ide_drive_t *drive)
CDROM_CONFIG_FLAGS
(
drive
)
->
subchan_as_bcd
=
1
;
}
else
if
(
strcmp
(
drive
->
id
->
model
,
"V006E0DS"
)
==
0
&&
drive
->
id
->
fw_rev
[
4
]
==
'1'
&&
drive
->
id
->
fw_rev
[
6
]
<=
'2'
)
{
/* Vertos 600 ESD. */
CDROM_CONFIG_FLAGS
(
drive
)
->
toctracks_as_bcd
=
1
;
}
else
if
(
strcmp
(
drive
->
id
->
model
,
"NEC CD-ROM DRIVE:260"
)
==
0
&&
strcmp
(
drive
->
id
->
fw_rev
,
"1.01"
)
==
0
)
{
...
...
@@ -2624,14 +2633,15 @@ void ide_cdrom_setup (ide_drive_t *drive)
/*
* TODO:
* CDROMRESET
* Lock the door when a read request completes successfully and the
* door is not already locked. Also try to reorganize to reduce
* duplicated functionality between read and ioctl paths?
* Establish interfaces for an IDE port driver, and break out the cdrom
* code into a loadable module.
* Support changers better.
* TODO (for 2.1?):
* Avoid printing error messages for expected errors from the drive.
* Integrate with generic cdrom driver.
* Query the drive to find what features are available
* before trying to use them.
* Integrate spindown time adjustment patch.
* Modularize.
* CDROMRESET ioctl.
* Better support for changers.
*/
...
...
drivers/isdn/isdn_tty.c
View file @
a0f3dc93
...
...
@@ -1103,7 +1103,7 @@ static int isdn_tty_ioctl(struct tty_struct *tty, struct file *file,
return
isdn_tty_set_modem_info
(
info
,
cmd
,
(
uint
*
)
arg
);
case
TIOCSERGETLSR
:
/* Get line status register */
#ifdef ISDN_DEBUG_MODEM_IOCTL
printk
(
KERN_DEBUG
"ttyI%d ioctl TIOSERGETLSR
\n
"
,
info
->
line
);
printk
(
KERN_DEBUG
"ttyI%d ioctl TIO
C
SERGETLSR
\n
"
,
info
->
line
);
#endif
error
=
verify_area
(
VERIFY_WRITE
,
(
void
*
)
arg
,
sizeof
(
uint
));
if
(
error
)
...
...
drivers/isdn/teles/isdnl3.c
View file @
a0f3dc93
...
...
@@ -2,7 +2,7 @@
*
* $Log: isdnl3.c,v $
* Revision 1.6 1996/05/21 11:33:50 keil
* Adding SETUP_ACKNOWLE
GD
E as answer of a SETUP message.
* Adding SETUP_ACKNOWLE
DG
E as answer of a SETUP message.
*
* Revision 1.5 1996/05/18 01:37:16 fritz
* Added spelling corrections and some minor changes
...
...
drivers/net/Space.c
View file @
a0f3dc93
...
...
@@ -263,8 +263,16 @@ static struct device atp_dev = {
which means "don't probe". These entries exist to only to provide empty
slots which may be enabled at boot-time. */
static
struct
device
eth7_dev
=
{
"eth7"
,
0
,
0
,
0
,
0
,
0xffe0
/* I/O base*/
,
0
,
0
,
0
,
0
,
NEXT_DEV
,
ethif_probe
};
static
struct
device
eth6_dev
=
{
"eth6"
,
0
,
0
,
0
,
0
,
0xffe0
/* I/O base*/
,
0
,
0
,
0
,
0
,
&
eth7_dev
,
ethif_probe
};
static
struct
device
eth5_dev
=
{
"eth5"
,
0
,
0
,
0
,
0
,
0xffe0
/* I/O base*/
,
0
,
0
,
0
,
0
,
&
eth6_dev
,
ethif_probe
};
static
struct
device
eth4_dev
=
{
"eth4"
,
0
,
0
,
0
,
0
,
0xffe0
/* I/O base*/
,
0
,
0
,
0
,
0
,
&
eth5_dev
,
ethif_probe
};
static
struct
device
eth3_dev
=
{
"eth3"
,
0
,
0
,
0
,
0
,
0xffe0
/* I/O base*/
,
0
,
0
,
0
,
0
,
NEXT_DEV
,
ethif_probe
};
"eth3"
,
0
,
0
,
0
,
0
,
0xffe0
/* I/O base*/
,
0
,
0
,
0
,
0
,
&
eth4_dev
,
ethif_probe
};
static
struct
device
eth2_dev
=
{
"eth2"
,
0
,
0
,
0
,
0
,
0xffe0
/* I/O base*/
,
0
,
0
,
0
,
0
,
&
eth3_dev
,
ethif_probe
};
static
struct
device
eth1_dev
=
{
...
...
drivers/net/new_tunnel.c
View file @
a0f3dc93
...
...
@@ -261,6 +261,7 @@ printk("Required room: %d, Tunnel hlen: %d\n", max_headroom, TUNL_HLEN);
* and new_skb->ip_hdr is the IP header of the old packet.
*/
new_skb
->
ip_hdr
=
(
struct
iphdr
*
)
skb_put
(
new_skb
,
skb
->
len
);
new_skb
->
dev
=
skb
->
dev
;
memcpy
(
new_skb
->
ip_hdr
,
skb
->
data
,
skb
->
len
);
memset
(
new_skb
->
proto_priv
,
0
,
sizeof
(
skb
->
proto_priv
));
...
...
drivers/scsi/Config.in
View file @
a0f3dc93
...
...
@@ -14,16 +14,21 @@ bool 'Verbose SCSI error reporting (kernel size +=12K)' CONFIG_SCSI_CONSTANTS
mainmenu_option next_comment
comment 'SCSI low-level drivers'
dep_tristate '
AdvanSys SCSI support' CONFIG_SCSI_ADVANSYS
$CONFIG_SCSI
dep_tristate '
7000FASST SCSI support' CONFIG_SCSI_7000FASST
$CONFIG_SCSI
dep_tristate 'Adaptec AHA152X support' CONFIG_SCSI_AHA152X $CONFIG_SCSI
dep_tristate 'Adaptec AHA1542 support' CONFIG_SCSI_AHA1542 $CONFIG_SCSI
dep_tristate 'Adaptec AHA1740 support' CONFIG_SCSI_AHA1740 $CONFIG_SCSI
dep_tristate 'Adaptec AHA274X/284X/294X support' CONFIG_SCSI_AIC7XXX $CONFIG_SCSI
dep_tristate 'AdvanSys SCSI support' CONFIG_SCSI_ADVANSYS $CONFIG_SCSI
dep_tristate 'Always IN2000 SCSI support' CONFIG_SCSI_IN2000 $CONFIG_SCSI
if [ "$CONFIG_PCI" = "y" ]; then
bool 'AM53/79C974 PCI SCSI support' CONFIG_SCSI_AM53C974
fi
dep_tristate 'BusLogic SCSI support' CONFIG_SCSI_BUSLOGIC $CONFIG_SCSI
dep_tristate 'DTC3180/3280 SCSI support' CONFIG_SCSI_DTC3280 $CONFIG_SCSI
dep_tristate 'EATA ISA/EISA (DPT PM2011/021/012/022/122/322) support' CONFIG_SCSI_EATA $CONFIG_SCSI
dep_tristate 'EATA-DMA (DPT, NEC, AT&T, SNI, AST, Olivetti, Alphatronix) support' CONFIG_SCSI_EATA_DMA $CONFIG_SCSI
dep_tristate 'EATA-PIO (old DPT PM2001, PM2012A) support' CONFIG_SCSI_EATA_PIO $CONFIG_SCSI
dep_tristate 'UltraStor 14F/34F support' CONFIG_SCSI_U14_34F $CONFIG_SCSI
dep_tristate 'Future Domain 16xx SCSI support' CONFIG_SCSI_FUTURE_DOMAIN $CONFIG_SCSI
dep_tristate 'Generic NCR5380/53c400 SCSI support' CONFIG_SCSI_GENERIC_NCR5380 $CONFIG_SCSI
if [ "$CONFIG_SCSI_GENERIC_NCR5380" != "n" ]; then
...
...
@@ -32,6 +37,7 @@ if [ "$CONFIG_SCSI_GENERIC_NCR5380" != "n" ]; then
"Port CONFIG_SCSI_G_NCR5380_PORT \
Memory CONFIG_SCSI_G_NCR5380_MEM" Port
fi
dep_tristate 'NCR53c406a SCSI support' CONFIG_SCSI_NCR53C406A $CONFIG_SCSI
if [ "$CONFIG_PCI" = "y" ]; then
dep_tristate 'NCR53c7,8xx SCSI support' CONFIG_SCSI_NCR53C7xx $CONFIG_SCSI
if [ "$CONFIG_SCSI_NCR53C7xx" != "n" ]; then
...
...
@@ -40,7 +46,7 @@ if [ "$CONFIG_PCI" = "y" ]; then
bool ' allow DISCONNECT' CONFIG_SCSI_NCR53C7xx_DISCONNECT
fi
fi
dep_tristate '
Always IN2000 SCSI support' CONFIG_SCSI_IN2000
$CONFIG_SCSI
dep_tristate '
IOMEGA Parallel Port ZIP drive SCSI support' CONFIG_SCSI_PPA
$CONFIG_SCSI
dep_tristate 'PAS16 SCSI support' CONFIG_SCSI_PAS16 $CONFIG_SCSI
dep_tristate 'Qlogic FAS SCSI support' CONFIG_SCSI_QLOGIC_FAS $CONFIG_SCSI
if [ "$CONFIG_PCI" = "y" ]; then
...
...
@@ -50,11 +56,7 @@ if [ "$CONFIG_PCI" = "y" ]; then
fi
dep_tristate 'Seagate ST-02 and Future Domain TMC-8xx SCSI support' CONFIG_SCSI_SEAGATE $CONFIG_SCSI
dep_tristate 'Trantor T128/T128F/T228 SCSI support' CONFIG_SCSI_T128 $CONFIG_SCSI
dep_tristate 'UltraStor 14F/34F support' CONFIG_SCSI_U14_34F $CONFIG_SCSI
dep_tristate 'UltraStor SCSI support' CONFIG_SCSI_ULTRASTOR $CONFIG_SCSI
dep_tristate '7000FASST SCSI support' CONFIG_SCSI_7000FASST $CONFIG_SCSI
dep_tristate 'EATA ISA/EISA (DPT PM2011/021/012/022/122/322) support' CONFIG_SCSI_EATA $CONFIG_SCSI
dep_tristate 'NCR53c406a SCSI support' CONFIG_SCSI_NCR53C406A $CONFIG_SCSI
dep_tristate 'IOMEGA Parallel Port ZIP drive SCSI support' CONFIG_SCSI_PPA $CONFIG_SCSI
bool 'AM53/79C974 PCI SCSI support' CONFIG_SCSI_AM53C974
#dep_tristate 'SCSI debugging host adapter' CONFIG_SCSI_DEBUG $CONFIG_SCSI
endmenu
drivers/scsi/atari_scsi.c
View file @
a0f3dc93
...
...
@@ -87,6 +87,7 @@
#include <linux/delay.h>
#include <linux/mm.h>
#include <linux/blk.h>
#include <linux/interrupt.h>
#include <asm/bootinfo.h>
#include <asm/atarihw.h>
...
...
drivers/scsi/scsi.c
View file @
a0f3dc93
...
...
@@ -38,18 +38,20 @@
#include <linux/config.h>
#include <linux/module.h>
#include <asm/system.h>
#include <linux/sched.h>
#include <linux/timer.h>
#include <linux/string.h>
#include <linux/malloc.h>
#include <asm/irq.h>
#include <asm/dma.h>
#include <linux/ioport.h>
#include <linux/kernel.h>
#include<linux/stat.h>
#include <linux/stat.h>
#include <linux/blk.h>
#include <linux/interrupt.h>
#include <asm/system.h>
#include <asm/irq.h>
#include <asm/dma.h>
#include "scsi.h"
#include "hosts.h"
#include "constants.h"
...
...
drivers/scsi/scsi_ioctl.c
View file @
a0f3dc93
...
...
@@ -171,7 +171,7 @@ static int ioctl_command(Scsi_Device *dev, void *buffer)
unsigned
char
opcode
;
int
inlen
,
outlen
,
cmdlen
;
int
needed
,
buf_needed
;
int
result
;
int
timeout
,
retries
,
result
;
if
(
!
buffer
)
return
-
EINVAL
;
...
...
@@ -239,6 +239,22 @@ static int ioctl_command(Scsi_Device *dev, void *buffer)
*/
cmd
[
1
]
=
(
cmd
[
1
]
&
0x1f
)
|
(
dev
->
lun
<<
5
);
switch
(
opcode
)
{
case
FORMAT_UNIT
:
timeout
=
2
*
60
*
60
*
HZ
;
/* 2 Hours */
retries
=
1
;
break
;
case
START_STOP
:
timeout
=
60
*
HZ
;
/* 60 seconds */
retries
=
1
;
break
;
default:
timeout
=
MAX_TIMEOUT
;
retries
=
MAX_RETRIES
;
break
;
}
#ifndef DEBUG_NO_CMD
SCpnt
=
allocate_device
(
NULL
,
dev
,
1
);
...
...
@@ -246,8 +262,8 @@ static int ioctl_command(Scsi_Device *dev, void *buffer)
{
struct
semaphore
sem
=
MUTEX_LOCKED
;
SCpnt
->
request
.
sem
=
&
sem
;
scsi_do_cmd
(
SCpnt
,
cmd
,
buf
,
needed
,
scsi_ioctl_done
,
MAX_TIMEOUT
,
MAX_RETRIES
);
scsi_do_cmd
(
SCpnt
,
cmd
,
buf
,
needed
,
scsi_ioctl_done
,
timeout
,
retries
);
down
(
&
sem
);
}
...
...
drivers/scsi/sd.c
View file @
a0f3dc93
...
...
@@ -34,6 +34,8 @@
#include <linux/mm.h>
#include <linux/string.h>
#include <linux/errno.h>
#include <linux/interrupt.h>
#include <asm/system.h>
#define MAJOR_NR SCSI_DISK_MAJOR
...
...
drivers/scsi/sr.c
View file @
a0f3dc93
...
...
@@ -28,6 +28,7 @@
#include <linux/string.h>
#include <linux/errno.h>
#include <linux/cdrom.h>
#include <linux/interrupt.h>
#include <asm/system.h>
#define MAJOR_NR SCSI_CDROM_MAJOR
...
...
drivers/sound/Config.in
View file @
a0f3dc93
#
# Sound driver configuration
#
#--------
# There is another config script which is compatible with rest of
# the kernel. It can be activated by running 'make mkscript' in this
# directory. Please note that this is an _experimental_ feature which
# doesn't work with all cards (PSS, SM Wave, AudioTriX Pro).
#--------
#
$MAKE -C drivers/sound config || exit 1
bool 'ProAudioSpectrum 16 support' CONFIG_PAS
bool 'SoundBlaster (SB, SBPro, SB16, clones) support' CONFIG_SB
bool 'Generic OPL2/OPL3 FM synthesizer support' CONFIG_ADLIB
bool 'Gravis Ultrasound support' CONFIG_GUS
bool 'MPU-401 support (NOT for SB16)' CONFIG_MPU401
bool '6850 UART Midi support' CONFIG_UART6850
bool 'PSS (ECHO-ADI2111) support' CONFIG_PSS
bool '16 bit sampling option of GUS (_NOT_ GUS MAX)' CONFIG_GUS16
bool 'GUS MAX support' CONFIG_GUSMAX
bool 'Microsoft Sound System support' CONFIG_MSS
bool 'Ensoniq Soundscape support' CONFIG_SSCAPE
bool 'MediaTriX AudioTriX Pro support' CONFIG_TRIX
bool 'Support for MAD16 and/or Mozart based cards' CONFIG_MAD16
bool 'Support for Crystal CS4232 based (PnP) cards' CONFIG_CS4232
bool 'Support for Turtle Beach Wave Front (Maui, Tropez) synthesizers' CONFIG_MAUI
bool '/dev/dsp and /dev/audio support' CONFIG_AUDIO
bool 'MIDI interface support' CONFIG_MIDI
bool 'FM synthesizer (YM3812/OPL-3) support' CONFIG_YM3812
bool 'Support for SM Wave' CONFIG_SMWAVE
if [ "$CONFIG_AEDSP16" = "y" ]; then
hex 'I/O base for Audio Excel DSP 16 220 or 240' AEDSP16_BASE 220
fi
if [ "$CONFIG_SB" = "y" ]; then
hex 'I/O base for SB Check from manual of the card' SBC_BASE 220
fi
if [ "$CONFIG_SB" = "y" ]; then
int 'SoundBlaster IRQ Check from manual of the card' SBC_IRQ 7
fi
if [ "$CONFIG_SB" = "y" ]; then
int 'SoundBlaster DMA 0, 1 or 3' SBC_DMA 1
fi
if [ "$CONFIG_SB" = "y" ]; then
int 'SoundBlaster 16 bit DMA (_REQUIRED_for SB16, Jazz16, SMW) 5, 6 or 7' SB_DMA2 5
fi
if [ "$CONFIG_SB" = "y" ]; then
hex 'MPU401 I/O base of SB16, Jazz16 and ES1688 Check from manual of the card' SB_MPU_BASE 0
fi
if [ "$CONFIG_SB" = "y" ]; then
int 'SB MPU401 IRQ (Jazz16, SM Wave and ES1688) Check from manual of the card' SB_MPU_IRQ -1
fi
if [ "$CONFIG_PAS" = "y" ]; then
int 'PAS16 IRQ 3, 4, 5, 7, 9, 10, 11, 12, 14 or 15' PAS_IRQ 10
fi
if [ "$CONFIG_PAS" = "y" ]; then
int 'PAS16 DMA 0, 1, 3, 5, 6 or 7' PAS_DMA 3
fi
if [ "$CONFIG_GUS" = "y" ]; then
hex 'I/O base for GUS 210, 220, 230, 240, 250 or 260' GUS_BASE 220
fi
if [ "$CONFIG_GUS" = "y" ]; then
int 'GUS IRQ 3, 5, 7, 9, 11, 12 or 15' GUS_IRQ 15
fi
if [ "$CONFIG_GUS" = "y" ]; then
int 'GUS DMA 1, 3, 5, 6 or 7' GUS_DMA 6
fi
if [ "$CONFIG_GUS" = "y" ]; then
int 'Second DMA channel for GUS 1, 3, 5, 6 or 7' GUS_DMA2 -1
fi
if [ "$CONFIG_GUS16" = "y" ]; then
hex 'I/O base for the 16 bit daughtercard of GUS 530, 604, E80 or F40' GUS16_BASE 530
fi
if [ "$CONFIG_GUS16" = "y" ]; then
int 'GUS 16 bit daughtercard IRQ 3, 4, 5, 7, or 9' GUS16_IRQ 7
fi
if [ "$CONFIG_GUS16" = "y" ]; then
int 'GUS DMA 0, 1 or 3' GUS16_DMA 3
fi
if [ "$CONFIG_MPU401" = "y" ]; then
hex 'I/O base for MPU401 Check from manual of the card' MPU_BASE 330
fi
if [ "$CONFIG_MPU401" = "y" ]; then
int 'MPU401 IRQ Check from manual of the card' MPU_IRQ 9
fi
if [ "$CONFIG_MAUI" = "y" ]; then
hex 'I/O base for Maui 210, 230, 260, 290, 300, 320, 338 or 330' MAUI_BASE 330
fi
if [ "$CONFIG_MAUI" = "y" ]; then
int 'Maui IRQ 5, 9, 12 or 15' MAUI_IRQ 9
fi
if [ "$CONFIG_UART6850" = "y" ]; then
hex 'I/O base for UART 6850 MIDI port (Unknown)' U6850_BASE 0
fi
if [ "$CONFIG_UART6850" = "y" ]; then
int 'UART6850 IRQ (Unknown)' U6850_IRQ -1
fi
if [ "$CONFIG_PSS" = "y" ]; then
hex 'PSS I/O base 220 or 240' PSS_BASE 220
fi
if [ "$CONFIG_PSS" = "y" ]; then
hex 'PSS audio I/O base 530, 604, E80 or F40' PSS_MSS_BASE 530
fi
if [ "$CONFIG_PSS" = "y" ]; then
int 'PSS audio IRQ 7, 9, 10 or 11' PSS_MSS_IRQ 11
fi
if [ "$CONFIG_PSS" = "y" ]; then
int 'PSS audio DMA 0, 1 or 3' PSS_MSS_DMA 3
fi
if [ "$CONFIG_PSS" = "y" ]; then
hex 'PSS MIDI I/O base ' PSS_MPU_BASE 330
fi
if [ "$CONFIG_PSS" = "y" ]; then
int 'PSS MIDI IRQ 3, 4, 5, 7 or 9' PSS_MPU_IRQ 9
fi
if [ "$CONFIG_MSS" = "y" ]; then
hex 'MSS/WSS I/O base 530, 604, E80 or F40' MSS_BASE 530
fi
if [ "$CONFIG_MSS" = "y" ]; then
int 'MSS/WSS IRQ 7, 9, 10 or 11' MSS_IRQ 11
fi
if [ "$CONFIG_MSS" = "y" ]; then
int 'MSS/WSS DMA 0, 1 or 3' MSS_DMA 3
fi
if [ "$CONFIG_SSCAPE" = "y" ]; then
hex 'Soundscape MIDI I/O base ' SSCAPE_BASE 330
fi
if [ "$CONFIG_SSCAPE" = "y" ]; then
int 'Soundscape MIDI IRQ ' SSCAPE_IRQ 9
fi
if [ "$CONFIG_SSCAPE" = "y" ]; then
int 'Soundscape initialization DMA 0, 1 or 3' SSCAPE_DMA 3
fi
if [ "$CONFIG_SSCAPE" = "y" ]; then
hex 'Soundscape audio I/O base 534, 608, E84 or F44' SSCAPE_MSS_BASE 534
fi
if [ "$CONFIG_SSCAPE" = "y" ]; then
int 'Soundscape audio IRQ 7, 9, 10 or 11' SSCAPE_MSS_IRQ 11
fi
if [ "$CONFIG_SSCAPE" = "y" ]; then
int 'Soundscape audio DMA 0, 1 or 3' SSCAPE_MSS_DMA 0
fi
if [ "$CONFIG_TRIX" = "y" ]; then
hex 'AudioTriX audio I/O base 530, 604, E80 or F40' TRIX_BASE 530
fi
if [ "$CONFIG_TRIX" = "y" ]; then
int 'AudioTriX audio IRQ 7, 9, 10 or 11' TRIX_IRQ 11
fi
if [ "$CONFIG_TRIX" = "y" ]; then
int 'AudioTriX audio DMA 0, 1 or 3' TRIX_DMA 0
fi
if [ "$CONFIG_TRIX" = "y" ]; then
int 'AudioTriX second (duplex) DMA 0, 1 or 3' TRIX_DMA2 3
fi
if [ "$CONFIG_TRIX" = "y" ]; then
hex 'AudioTriX MIDI I/O base 330, 370, 3B0 or 3F0' TRIX_MPU_BASE 330
fi
if [ "$CONFIG_TRIX" = "y" ]; then
int 'AudioTriX MIDI IRQ 3, 4, 5, 7 or 9' TRIX_MPU_IRQ 9
fi
if [ "$CONFIG_TRIX" = "y" ]; then
hex 'AudioTriX SB I/O base 220, 210, 230, 240, 250, 260 or 270' TRIX_SB_BASE 220
fi
if [ "$CONFIG_TRIX" = "y" ]; then
int 'AudioTriX SB IRQ 3, 4, 5 or 7' TRIX_SB_IRQ 7
fi
if [ "$CONFIG_TRIX" = "y" ]; then
int 'AudioTriX SB DMA 1 or 3' TRIX_SB_DMA 1
fi
if [ "$CONFIG_CS4232" = "y" ]; then
hex 'CS4232 audio I/O base 530, 604, E80 or F40' CS4232_BASE 530
fi
if [ "$CONFIG_CS4232" = "y" ]; then
int 'CS4232 audio IRQ 5, 7, 9, 11, 12 or 15' CS4232_IRQ 11
fi
if [ "$CONFIG_CS4232" = "y" ]; then
int 'CS4232 audio DMA 0, 1 or 3' CS4232_DMA 0
fi
if [ "$CONFIG_CS4232" = "y" ]; then
int 'CS4232 second (duplex) DMA 0, 1 or 3' CS4232_DMA2 3
fi
if [ "$CONFIG_CS4232" = "y" ]; then
hex 'CS4232 MIDI I/O base 330, 370, 3B0 or 3F0' CS4232_MPU_BASE 330
fi
if [ "$CONFIG_CS4232" = "y" ]; then
int 'CS4232 MIDI IRQ 5, 7, 9, 11, 12 or 15' CS4232_MPU_IRQ 9
fi
if [ "$CONFIG_MAD16" = "y" ]; then
hex 'MAD16 audio I/O base 530, 604, E80 or F40' MAD16_BASE 530
fi
if [ "$CONFIG_MAD16" = "y" ]; then
int 'MAD16 audio IRQ 7, 9, 10 or 11' MAD16_IRQ 11
fi
if [ "$CONFIG_MAD16" = "y" ]; then
int 'MAD16 audio DMA 0, 1 or 3' MAD16_DMA 3
fi
if [ "$CONFIG_MAD16" = "y" ]; then
int 'MAD16 second (duplex) DMA 0, 1 or 3' MAD16_DMA2 0
fi
if [ "$CONFIG_MAD16" = "y" ]; then
hex 'MAD16 MIDI I/O base 300, 310, 320 or 330 (0 disables)' MAD16_MPU_BASE 330
fi
if [ "$CONFIG_MAD16" = "y" ]; then
int 'MAD16 MIDI IRQ 5, 7, 9 or 10' MAD16_MPU_IRQ 9
fi
if [ "$CONFIG_AUDIO" = "y" ]; then
int 'Audio DMA buffer size 4096, 16384, 32768 or 65536' DSP_BUFFSIZE 65536
fi
#
$MAKE -C drivers/sound kernelconfig || exit 1
drivers/sound/sequencer.c
View file @
a0f3dc93
...
...
@@ -926,6 +926,9 @@ play_event (unsigned char *q)
dev
=
q
[
2
];
if
(
dev
<
0
||
dev
>=
num_midis
)
break
;
if
(
!
midi_devs
[
dev
]
->
putc
(
dev
,
q
[
1
]))
{
/*
...
...
fs/Config.in
View file @
a0f3dc93
...
...
@@ -35,7 +35,7 @@ fi
tristate 'ISO9660 cdrom filesystem support' CONFIG_ISO9660_FS
tristate 'OS/2 HPFS filesystem support (read only)' CONFIG_HPFS_FS
tristate 'System V and Coherent filesystem support' CONFIG_SYSV_FS
if [ "$CONFIG_EXPERIMENTAL = "y" ]; then
if [ "$CONFIG_EXPERIMENTAL
"
= "y" ]; then
tristate 'Amiga FFS filesystem support (EXPERIMENTAL)' CONFIG_AFFS_FS
if [ "$CONFIG_AFFS_FS" != "n" ]; then
define_bool CONFIG_AMIGA_PARTITION y
...
...
@@ -43,7 +43,7 @@ if [ "$CONFIG_EXPERIMENTAL = "y" ]; then
fi
tristate 'UFS filesystem support (read only)' CONFIG_UFS_FS
if [ "$CONFIG_UFS_FS" != "n" ]; then
bool
"BSD disklabel (FreeBSD partition tables) support"
CONFIG_BSD_DISKLABEL
bool
"SMD disklabel (Sun partition tables) support"
CONFIG_SMD_DISKLABEL
bool
'BSD disklabel (FreeBSD partition tables) support'
CONFIG_BSD_DISKLABEL
bool
'SMD disklabel (Sun partition tables) support'
CONFIG_SMD_DISKLABEL
fi
endmenu
fs/buffer.c
View file @
a0f3dc93
...
...
@@ -1099,7 +1099,7 @@ static struct buffer_head * create_buffers(unsigned long page, unsigned long siz
static
inline
void
after_unlock_page
(
struct
page
*
page
)
{
if
(
clear_bit
(
PG_decr_after
,
&
page
->
flags
))
nr_async_pages
--
;
atomic_dec
(
&
nr_async_pages
)
;
if
(
clear_bit
(
PG_free_after
,
&
page
->
flags
))
free_page
(
page_address
(
page
));
if
(
clear_bit
(
PG_swap_unlock_after
,
&
page
->
flags
))
...
...
@@ -1250,11 +1250,12 @@ void unlock_buffer(struct buffer_head * bh)
struct
buffer_head
*
tmp
;
struct
page
*
page
;
clear_bit
(
BH_Lock
,
&
bh
->
b_state
);
wake_up
(
&
bh
->
b_wait
);
if
(
!
test_bit
(
BH_FreeOnIO
,
&
bh
->
b_state
))
if
(
!
test_bit
(
BH_FreeOnIO
,
&
bh
->
b_state
))
{
/* This is a normal buffer. */
clear_bit
(
BH_Lock
,
&
bh
->
b_state
);
wake_up
(
&
bh
->
b_wait
);
return
;
}
/* This is a temporary buffer used for page I/O. */
page
=
mem_map
+
MAP_NR
(
bh
->
b_data
);
if
(
!
PageLocked
(
page
))
{
...
...
@@ -1268,17 +1269,18 @@ void unlock_buffer(struct buffer_head * bh)
}
/* Async buffer_heads are here only as labels for IO, and get
thrown away once the IO for this page is complete. IO is
deemed complete once all buffers have been visited
(b_count==0) and are now unlocked. */
bh
->
b_count
--
;
deemed complete once all buffers have been unlocked. */
if
(
!
test_bit
(
BH_Uptodate
,
&
bh
->
b_state
))
set_bit
(
PG_error
,
&
page
->
flags
);
clear_bit
(
BH_Lock
,
&
bh
->
b_state
);
wake_up
(
&
bh
->
b_wait
);
for
(
tmp
=
bh
;
tmp
=
tmp
->
b_this_page
,
tmp
!=
bh
;
)
{
if
(
test_bit
(
BH_Lock
,
&
tmp
->
b_state
)
||
tmp
->
b_count
)
if
(
test_bit
(
BH_Lock
,
&
tmp
->
b_state
))
return
;
}
/* OK, the async IO on this page is complete. */
clear_bit
(
PG_locked
,
&
page
->
flags
);
if
(
!
clear_bit
(
PG_locked
,
&
page
->
flags
))
return
;
wake_up
(
&
page
->
wait
);
free_async_buffers
(
bh
);
after_unlock_page
(
page
);
...
...
fs/ext2/ioctl.c
View file @
a0f3dc93
...
...
@@ -37,11 +37,12 @@ int ext2_ioctl (struct inode * inode, struct file * filp, unsigned int cmd,
return
err
;
flags
=
get_user
((
int
*
)
arg
);
/*
* The IMMUTABLE
flag can only be changed by the super user
* when the security level is zero.
* The IMMUTABLE
and APPEND_ONLY flags can only be changed by
*
the super user
when the security level is zero.
*/
if
((
flags
&
EXT2_IMMUTABLE_FL
)
^
(
inode
->
u
.
ext2_i
.
i_flags
&
EXT2_IMMUTABLE_FL
))
{
if
((
flags
&
(
EXT2_APPEND_FL
|
EXT2_IMMUTABLE_FL
))
^
(
inode
->
u
.
ext2_i
.
i_flags
&
(
EXT2_APPEND_FL
|
EXT2_IMMUTABLE_FL
)))
{
/* This test looks nicer. Thanks to Pauline Middelink */
if
(
!
fsuser
()
||
securelevel
>
0
)
return
-
EPERM
;
...
...
fs/locks.c
View file @
a0f3dc93
...
...
@@ -82,6 +82,9 @@
* be compiled with different options than the kernel itself.
* Andy Walker (andy@lysaker.kvaerner.no), May 15, 1996.
*
* Added a couple of missing wake_up() calls.
* Andy Walker (andy@lysaker.kvaerner.no), May 15, 1996.
*
* TODO: Do not honour mandatory locks on remote file systems. This matches
* the SVR4 semantics and neatly sidesteps a pile of awkward issues that
* would otherwise have to be addressed.
...
...
@@ -882,9 +885,12 @@ static int posix_lock_file(struct file *filp, struct file_lock *caller,
locks_insert_lock
(
before
,
left
);
}
right
->
fl_start
=
caller
->
fl_end
+
1
;
wake_up
(
&
right
->
fl_wait
);
}
if
(
left
)
if
(
left
)
{
left
->
fl_end
=
caller
->
fl_start
-
1
;
wake_up
(
&
left
->
fl_wait
);
}
return
(
0
);
}
...
...
fs/ncpfs/dir.c
View file @
a0f3dc93
...
...
@@ -14,6 +14,7 @@
#include <linux/ncp_fs.h>
#include <asm/segment.h>
#include <linux/errno.h>
#include <linux/locks.h>
#include "ncplib_kernel.h"
struct
ncp_dirent
{
...
...
@@ -807,6 +808,7 @@ ncp_lookup(struct inode *dir, const char *__name, int len,
memcpy
(
name
,
__name
,
len
);
name
[
len
]
=
0
;
lock_super
(
dir
->
i_sb
);
result_info
=
ncp_find_dir_inode
(
dir
,
name
);
if
(
result_info
!=
0
)
...
...
@@ -820,6 +822,7 @@ ncp_lookup(struct inode *dir, const char *__name, int len,
inode number */
*
result
=
iget
(
dir
->
i_sb
,
ncp_info_ino
(
server
,
result_info
));
unlock_super
(
dir
->
i_sb
);
iput
(
dir
);
if
(
*
result
==
NULL
)
...
...
@@ -881,6 +884,7 @@ ncp_lookup(struct inode *dir, const char *__name, int len,
}
if
(
res
!=
0
)
{
unlock_super
(
dir
->
i_sb
);
iput
(
dir
);
return
-
ENOENT
;
}
...
...
@@ -891,10 +895,12 @@ ncp_lookup(struct inode *dir, const char *__name, int len,
if
(
!
(
*
result
=
ncp_iget
(
dir
,
&
finfo
)))
{
unlock_super
(
dir
->
i_sb
);
iput
(
dir
);
return
-
EACCES
;
}
unlock_super
(
dir
->
i_sb
);
iput
(
dir
);
return
0
;
}
...
...
@@ -924,6 +930,7 @@ ncp_create(struct inode *dir, const char *name, int len, int mode,
_name
[
len
]
=
'\0'
;
str_upper
(
_name
);
lock_super
(
dir
->
i_sb
);
if
(
ncp_open_create_file_or_subdir
(
NCP_SERVER
(
dir
),
NCP_ISTRUCT
(
dir
),
_name
,
OC_MODE_CREATE
|
OC_MODE_OPEN
|
...
...
@@ -931,6 +938,7 @@ ncp_create(struct inode *dir, const char *name, int len, int mode,
0
,
AR_READ
|
AR_WRITE
,
&
finfo
)
!=
0
)
{
unlock_super
(
dir
->
i_sb
);
iput
(
dir
);
return
-
EACCES
;
}
...
...
@@ -943,10 +951,12 @@ ncp_create(struct inode *dir, const char *name, int len, int mode,
if
(
!
(
*
result
=
ncp_iget
(
dir
,
&
finfo
))
<
0
)
{
ncp_close_file
(
NCP_SERVER
(
dir
),
finfo
.
file_handle
);
unlock_super
(
dir
->
i_sb
);
iput
(
dir
);
return
-
EINVAL
;
}
unlock_super
(
dir
->
i_sb
);
iput
(
dir
);
return
0
;
}
...
...
fs/ncpfs/file.c
View file @
a0f3dc93
...
...
@@ -15,6 +15,7 @@
#include <linux/stat.h>
#include <linux/mm.h>
#include <linux/ncp_fs.h>
#include <linux/locks.h>
#include "ncplib_kernel.h"
#include <linux/malloc.h>
...
...
@@ -44,8 +45,10 @@ ncp_make_open(struct inode *i, int right)
DPRINTK
(
"ncp_make_open: dirent->opened = %d
\n
"
,
finfo
->
opened
);
lock_super
(
i
->
i_sb
);
if
(
finfo
->
opened
==
0
)
{
finfo
->
access
=
-
1
;
/* tries max. rights */
if
(
ncp_open_create_file_or_subdir
(
NCP_SERVER
(
i
),
NULL
,
NULL
,
...
...
@@ -63,12 +66,10 @@ ncp_make_open(struct inode *i, int right)
{
finfo
->
access
=
O_RDONLY
;
}
else
{
return
-
EACCES
;
}
}
unlock_super
(
i
->
i_sb
);
if
(
((
right
==
O_RDONLY
)
&&
(
(
finfo
->
access
==
O_RDONLY
)
||
(
finfo
->
access
==
O_RDWR
)))
||
((
right
==
O_WRONLY
)
&&
(
(
finfo
->
access
==
O_WRONLY
)
...
...
fs/ncpfs/inode.c
View file @
a0f3dc93
...
...
@@ -129,7 +129,9 @@ static void
ncp_put_inode
(
struct
inode
*
inode
)
{
struct
nw_file_info
*
finfo
=
NCP_FINFO
(
inode
);
struct
super_block
*
sb
=
inode
->
i_sb
;
lock_super
(
sb
);
if
(
finfo
->
opened
!=
0
)
{
if
(
ncp_close_file
(
NCP_SERVER
(
inode
),
finfo
->
file_handle
)
!=
0
)
...
...
@@ -152,6 +154,7 @@ ncp_put_inode(struct inode *inode)
}
clear_inode
(
inode
);
unlock_super
(
sb
);
}
struct
super_block
*
...
...
include/asm-i386/posix_types.h
View file @
a0f3dc93
...
...
@@ -27,6 +27,10 @@ typedef char * __kernel_caddr_t;
typedef
long
long
__kernel_loff_t
;
#endif
typedef
struct
{
int
val
[
2
];
}
__kernel_fsid_t
;
#undef __FD_SET
#define __FD_SET(fd,fdsetp) \
__asm__ __volatile__("btsl %1,%0": \
...
...
include/asm-i386/statfs.h
View file @
a0f3dc93
#ifndef _I386_STATFS_H
#define _I386_STATFS_H
typedef
struct
{
long
val
[
2
];
}
fsid_t
;
#ifndef __KERNEL_STRICT_NAMES
#include <linux/types.h>
typedef
__kernel_fsid_t
fsid_t
;
#endif
struct
statfs
{
long
f_type
;
...
...
@@ -13,7 +17,7 @@ struct statfs {
long
f_bavail
;
long
f_files
;
long
f_ffree
;
fsid_t
f_fsid
;
__kernel_
fsid_t
f_fsid
;
long
f_namelen
;
long
f_spare
[
6
];
};
...
...
include/asm-m68k/posix_types.h
View file @
a0f3dc93
...
...
@@ -27,6 +27,10 @@ typedef char * __kernel_caddr_t;
typedef
long
long
__kernel_loff_t
;
#endif
typedef
struct
{
int
val
[
2
];
}
__kernel_fsid_t
;
#undef __FD_SET
#define __FD_SET(d, set) ((set)->fds_bits[__FDELT(d)] |= __FDMASK(d))
...
...
include/asm-m68k/statfs.h
View file @
a0f3dc93
#ifndef _M68K_STATFS_H
#define _M68K_STATFS_H
typedef
struct
{
long
val
[
2
];
}
fsid_t
;
#ifndef __KERNEL_STRICT_NAMES
#include <linux/types.h>
typedef
__kernel_fsid_t
fsid_t
;
#endif
struct
statfs
{
long
f_type
;
...
...
@@ -13,7 +17,7 @@ struct statfs {
long
f_bavail
;
long
f_files
;
long
f_ffree
;
fsid_t
f_fsid
;
__kernel_
fsid_t
f_fsid
;
long
f_namelen
;
long
f_spare
[
6
];
};
...
...
include/asm-ppc/statfs.h
View file @
a0f3dc93
#ifndef _PPC_STATFS_H
#define _PPC_STATFS_H
typedef
struct
{
long
val
[
2
];
}
fsid_t
;
#ifndef __KERNEL_STRICT_NAMES
#include <linux/types.h>
typedef
__kernel_fsid_t
fsid_t
;
#endif
struct
statfs
{
long
f_type
;
...
...
@@ -13,7 +17,7 @@ struct statfs {
long
f_bavail
;
long
f_files
;
long
f_ffree
;
fsid_t
f_fsid
;
__kernel_
fsid_t
f_fsid
;
long
f_namelen
;
long
f_spare
[
6
];
};
...
...
include/asm-sparc/posix_types.h
View file @
a0f3dc93
...
...
@@ -34,6 +34,10 @@ typedef char * __kernel_caddr_t;
typedef
long
long
__kernel_loff_t
;
#endif
typedef
struct
{
int
val
[
2
];
}
__kernel_fsid_t
;
#undef __FD_SET
static
__inline__
void
__FD_SET
(
unsigned
long
fd
,
__kernel_fd_set
*
fdsetp
)
{
...
...
include/asm-sparc/statfs.h
View file @
a0f3dc93
...
...
@@ -2,9 +2,13 @@
#ifndef _SPARC_STATFS_H
#define _SPARC_STATFS_H
typedef
struct
{
long
val
[
2
];
}
fsid_t
;
#ifndef __KERNEL_STRICT_NAMES
#include <linux/types.h>
typedef
__kernel_fsid_t
fsid_t
;
#endif
struct
statfs
{
long
f_type
;
...
...
@@ -14,7 +18,7 @@ struct statfs {
long
f_bavail
;
long
f_files
;
long
f_ffree
;
fsid_t
f_fsid
;
__kernel_
fsid_t
f_fsid
;
long
f_namelen
;
/* SunOS ignores this field. */
long
f_spare
[
6
];
};
...
...
include/linux/interrupt.h
View file @
a0f3dc93
...
...
@@ -14,6 +14,7 @@ struct irqaction {
struct
irqaction
*
next
;
};
extern
unsigned
long
intr_count
;
extern
int
bh_mask_count
[
32
];
extern
unsigned
long
bh_active
;
...
...
include/linux/sched.h
View file @
a0f3dc93
...
...
@@ -11,7 +11,6 @@
#include <asm/param.h>
/* for HZ */
extern
unsigned
long
intr_count
;
extern
unsigned
long
event
;
#include <linux/binfmts.h>
...
...
include/linux/swap.h
View file @
a0f3dc93
...
...
@@ -9,6 +9,8 @@
#ifdef __KERNEL__
#include <asm/atomic.h>
#define SWP_USED 1
#define SWP_WRITEOK 3
...
...
@@ -32,7 +34,7 @@ struct swap_info_struct {
extern
int
nr_swap_pages
;
extern
int
nr_free_pages
;
extern
in
t
nr_async_pages
;
extern
atomic_
t
nr_async_pages
;
extern
int
min_free_pages
;
extern
int
free_pages_low
;
extern
int
free_pages_high
;
...
...
include/linux/sysctl.h
View file @
a0f3dc93
...
...
@@ -70,33 +70,41 @@ struct __sysctl_args {
#define VM_MAXID 5
/* CTL_NET names: */
#define NET_CORE 1
#define NET_ETHER 2
#define NET_802 3
#define NET_UNIX 4
#define NET_IPV4 5
#define NET_IPX 6
#define NET_ATALK 7
#define NET_NETROM 8
#define NET_AX25 9
#define NET_BRIDGE 10
/* /proc/sys/net/core */
#define NET_CORE 0x01000000
/* /proc/sys/net/ethernet */
#define NET_ETHER 0x02000000
/* /proc/sys/net/802 */
#define NET_802 0x03000000
/* /proc/sys/net/unix */
#define NET_UNIX 0x04000000
/* /proc/sys/net/ipv4 */
#define NET_IPV4 0x05000000
#define NET_IPV4_ARP_RES_TIME 1
#define NET_IPV4_ARP_DEAD_RES_TIME 2
#define NET_IPV4_ARP_MAX_TRIES 3
#define NET_IPV4_ARP_TIMEOUT 4
#define NET_IPV4_ARP_CHECK_INTERVAL 5
#define NET_IPV4_ARP_CONFIRM_INTERVAL 6
#define NET_IPV4_ARP_CONFIRM_TIMEOUT 7
/* /proc/sys/net/ipx */
#define NET_IPX 0x06000000
/* /proc/sys/net/appletalk */
#define NET_ATALK 0x07000000
/* /proc/sys/net/netrom */
#define NET_NETROM 0x08000000
/* /proc/sys/net/ax25 */
#define NET_AX25 0x09000000
/* CTL_PROC names: */
...
...
include/net/ip_masq.h
View file @
a0f3dc93
...
...
@@ -85,6 +85,7 @@ extern int ip_masq_init(void);
* functions called from ip layer
*/
extern
int
ip_fw_masquerade
(
struct
sk_buff
**
,
struct
device
*
);
extern
int
ip_fw_masq_icmp
(
struct
sk_buff
**
,
struct
device
*
);
extern
int
ip_fw_demasquerade
(
struct
sk_buff
**
,
struct
device
*
);
/*
...
...
ipc/msg.c
View file @
a0f3dc93
...
...
@@ -14,6 +14,7 @@
#include <linux/stat.h>
#include <linux/malloc.h>
#include <linux/kerneld.h>
#include <linux/interrupt.h>
#include <asm/segment.h>
...
...
kernel/exit.c
View file @
a0f3dc93
...
...
@@ -15,6 +15,7 @@
#include <linux/mm.h>
#include <linux/tty.h>
#include <linux/malloc.h>
#include <linux/interrupt.h>
#include <asm/segment.h>
#include <asm/pgtable.h>
...
...
mm/kmalloc.c
View file @
a0f3dc93
...
...
@@ -16,6 +16,8 @@
#include <linux/mm.h>
#include <linux/delay.h>
#include <linux/interrupt.h>
#include <asm/system.h>
#include <asm/dma.h>
...
...
mm/page_alloc.c
View file @
a0f3dc93
...
...
@@ -16,6 +16,7 @@
#include <linux/swap.h>
#include <linux/fs.h>
#include <linux/swapctl.h>
#include <linux/interrupt.h>
#include <asm/dma.h>
#include <asm/system.h>
/* for cli()/sti() */
...
...
mm/page_io.c
View file @
a0f3dc93
...
...
@@ -84,7 +84,7 @@ void rw_swap_page(int rw, unsigned long entry, char * buf, int wait)
set_bit
(
PG_decr_after
,
&
page
->
flags
);
set_bit
(
PG_swap_unlock_after
,
&
page
->
flags
);
page
->
swap_unlock_entry
=
entry
;
nr_async_pages
++
;
atomic_inc
(
&
nr_async_pages
)
;
}
ll_rw_page
(
rw
,
p
->
swap_device
,
offset
,
buf
);
/*
...
...
mm/swap.c
View file @
a0f3dc93
...
...
@@ -44,7 +44,7 @@ int free_pages_high = 40;
/* We track the number of pages currently being asynchronously swapped
out, so that we don't try to swap TOO many pages out at once */
in
t
nr_async_pages
=
0
;
atomic_
t
nr_async_pages
=
0
;
/*
* Constants for the page aging mechanism: the maximum age (actually,
...
...
net/bridge/Makefile
View file @
a0f3dc93
...
...
@@ -8,7 +8,7 @@
# Note 2! The CFLAGS definition is now in the main makefile...
O_TARGET
:=
bridge.o
O_OBJS
:=
br.o br_tree.o
O_OBJS
:=
br.o br_tree.o
sysctl_net_bridge.o
M_OBJS
:=
$(O_TARGET)
include
$(TOPDIR)/Rules.make
...
...
net/bridge/sysctl_net_bridge.c
0 → 100644
View file @
a0f3dc93
/* -*- linux-c -*-
* sysctl_net_bridge.c: sysctl interface to net bridge subsystem.
*
* Begun June 1, 1996, Mike Shaver.
* Added /proc/sys/net/bridge directory entry (empty =) ). [MS]
*/
#include <linux/mm.h>
#include <linux/sysctl.h>
ctl_table
bridge_table
[]
=
{
{
0
}
};
net/core/datagram.c
View file @
a0f3dc93
...
...
@@ -18,6 +18,7 @@
* Darryl Miles : Fixed non-blocking SOCK_SEQPACKET.
* Linus Torvalds : BSD semantic fixes.
* Alan Cox : Datagram iovec handling
* Darryl Miles : Fixed non-blocking SOCK_STREAM.
*
*/
...
...
@@ -47,6 +48,7 @@
* Interrupts off so that no packet arrives before we begin sleeping.
* Otherwise we might miss our wake up
*/
static
inline
void
wait_for_packet
(
struct
sock
*
sk
)
{
unsigned
long
flags
;
...
...
@@ -60,6 +62,16 @@ static inline void wait_for_packet(struct sock * sk)
lock_sock
(
sk
);
}
/*
* Is a socket 'connection oriented' ?
*/
static
inline
int
connection_based
(
struct
sock
*
sk
)
{
if
(
sk
->
type
==
SOCK_SEQPACKET
||
sk
->
type
==
SOCK_STREAM
)
return
1
;
return
0
;
}
/*
* Get a datagram skbuff, understands the peeking, nonblocking wakeups and possible
...
...
@@ -92,7 +104,7 @@ struct sk_buff *skb_recv_datagram(struct sock *sk, unsigned flags, int noblock,
/* Sequenced packets can come disconnected. If so we report the problem */
error
=
-
ENOTCONN
;
if
(
sk
->
type
==
SOCK_SEQPACKET
&&
sk
->
state
!=
TCP_ESTABLISHED
)
if
(
connection_based
(
sk
)
&&
sk
->
state
!=
TCP_ESTABLISHED
)
goto
no_packet
;
/* User doesn't want to wait */
...
...
@@ -186,7 +198,7 @@ int datagram_select(struct sock *sk, int sel_type, select_table *wait)
return
1
;
if
(
sk
->
shutdown
&
RCV_SHUTDOWN
)
return
1
;
if
(
sk
->
type
==
SOCK_SEQPACKET
&&
sk
->
state
==
TCP_CLOSE
)
if
(
connection_based
(
sk
)
&&
sk
->
state
==
TCP_CLOSE
)
{
/* Connection closed: Wake up */
return
(
1
);
...
...
@@ -203,7 +215,7 @@ int datagram_select(struct sock *sk, int sel_type, select_table *wait)
return
1
;
if
(
sk
->
shutdown
&
SEND_SHUTDOWN
)
return
1
;
if
(
sk
->
type
==
SOCK_SEQPACKET
&&
sk
->
state
==
TCP_SYN_SENT
)
if
(
connection_based
(
sk
)
&&
sk
->
state
==
TCP_SYN_SENT
)
{
/* Connection still in progress */
break
;
...
...
net/ipv4/arp.c
View file @
a0f3dc93
...
...
@@ -4,14 +4,15 @@
*
* This module implements the Address Resolution Protocol ARP (RFC 826),
* which is used to convert IP addresses (or in the future maybe other
* high-level addresses into a low-level hardware address (like an Ethernet
* high-level addresses
)
into a low-level hardware address (like an Ethernet
* address).
*
* FIXME:
* Experiment with better retransmit timers
* Clean up the timer deletions
* If you create a proxy entry set your interface address to the address
* and then delete it, proxies may get out of sync with reality - check this
* If you create a proxy entry, set your interface address to the address
* and then delete it, proxies may get out of sync with reality -
* check this.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
...
...
@@ -19,11 +20,12 @@
* 2 of the License, or (at your option) any later version.
*
* Fixes:
* Alan Cox : Removed the ethernet assumptions in Florian's code
* Alan Cox : Fixed some small errors in the ARP logic
* Alan Cox : Removed the ethernet assumptions in
* Florian's code
* Alan Cox : Fixed some small errors in the ARP
* logic
* Alan Cox : Allow >4K in /proc
* Alan Cox : Make ARP add its own protocol entry
*
* Ross Martin : Rewrote arp_rcv() and arp_get_info()
* Stephen Henson : Add AX25 support to arp_get_info()
* Alan Cox : Drop data when a device is downed.
...
...
@@ -46,7 +48,8 @@
* during arp_rcv.
* Russ Nelson : Tidied up a few bits.
* Alexey Kuznetsov: Major changes to caching and behaviour,
* eg intelligent arp probing and generation
* eg intelligent arp probing and
* generation
* of host down events.
* Alan Cox : Missing unlock in device events.
* Eckes : ARP ioctl control errors.
...
...
@@ -54,12 +57,13 @@
* Manuel Rodriguez: Gratuitous ARP.
* Jonathan Layes : Added arpd support through kerneld
* message queue (960314)
* Mike Shaver : /proc/sys/net/ipv4/arp_* support
*/
/* RFC1122 Status:
2.3.2.1 (ARP Cache Validation):
MUST provide mechanism to flush stale cache entries (OK)
SHOULD be able to configure cache timeout (
NOT YET
)
SHOULD be able to configure cache timeout (
OK
)
MUST throttle ARP retransmits (OK)
2.3.2.2 (ARP Packet Queue):
SHOULD save at least one packet from each "conversation" with an
...
...
@@ -121,12 +125,9 @@
* and dynamic routing.
*/
#ifndef CONFIG_ARPD
#define ARP_TIMEOUT (600*HZ)
#else
#define ARP_TIMEOUT (60*HZ)
#define ARPD_TIMEOUT (600*HZ)
#endif
int
sysctl_arp_timeout
=
ARP_TIMEOUT
;
/*
* How often is ARP cache checked for expire.
...
...
@@ -135,11 +136,13 @@
#define ARP_CHECK_INTERVAL (60*HZ)
int
sysctl_arp_check_interval
=
ARP_CHECK_INTERVAL
;
/*
* Soft limit on ARP cache size.
* Note that this number should be greater
,
than
* number of simultaneously opened sockets, else
* hardware header cache will
be not
efficient.
* Note that this number should be greater than
* number of simultaneously opened sockets,
or
else
* hardware header cache will
not be
efficient.
*/
#if RT_CACHE_DEBUG >= 2
...
...
@@ -162,6 +165,8 @@
#define ARP_RES_TIME (5*HZ)
int
sysctl_arp_res_time
=
ARP_RES_TIME
;
/*
* The number of times an broadcast arp request is send, until
* the host is considered temporarily unreachable.
...
...
@@ -169,6 +174,8 @@
#define ARP_MAX_TRIES 3
int
sysctl_arp_max_tries
=
ARP_MAX_TRIES
;
/*
* The entry is reconfirmed by sending point-to-point ARP
* request after ARP_CONFIRM_INTERVAL.
...
...
@@ -183,12 +190,16 @@
#define ARP_CONFIRM_INTERVAL (300*HZ)
int
sysctl_arp_confirm_interval
=
ARP_CONFIRM_INTERVAL
;
/*
* We wait for answer to unicast request for ARP_CONFIRM_TIMEOUT.
*/
#define ARP_CONFIRM_TIMEOUT ARP_RES_TIME
int
sysctl_arp_confirm_timeout
=
ARP_CONFIRM_TIMEOUT
;
/*
* The number of times an unicast arp request is retried, until
* the cache entry is considered suspicious.
...
...
@@ -198,6 +209,8 @@
#define ARP_MAX_PINGS 1
int
sysctl_arp_max_pings
=
ARP_MAX_PINGS
;
/*
* When a host is dead, but someone tries to connect it,
* we do not remove corresponding cache entry (it would
...
...
@@ -211,6 +224,8 @@
#define ARP_DEAD_RES_TIME (60*HZ)
int
sysctl_arp_dead_res_time
=
ARP_DEAD_RES_TIME
;
/*
* This structure defines the ARP mapping cache.
*/
...
...
@@ -741,7 +756,7 @@ static int arp_force_expire(void)
cli
();
users
=
arp_count_hhs
(
entry
);
if
(
!
users
&&
now
-
entry
->
last_used
>
ARP_TIMEOUT
)
if
(
!
users
&&
now
-
entry
->
last_used
>
sysctl_arp_timeout
)
{
*
pentry
=
entry
->
next
;
restore_flags
(
flags
);
...
...
@@ -820,7 +835,7 @@ static void arp_check_expire(unsigned long dummy)
}
cli
();
if
(
now
-
entry
->
last_used
>
ARP_TIMEOUT
if
(
now
-
entry
->
last_used
>
sysctl_arp_timeout
&&
!
arp_count_hhs
(
entry
))
{
*
pentry
=
entry
->
next
;
...
...
@@ -833,11 +848,11 @@ static void arp_check_expire(unsigned long dummy)
}
sti
();
if
(
entry
->
last_updated
&&
now
-
entry
->
last_updated
>
ARP_CONFIRM_INTERVAL
&&
now
-
entry
->
last_updated
>
sysctl_arp_confirm_interval
&&
!
(
entry
->
flags
&
ATF_PERM
))
{
struct
device
*
dev
=
entry
->
dev
;
entry
->
retries
=
ARP_MAX_TRIES
+
ARP_MAX_PINGS
;
entry
->
retries
=
sysctl_arp_max_tries
+
sysctl_arp_max_pings
;
del_timer
(
&
entry
->
timer
);
entry
->
timer
.
expires
=
jiffies
+
ARP_CONFIRM_TIMEOUT
;
add_timer
(
&
entry
->
timer
);
...
...
@@ -859,7 +874,7 @@ static void arp_check_expire(unsigned long dummy)
* Set the timer again.
*/
arp_timer
.
expires
=
jiffies
+
ARP_CHECK_INTERVAL
;
arp_timer
.
expires
=
jiffies
+
sysctl_arp_check_interval
;
add_timer
(
&
arp_timer
);
}
...
...
@@ -909,7 +924,7 @@ static void arp_expire_request (unsigned long arg)
*/
if
((
entry
->
flags
&
ATF_COM
)
&&
entry
->
last_updated
&&
jiffies
-
entry
->
last_updated
<=
ARP_CONFIRM_INTERVAL
)
&&
jiffies
-
entry
->
last_updated
<=
sysctl_arp_confirm_interval
)
{
restore_flags
(
flags
);
arp_unlock
();
...
...
@@ -926,10 +941,10 @@ static void arp_expire_request (unsigned long arg)
printk
(
"arp_expire_request: %08x timed out
\n
"
,
entry
->
ip
);
#endif
/* Set new timer. */
entry
->
timer
.
expires
=
jiffies
+
ARP_RES_TIME
;
entry
->
timer
.
expires
=
jiffies
+
sysctl_arp_res_time
;
add_timer
(
&
entry
->
timer
);
arp_send
(
ARPOP_REQUEST
,
ETH_P_ARP
,
entry
->
ip
,
dev
,
dev
->
pa_addr
,
entry
->
retries
>
ARP_MAX_TRIES
?
entry
->
ha
:
NULL
,
entry
->
retries
>
sysctl_arp_max_tries
?
entry
->
ha
:
NULL
,
dev
->
dev_addr
,
NULL
);
arp_unlock
();
return
;
...
...
@@ -956,7 +971,7 @@ static void arp_expire_request (unsigned long arg)
#if RT_CACHE_DEBUG >= 2
printk
(
"arp_expire_request: %08x is dead
\n
"
,
entry
->
ip
);
#endif
entry
->
retries
=
ARP_MAX_TRIES
;
entry
->
retries
=
sysctl_arp_max_tries
;
entry
->
flags
&=
~
ATF_COM
;
arp_invalidate_hhs
(
entry
);
restore_flags
(
flags
);
...
...
@@ -967,7 +982,7 @@ static void arp_expire_request (unsigned long arg)
entry
->
last_updated
=
0
;
arpd_update
(
entry
);
entry
->
timer
.
expires
=
jiffies
+
ARP_DEAD_RES_TIME
;
entry
->
timer
.
expires
=
jiffies
+
sysctl_arp_dead_res_time
;
add_timer
(
&
entry
->
timer
);
arp_send
(
ARPOP_REQUEST
,
ETH_P_ARP
,
entry
->
ip
,
dev
,
dev
->
pa_addr
,
NULL
,
dev
->
dev_addr
,
NULL
);
...
...
@@ -1317,7 +1332,7 @@ struct arp_table * arp_new_entry(u32 paddr, struct device *dev, struct hh_cache
atomic_inc
(
&
hh
->
hh_refcnt
);
hh
->
hh_arp
=
(
void
*
)
entry
;
}
entry
->
timer
.
expires
=
jiffies
+
ARP_RES_TIME
;
entry
->
timer
.
expires
=
jiffies
+
sysctl_arp_res_time
;
if
(
skb
!=
NULL
)
{
...
...
@@ -1331,7 +1346,7 @@ struct arp_table * arp_new_entry(u32 paddr, struct device *dev, struct hh_cache
entry
->
next
=
arp_tables
[
hash
];
arp_tables
[
hash
]
=
entry
;
add_timer
(
&
entry
->
timer
);
entry
->
retries
=
ARP_MAX_TRIES
;
entry
->
retries
=
sysctl_arp_max_tries
;
#ifdef CONFIG_ARPD
if
(
!
arpd_not_running
)
arpd_lookup
(
paddr
,
dev
);
...
...
@@ -1573,8 +1588,8 @@ static void arp_run_bh()
entry
->
next
=
arp_tables
[
hash
];
arp_tables
[
hash
]
=
entry
;
restore_flags
(
flags
);
entry
->
timer
.
expires
=
jiffies
+
ARP_RES_TIME
;
entry
->
retries
=
ARP_MAX_TRIES
;
entry
->
timer
.
expires
=
jiffies
+
sysctl_arp_res_time
;
entry
->
retries
=
sysctl_arp_max_tries
;
entry
->
last_used
=
jiffies
;
if
(
!
(
entry
->
flags
&
ATF_COM
))
{
...
...
net/ipv4/icmp.c
View file @
a0f3dc93
...
...
@@ -16,18 +16,26 @@
* Fixes:
* Mike Shaver : RFC1122 checks.
* Alan Cox : Multicast ping reply as self.
* Alan Cox : Fix atomicity lockup in ip_build_xmit call
* Alan Cox : Added 216,128 byte paths to the MTU code.
* Alan Cox : Fix atomicity lockup in ip_build_xmit
* call.
* Alan Cox : Added 216,128 byte paths to the MTU
* code.
* Martin Mares : RFC1812 checks.
* Martin Mares : Can be configured to follow redirects if acting
* as a router _without_ a routing protocol (RFC 1812).
* Martin Mares : Echo requests may be configured to be ignored (RFC 1812).
* Martin Mares : Limitation of ICMP error message transmit rate (RFC 1812).
* Martin Mares : TOS and Precedence set correctly (RFC 1812).
* Martin Mares : Now copying as much data from the original packet
* as we can without exceeding 576 bytes (RFC 1812).
* Martin Mares : Can be configured to follow redirects
* if acting as a router _without_ a
* routing protocol (RFC 1812).
* Martin Mares : Echo requests may be configured to
* be ignored (RFC 1812).
* Martin Mares : Limitation of ICMP error message
* transmit rate (RFC 1812).
* Martin Mares : TOS and Precedence set correctly
* (RFC 1812).
* Martin Mares : Now copying as much data from the
* original packet as we can without
* exceeding 576 bytes (RFC 1812).
* Willy Konynenberg : Transparent proxying support.
*
* Keith Owens : RFC1191 correction for 4.2BSD based
* path MTU bug.
*
*
* RFC1122 (Host Requirements -- Comm. Layer) Status:
...
...
@@ -81,7 +89,8 @@
* MAY discard broadcast REQUESTs. (OK, but see source for inconsistency)
* MUST reply using same source address as the request was sent to. (OK)
* MUST reverse source route, as per ECHO (NOT YET)
* MUST pass REPLYs to transport/user layer (requires RAW, just like ECHO) (OK)
* MUST pass REPLYs to transport/user layer (requires RAW, just like
* ECHO) (OK)
* MUST update clock for timestamp at least 15 times/sec (OK)
* MUST be "correct within a few minutes" (OK)
* 3.2.2.9 (Address Mask Request/Reply)
...
...
@@ -108,10 +117,11 @@
* MUST use one of addresses for the interface the orig. packet arrived as
* source address (OK)
* 4.3.2.5 (TOS and Precedence)
* SHOULD leave TOS set to the same value unless the packet would be
discarded
* for that reason (OK)
* SHOULD leave TOS set to the same value unless the packet would be
*
discarded
for that reason (OK)
* MUST use TOS=0 if not possible to leave original value (OK)
* MUST leave IP Precedence for Source Quench messages (OK -- not sent at all)
* MUST leave IP Precedence for Source Quench messages (OK -- not sent
* at all)
* SHOULD use IP Precedence = 6 (Internetwork Control) or 7 (Network Control)
* for all other error messages (OK, we use 6)
* MAY allow configuration of IP Precedence (OK -- not done)
...
...
@@ -137,7 +147,8 @@
* is enabled on the interface (OK -- ignores)
* 4.3.3.3 (Source Quench)
* SHOULD NOT originate SQ messages (OK)
* MUST be able to limit SQ rate if originates them (OK as we don't send them)
* MUST be able to limit SQ rate if originates them (OK as we don't
* send them)
* MAY ignore SQ messages it receives (OK -- we don't)
* 4.3.3.4 (Time Exceeded)
* Requirements dealt with at IP (generating TIME_EXCEEDED).
...
...
@@ -166,16 +177,19 @@
* MUST reply using same source address as the request was sent to. (OK)
* MUST use reversed Source Route if possible (NOT YET)
* SHOULD update Record Route / Timestamp options (??)
* MUST pass REPLYs to transport/user layer (requires RAW, just like ECHO) (OK)
* MUST pass REPLYs to transport/user layer (requires RAW, just like
* ECHO) (OK)
* MUST update clock for timestamp at least 16 times/sec (OK)
* MUST be "correct within a few minutes" (OK)
* 4.3.3.9 (Address Mask Request/Reply)
* MUST have support for receiving AMRq and responding with AMRe (OK, but only as a
* compile-time option)
* SHOULD have option for each interface for AMRe's, MUST default to NO (NOT YET)
* MUST have support for receiving AMRq and responding with AMRe (OK,
* but only as a compile-time option)
* SHOULD have option for each interface for AMRe's, MUST default to
* NO (NOT YET)
* MUST NOT reply to AMRq before knows the correct AM (OK)
* MUST NOT respond to AMRq with source address 0.0.0.0 on physical interfaces
* having multiple logical i-faces with different masks (NOT YET)
* MUST NOT respond to AMRq with source address 0.0.0.0 on physical
* interfaces having multiple logical i-faces with different masks
* (NOT YET)
* SHOULD examine all AMRe's it receives and check them (NOT YET)
* SHOULD log invalid AMRe's (AM+sender) (NOT YET)
* MUST NOT use contents of AMRe to determine correct AM (OK)
...
...
@@ -192,8 +206,8 @@
* SHOULD NOT generate Host Isolated codes (OK)
* SHOULD use Communication Administratively Prohibited when administratively
* filtering packets (NOT YET -- bug-to-bug compatibility)
* MAY include config option for not generating the above and silently
discard
*
the packets instead (OK)
* MAY include config option for not generating the above and silently
*
discard
the packets instead (OK)
* MAY include config option for not generating Precedence Violation and
* Precedence Cutoff messages (OK as we don't generate them at all)
* MUST use Host Unreachable or Dest. Host Unknown codes whenever other hosts
...
...
@@ -344,7 +358,7 @@ struct socket icmp_socket;
/*
* Send an ICMP frame.
*/
/*
* Initialize the transmit rate limitation mechanism.
...
...
@@ -370,7 +384,8 @@ static void xrlim_init(void)
* Check transmit rate limitation for given message.
*
* RFC 1812: 4.3.2.8 SHOULD be able to limit error message rate
* SHOULD allow setting of rate limits (we allow in the source)
* SHOULD allow setting of rate limits (we allow
* in the source)
*/
static
int
xrlim_allow
(
int
type
,
__u32
addr
)
...
...
@@ -385,7 +400,8 @@ static int xrlim_allow(int type, __u32 addr)
if
(
!
r
)
return
1
;
for
(
c
=
r
->
cache
;
c
<
&
r
->
cache
[
XRLIM_CACHE_SIZE
];
c
++
)
/* Cache lookup */
for
(
c
=
r
->
cache
;
c
<
&
r
->
cache
[
XRLIM_CACHE_SIZE
];
c
++
)
/* Cache lookup */
if
(
c
->
daddr
==
addr
)
break
;
...
...
@@ -645,6 +661,22 @@ static void icmp_unreach(struct icmphdr *icmph, struct sk_buff *skb, struct devi
unsigned
short
old_mtu
=
ntohs
(
iph
->
tot_len
);
unsigned
short
new_mtu
=
ntohs
(
icmph
->
un
.
echo
.
sequence
);
/*
* RFC1191 5. 4.2BSD based router can return incorrect
* Total Length. If current mtu is unknown or old_mtu
* is not less than current mtu, reduce old_mtu by 4 times
* the header length.
*/
if
(
skb
->
sk
==
NULL
/* can this happen? */
||
skb
->
sk
->
ip_route_cache
==
NULL
||
skb
->
sk
->
ip_route_cache
->
rt_mtu
<=
old_mtu
)
{
NETDEBUG
(
printk
(
KERN_INFO
"4.2BSD based fragmenting router between here and %s, mtu corrected from %d"
,
in_ntoa
(
iph
->
daddr
),
old_mtu
));
old_mtu
-=
4
*
iph
->
ihl
;
NETDEBUG
(
printk
(
" to %d
\n
"
,
old_mtu
));
}
if
(
new_mtu
<
68
||
new_mtu
>=
old_mtu
)
{
/*
...
...
net/ipv4/ip_forward.c
View file @
a0f3dc93
...
...
@@ -8,8 +8,10 @@
* Authors: see ip.c
*
* Fixes:
* Many : Split from ip.c , see ip_input.c for history.
* Dave Gregorich : NULL ip_rt_put fix for multicast routing.
* Many : Split from ip.c , see ip_input.c for
* history.
* Dave Gregorich : NULL ip_rt_put fix for multicast
* routing.
* Jos Vos : Add call_out_firewall before sending,
* use output device for accounting.
* Jos Vos : Call forward firewall after routing
...
...
@@ -225,6 +227,23 @@ int ip_forward(struct sk_buff *skb, struct device *dev, int is_frag,
#ifdef CONFIG_FIREWALL
if
(
!
(
is_frag
&
IPFWD_MASQUERADED
))
{
#ifdef CONFIG_IP_MASQUERADE
/*
* Check that any ICMP packets are not for a
* masqueraded connection. If so rewrite them
* and skip the firewall checks
*/
if
(
iph
->
protocol
==
IPPROTO_ICMP
)
{
if
((
fw_res
=
ip_fw_masq_icmp
(
&
skb
,
dev2
))
<
0
)
/* Problem - ie bad checksum */
return
-
1
;
if
(
fw_res
)
/* ICMP matched - skip firewall */
goto
skip_call_fw_firewall
;
}
#endif
fw_res
=
call_fw_firewall
(
PF_INET
,
dev2
,
iph
,
NULL
);
switch
(
fw_res
)
{
case
FW_ACCEPT
:
...
...
@@ -236,6 +255,10 @@ int ip_forward(struct sk_buff *skb, struct device *dev, int is_frag,
default:
return
-
1
;
}
#ifdef CONFIG_IP_MASQUERADE
skip_call_fw_firewall:
#endif
}
#endif
...
...
net/ipv4/ip_masq.c
View file @
a0f3dc93
...
...
@@ -568,8 +568,108 @@ int ip_fw_masquerade(struct sk_buff **skb_ptr, struct device *dev)
return
0
;
}
/*
* Handle ICMP messages in forward direction.
* Find any that might be relevant, check against existing connections,
* forward to masqueraded host if relevant.
* Currently handles error types - unreachable, quench, ttl exceeded
*/
int
ip_fw_masq_icmp
(
struct
sk_buff
**
skb_p
,
struct
device
*
dev
)
{
struct
sk_buff
*
skb
=
*
skb_p
;
struct
iphdr
*
iph
=
skb
->
h
.
iph
;
struct
icmphdr
*
icmph
=
(
struct
icmphdr
*
)((
char
*
)
iph
+
(
iph
->
ihl
<<
2
));
struct
iphdr
*
ciph
;
/* The ip header contained within the ICMP */
__u16
*
pptr
;
/* port numbers from TCP/UDP contained header */
struct
ip_masq
*
ms
;
unsigned
short
len
=
ntohs
(
iph
->
tot_len
)
-
(
iph
->
ihl
*
4
);
#ifdef DEBUG_CONFIG_IP_MASQUERADE
printk
(
"Incoming forward ICMP (%d) %lX -> %lX
\n
"
,
icmph
->
type
,
ntohl
(
iph
->
saddr
),
ntohl
(
iph
->
daddr
));
#endif
/*
* Work through seeing if this is for us.
* These checks are supposed to be in an order that
* means easy things are checked first to speed up
* processing.... however this means that some
* packets will manage to get a long way down this
* stack and then be rejected, but thats life
*/
if
((
icmph
->
type
!=
ICMP_DEST_UNREACH
)
&&
(
icmph
->
type
!=
ICMP_SOURCE_QUENCH
)
&&
(
icmph
->
type
!=
ICMP_TIME_EXCEEDED
))
return
0
;
/* Now find the contained IP header */
ciph
=
(
struct
iphdr
*
)
(
icmph
+
1
);
/* We are only interested ICMPs generated from TCP or UDP packets */
if
((
ciph
->
protocol
!=
IPPROTO_UDP
)
&&
(
ciph
->
protocol
!=
IPPROTO_TCP
))
return
0
;
/*
* Find the ports involved - this packet was
* incoming so the ports are right way round
* (but reversed relative to outer IP header!)
*/
pptr
=
(
__u16
*
)
&
(((
char
*
)
ciph
)[
ciph
->
ihl
*
4
]);
if
(
ntohs
(
pptr
[
1
])
<
PORT_MASQ_BEGIN
||
ntohs
(
pptr
[
1
])
>
PORT_MASQ_END
)
return
0
;
/* Ensure the checksum is correct */
if
(
ip_compute_csum
((
unsigned
char
*
)
icmph
,
len
))
{
/* Failed checksum! */
printk
(
KERN_INFO
"MASQ: forward ICMP: failed checksum from %s!
\n
"
,
in_ntoa
(
iph
->
saddr
));
return
(
-
1
);
}
#ifdef DEBUG_CONFIG_IP_MASQUERADE
printk
(
"Handling forward ICMP for %lX:%X -> %lX:%X
\n
"
,
ntohl
(
ciph
->
saddr
),
ntohs
(
pptr
[
0
]),
ntohl
(
ciph
->
daddr
),
ntohs
(
pptr
[
1
]));
#endif
/* This is pretty much what ip_masq_in_get() does */
ms
=
ip_masq_in_get_2
(
ciph
->
protocol
,
ciph
->
saddr
,
pptr
[
0
],
ciph
->
daddr
,
pptr
[
1
]);
if
(
ms
==
NULL
)
return
0
;
/* Now we do real damage to this packet...! */
/* First change the source IP address, and recalc checksum */
iph
->
saddr
=
ms
->
maddr
;
ip_send_check
(
iph
);
/* Now change the *dest* address in the contained IP */
ciph
->
daddr
=
ms
->
maddr
;
ip_send_check
(
ciph
);
/* the TCP/UDP dest port - cannot redo check */
pptr
[
1
]
=
ms
->
mport
;
/* And finally the ICMP checksum */
icmph
->
checksum
=
0
;
icmph
->
checksum
=
ip_compute_csum
((
unsigned
char
*
)
icmph
,
len
);
#ifdef DEBUG_CONFIG_IP_MASQUERADE
printk
(
"Rewrote forward ICMP to %lX:%X -> %lX:%X
\n
"
,
ntohl
(
ciph
->
saddr
),
ntohs
(
pptr
[
0
]),
ntohl
(
ciph
->
daddr
),
ntohs
(
pptr
[
1
]));
#endif
return
1
;
}
/*
* Handle ICMP messages.
* Handle ICMP messages
in reverse (demasquerade) direction
.
* Find any that might be relevant, check against existing connections,
* forward to masqueraded host if relevant.
* Currently handles error types - unreachable, quench, ttl exceeded
...
...
@@ -586,7 +686,7 @@ int ip_fw_demasq_icmp(struct sk_buff **skb_p, struct device *dev)
unsigned
short
len
=
ntohs
(
iph
->
tot_len
)
-
(
iph
->
ihl
*
4
);
#ifdef DEBUG_CONFIG_IP_MASQUERADE
printk
(
"Incoming ICMP (%d) %lX -> %lX
\n
"
,
printk
(
"Incoming
reverse
ICMP (%d) %lX -> %lX
\n
"
,
icmph
->
type
,
ntohl
(
iph
->
saddr
),
ntohl
(
iph
->
daddr
));
#endif
...
...
@@ -616,12 +716,13 @@ int ip_fw_demasq_icmp(struct sk_buff **skb_p, struct device *dev)
if
(
ip_compute_csum
((
unsigned
char
*
)
icmph
,
len
))
{
/* Failed checksum! */
printk
(
KERN_INFO
"MASQ: ICMP: failed checksum from %s!
\n
"
,
in_ntoa
(
iph
->
saddr
));
printk
(
KERN_INFO
"MASQ: reverse ICMP: failed checksum from %s!
\n
"
,
in_ntoa
(
iph
->
saddr
));
return
(
-
1
);
}
#ifdef DEBUG_CONFIG_IP_MASQUERADE
printk
(
"Handling ICMP for %lX:%X -> %lX:%X
\n
"
,
printk
(
"Handling
reverse
ICMP for %lX:%X -> %lX:%X
\n
"
,
ntohl
(
ciph
->
saddr
),
ntohs
(
pptr
[
0
]),
ntohl
(
ciph
->
daddr
),
ntohs
(
pptr
[
1
]));
#endif
...
...
@@ -649,7 +750,7 @@ int ip_fw_demasq_icmp(struct sk_buff **skb_p, struct device *dev)
icmph
->
checksum
=
ip_compute_csum
((
unsigned
char
*
)
icmph
,
len
);
#ifdef DEBUG_CONFIG_IP_MASQUERADE
printk
(
"Rewrote ICMP to %lX:%X -> %lX:%X
\n
"
,
printk
(
"Rewrote
reverse
ICMP to %lX:%X -> %lX:%X
\n
"
,
ntohl
(
ciph
->
saddr
),
ntohs
(
pptr
[
0
]),
ntohl
(
ciph
->
daddr
),
ntohs
(
pptr
[
1
]));
#endif
...
...
net/ipv4/sysctl_net_ipv4.c
View file @
a0f3dc93
...
...
@@ -8,6 +8,31 @@
#include <linux/mm.h>
#include <linux/sysctl.h>
/* From arp.c */
extern
int
sysctl_arp_res_time
;
extern
int
sysctl_arp_dead_res_time
;
extern
int
sysctl_arp_max_tries
;
extern
int
sysctl_arp_timeout
;
extern
int
sysctl_arp_check_interval
;
extern
int
sysctl_arp_confirm_interval
;
extern
int
sysctl_arp_confirm_timeout
;
ctl_table
ipv4_table
[]
=
{
{
NET_IPV4_ARP_RES_TIME
,
"arp_res_time"
,
&
sysctl_arp_res_time
,
sizeof
(
int
),
0644
,
NULL
,
&
proc_dointvec
},
{
NET_IPV4_ARP_DEAD_RES_TIME
,
"arp_dead_res_time"
,
&
sysctl_arp_dead_res_time
,
sizeof
(
int
),
0644
,
NULL
,
&
proc_dointvec
},
{
NET_IPV4_ARP_MAX_TRIES
,
"arp_max_tries"
,
&
sysctl_arp_max_tries
,
sizeof
(
int
),
0644
,
NULL
,
&
proc_dointvec
},
{
NET_IPV4_ARP_TIMEOUT
,
"arp_timeout"
,
&
sysctl_arp_timeout
,
sizeof
(
int
),
0644
,
NULL
,
&
proc_dointvec
},
{
NET_IPV4_ARP_CHECK_INTERVAL
,
"arp_check_interval"
,
&
sysctl_arp_check_interval
,
sizeof
(
int
),
0644
,
NULL
,
&
proc_dointvec
},
{
NET_IPV4_ARP_CONFIRM_INTERVAL
,
"arp_confirm_interval"
,
&
sysctl_arp_confirm_interval
,
sizeof
(
int
),
0644
,
NULL
,
&
proc_dointvec
},
{
NET_IPV4_ARP_CONFIRM_TIMEOUT
,
"arp_confirm_timeout"
,
&
sysctl_arp_confirm_timeout
,
sizeof
(
int
),
0644
,
NULL
,
&
proc_dointvec
},
{
0
}
};
net/ipv4/tcp_input.c
View file @
a0f3dc93
...
...
@@ -933,7 +933,7 @@ static int tcp_ack(struct sock *sk, struct tcphdr *th, u32 ack, int len)
/*
* Maybe we can take some stuff off of the write queue,
* and put it onto the xmit queue.
* FIXME: (?) There is biz
za
re case being tested here, to check if
* FIXME: (?) There is biz
ar
re case being tested here, to check if
* the data at the head of the queue ends before the start of
* the sequence we already ACKed. This does not appear to be
* a case that can actually occur. Why are we testing it?
...
...
@@ -1679,7 +1679,7 @@ int tcp_rcv(struct sk_buff *skb, struct device *dev, struct options *opt,
struct
sock
*
sk
;
int
syn_ok
=
0
;
#ifdef CONFIG_IP_TRANSPARENT_PROXY
int
r
;
int
r
=
0
;
#endif
/*
...
...
net/ipv4/tcp_timer.c
View file @
a0f3dc93
...
...
@@ -61,7 +61,7 @@ void tcp_reset_xmit_timer(struct sock *sk, int why, unsigned long when)
if
(
sk
->
retransmit_timer
.
expires
<
jiffies
)
{
/* We can get here if we reset the timer on an event
* that could not fire because the inter
upts wh
ere disabled.
* that could not fire because the inter
rupts w
ere disabled.
* make sure it happens soon.
*/
sk
->
retransmit_timer
.
expires
=
jiffies
+
2
;
...
...
net/netlink.c
View file @
a0f3dc93
...
...
@@ -63,6 +63,21 @@ int netlink_donothing(struct sk_buff *skb)
return
-
EINVAL
;
}
static
int
netlink_select
(
struct
inode
*
inode
,
struct
file
*
file
,
int
sel_type
,
select_table
*
wait
)
{
unsigned
int
minor
=
MINOR
(
inode
->
i_rdev
);
switch
(
sel_type
)
{
case
SEL_IN
:
if
(
skb_peek
(
&
skb_queue_rd
[
minor
])
!=
NULL
)
return
1
;
select_wait
(
&
read_space_wait
[
minor
],
wait
);
break
;
case
SEL_OUT
:
return
1
;
}
return
0
;
}
/*
* Write a message to the kernel side of a communication link
*/
...
...
@@ -161,7 +176,7 @@ static struct file_operations netlink_fops = {
netlink_read
,
netlink_write
,
NULL
,
/* netlink_readdir */
NULL
,
/* netlink_select */
netlink_select
,
netlink_ioctl
,
NULL
,
/* netlink_mmap */
netlink_open
,
...
...
net/netsyms.c
View file @
a0f3dc93
...
...
@@ -31,6 +31,10 @@
#include <linux/net_alias.h>
#endif
#ifdef CONFIG_NETLINK
#include <net/netlink.h>
#endif
#ifdef CONFIG_NET_ALIAS
#include <linux/net_alias.h>
#endif
...
...
@@ -173,6 +177,12 @@ static struct symbol_table net_syms = {
X
(
arp_query
),
#endif
/* CONFIG_INET */
#ifdef CONFIG_NETLINK
X
(
netlink_attach
),
X
(
netlink_detach
),
X
(
netlink_post
),
#endif
/* CONFIG_NETLINK */
#include <linux/symtab_end.h>
};
...
...
net/sysctl_net.c
View file @
a0f3dc93
...
...
@@ -3,6 +3,13 @@
*
* Begun April 1, 1996, Mike Shaver.
* Added /proc/sys/net directories for each protocol family. [MS]
*
* $Log: sysctl_net.c,v $
* Revision 1.2 1996/05/08 20:24:40 shaver
* Added bits for NET_BRIDGE and the NET_IPV4_ARP stuff and
* NET_IPV4_IP_FORWARD.
*
*
*/
#include <linux/config.h>
...
...
@@ -35,6 +42,10 @@ extern ctl_table core_table[], unix_table[];
extern
ctl_table
ether_table
[],
e802_table
[];
#endif
#ifdef CONFIG_BRIDGE
extern
ctl_table
bridge_table
[];
#endif
ctl_table
net_table
[]
=
{
{
NET_CORE
,
"core"
,
NULL
,
0
,
0555
,
core_table
},
{
NET_UNIX
,
"unix"
,
NULL
,
0
,
0555
,
unix_table
},
...
...
@@ -56,6 +67,9 @@ ctl_table net_table[] = {
#endif
#ifdef CONFIG_AX25
{
NET_AX25
,
"ax25"
,
NULL
,
0
,
0555
,
ax25_table
},
#endif
#ifdef CONFIG_BRIDGE
{
NET_BRIDGE
,
"bridge"
,
NULL
,
0
,
0555
,
bridge_table
},
#endif
{
0
}
};
scripts/Menuconfig
View file @
a0f3dc93
...
...
@@ -627,7 +627,7 @@ function parse_config_files () {
#
for
i
in
MCmenu
*
do
source
$i
source
./
$i
done
rm
-f
MCmenu
*
...
...
@@ -646,9 +646,30 @@ function activate_menu () {
comment_ctr
=
0
#So comment lines get unique tags
$1
"
$default
"
#Create the lxdialog menu & functions
.
MCradiolists
#Source the menu's functions
.
MCmenu 2>MCdialog.out
#Activate the lxdialog menu
if
[
"
$?
"
!=
"0"
]
then
clear
cat
<<
EOM
Menuconfig has encountered a possible error in one of the kernel's
configuration files and is unable to continue.
Please report this to the author <roadcapw@cfw.com>. You may also
send a problem report to linux-kernel@vger.rutgers.edu or post a
message to the linux.dev.kernel news group.
Please indicate the kernel version you are trying to configure and
which menu you were trying to enter when this error occured.
EOM
cleanup
exit
1
fi
.
./MCradiolists
#Source the menu's functions
.
./MCmenu 2>MCdialog.out
#Activate the lxdialog menu
ret
=
$?
read
selection <MCdialog.out
...
...
@@ -678,6 +699,32 @@ function activate_menu () {
255|1
)
break
;;
139
)
stty
sane
clear
cat
<<
EOM
There seems to be a problem with the lxdialog companion utility which is
built prior to running Menuconfig. Usually this is an indicator that you
have upgraded/downgraded your ncurses libraries and did not remove the
old ncurses header file(s) in /usr/include or /usr/include/ncurses.
It is VERY important that you have only one set of ncurses header files
and that those files are properly version matched to the ncurses libraries
installed on your machine.
You may also need to rebuild lxdialog. This can be done by moving to
the /usr/src/linux/scripts/lxdialog directory and issuing the
"make clean all" command.
If you have verified that your ncurses install is correct, you may email
the author <roadcapw@cfw.com> or post a message on the linux.dev.kernel
news group for additional assistance.
EOM
cleanup
exit
139
;;
esac
done
}
...
...
@@ -719,7 +766,7 @@ last retrieved. Leave blank to abort."\
else
echo
-ne
"
\0
07"
$DIALOG
--backtitle
"
$backtitle
"
\
--infobox
"File does not exit!"
3 38
--infobox
"File does not exi
s
t!"
3 38
sleep
2
fi
else
...
...
@@ -815,7 +862,7 @@ function load_config_file () {
! /# .* is not set.*/ { print }
'
$1
>
.tmpconfig
source
.tmpconfig
source
.
/.
tmpconfig
rm
-f
.tmpconfig
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment