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
a4d37b10
Commit
a4d37b10
authored
Apr 30, 2002
by
Linus Torvalds
Browse files
Options
Browse Files
Download
Plain Diff
Merge master.kernel.org:/home/davem/BK/net-2.5
into home.transmeta.com:/home/torvalds/v2.5/linux
parents
63f29ea2
bc5359b2
Changes
37
Hide whitespace changes
Inline
Side-by-side
Showing
37 changed files
with
348 additions
and
211 deletions
+348
-211
Makefile
Makefile
+1
-1
drivers/net/Config.in
drivers/net/Config.in
+0
-1
drivers/net/Makefile
drivers/net/Makefile
+1
-1
drivers/net/appletalk/Config.help
drivers/net/appletalk/Config.help
+6
-5
drivers/net/appletalk/Config.in
drivers/net/appletalk/Config.in
+15
-17
drivers/net/tg3.c
drivers/net/tg3.c
+12
-2
drivers/net/wan/sdla_chdlc.c
drivers/net/wan/sdla_chdlc.c
+16
-14
drivers/net/wan/sdla_fr.c
drivers/net/wan/sdla_fr.c
+26
-32
drivers/net/wan/sdla_ppp.c
drivers/net/wan/sdla_ppp.c
+19
-36
fs/nfs/mount_clnt.c
fs/nfs/mount_clnt.c
+1
-2
fs/nfs/nfsroot.c
fs/nfs/nfsroot.c
+2
-2
include/linux/inet.h
include/linux/inet.h
+0
-1
include/linux/kernel_stat.h
include/linux/kernel_stat.h
+0
-3
include/linux/tcp.h
include/linux/tcp.h
+1
-1
include/linux/wanrouter.h
include/linux/wanrouter.h
+0
-1
include/net/tcp.h
include/net/tcp.h
+5
-0
net/Config.help
net/Config.help
+5
-5
net/Config.in
net/Config.in
+7
-4
net/bridge/br_forward.c
net/bridge/br_forward.c
+1
-5
net/bridge/br_input.c
net/bridge/br_input.c
+2
-0
net/core/netfilter.c
net/core/netfilter.c
+1
-2
net/ipv4/af_inet.c
net/ipv4/af_inet.c
+2
-2
net/ipv4/fib_frontend.c
net/ipv4/fib_frontend.c
+5
-3
net/ipv4/fib_semantics.c
net/ipv4/fib_semantics.c
+19
-12
net/ipv4/tcp.c
net/ipv4/tcp.c
+79
-0
net/ipv4/utils.c
net/ipv4/utils.c
+0
-15
net/ipv6/addrconf.c
net/ipv6/addrconf.c
+1
-1
net/ipv6/netfilter/ip6_tables.c
net/ipv6/netfilter/ip6_tables.c
+14
-7
net/ipv6/netfilter/ip6t_mac.c
net/ipv6/netfilter/ip6t_mac.c
+6
-2
net/ipv6/raw.c
net/ipv6/raw.c
+69
-3
net/ipv6/sit.c
net/ipv6/sit.c
+2
-1
net/ipv6/udp.c
net/ipv6/udp.c
+1
-1
net/netsyms.c
net/netsyms.c
+2
-1
net/sched/sch_generic.c
net/sched/sch_generic.c
+1
-1
net/sched/sch_ingress.c
net/sched/sch_ingress.c
+23
-22
net/sunrpc/pmap_clnt.c
net/sunrpc/pmap_clnt.c
+1
-3
net/unix/af_unix.c
net/unix/af_unix.c
+2
-2
No files found.
Makefile
View file @
a4d37b10
...
...
@@ -141,7 +141,7 @@ DRIVERS-$(CONFIG_AGP) += drivers/char/agp/agp.o
DRIVERS-$(CONFIG_DRM)
+=
drivers/char/drm/drm.o
DRIVERS-$(CONFIG_NUBUS)
+=
drivers/nubus/nubus.a
DRIVERS-$(CONFIG_NET_FC)
+=
drivers/net/fc/fc.o
DRIVERS-$(CONFIG_APPLETALK)
+=
drivers/net/appletalk/appletalk.o
DRIVERS-$(CONFIG_
DEV_
APPLETALK)
+=
drivers/net/appletalk/appletalk.o
DRIVERS-$(CONFIG_TR)
+=
drivers/net/tokenring/tr.o
DRIVERS-$(CONFIG_WAN)
+=
drivers/net/wan/wan.o
DRIVERS-$(CONFIG_ARCNET)
+=
drivers/net/arcnet/arcnetdrv.o
...
...
drivers/net/Config.in
View file @
a4d37b10
...
...
@@ -3,7 +3,6 @@
#
source drivers/net/arcnet/Config.in
source drivers/net/appletalk/Config.in
tristate 'Dummy net driver support' CONFIG_DUMMY
tristate 'Bonding driver support' CONFIG_BONDING
...
...
drivers/net/Makefile
View file @
a4d37b10
...
...
@@ -41,7 +41,7 @@ subdir-$(CONFIG_TR) += tokenring
subdir-$(CONFIG_WAN)
+=
wan
subdir-$(CONFIG_NET_FC)
+=
fc
subdir-$(CONFIG_ARCNET)
+=
arcnet
subdir-$(CONFIG_APPLETALK)
+=
appletalk
subdir-$(CONFIG_
DEV_
APPLETALK)
+=
appletalk
subdir-$(CONFIG_SK98LIN)
+=
sk98lin
subdir-$(CONFIG_SKFP)
+=
skfp
...
...
drivers/net/appletalk/Config.help
View file @
a4d37b10
CONFIG_APPLETALK
AppleTalk is the way Apple computers speak to each other on a
network. If your Linux box is connected to such a network and you
want to join the conversation, say Y.
CONFIG_DEV_APPLETALK
AppleTalk is the protocol that Apple computers can use to communicate
on a network. If your Linux box is connected to such a network, and wish
to do IP over it, or you have a LocalTalk card and wish to use it to
connect to the AppleTalk network, say Y.
CONFIG_IPDDP
This allows IP networking for users who only have AppleTalk
networking available. This feature is experimental. With this
...
...
drivers/net/appletalk/Config.in
View file @
a4d37b10
...
...
@@ -2,22 +2,20 @@
# Appletalk driver configuration
#
if [ "$CONFIG_ATALK" != "n" ]; then
mainmenu_option next_comment
comment 'Appletalk devices'
bool 'Appletalk interfaces support' CONFIG_APPLETALK
if [ "$CONFIG_ATALK" != "n" ]; then
dep_tristate ' Apple/Farallon LocalTalk PC support' CONFIG_LTPC $CONFIG_DEV_APPLETALK
dep_tristate ' COPS LocalTalk PC support' CONFIG_COPS $CONFIG_DEV_APPLETALK
if [ "$CONFIG_COPS" != "n" ]; then
bool ' Dayna firmware support' CONFIG_COPS_DAYNA
bool ' Tangent firmware support' CONFIG_COPS_TANGENT
fi
dep_tristate ' Appletalk-IP driver support' CONFIG_IPDDP $CONFIG_DEV_APPLETALK
if [ "$CONFIG_IPDDP" != "n" ]; then
bool ' IP to Appletalk-IP Encapsulation support' CONFIG_IPDDP_ENCAP
bool ' Appletalk-IP to IP Decapsulation support' CONFIG_IPDDP_DECAP
fi
mainmenu_option next_comment
comment 'Appletalk devices'
dep_mbool 'Appletalk interfaces support' CONFIG_DEV_APPLETALK $CONFIG_ATALK
if [ "$CONFIG_DEV_APPLETALK" = "y" ]; then
tristate ' Apple/Farallon LocalTalk PC support' CONFIG_LTPC
tristate ' COPS LocalTalk PC support' CONFIG_COPS
if [ "$CONFIG_COPS" != "n" ]; then
bool ' Dayna firmware support' CONFIG_COPS_DAYNA $CONFIG_COPS
bool ' Tangent firmware support' CONFIG_COPS_TANGENT $CONFIG_COPS
fi
dep_tristate ' Appletalk-IP driver support' CONFIG_IPDDP $CONFIG_ATALK
if [ "$CONFIG_IPDDP" != "n" ]; then
bool ' IP to Appletalk-IP Encapsulation support' CONFIG_IPDDP_ENCAP $CONFIG_IPDDP
bool ' Appletalk-IP to IP Decapsulation support' CONFIG_IPDDP_DECAP $CONFIG_IPDDP
fi
endmenu
fi
endmenu
drivers/net/tg3.c
View file @
a4d37b10
...
...
@@ -52,8 +52,8 @@
#define DRV_MODULE_NAME "tg3"
#define PFX DRV_MODULE_NAME ": "
#define DRV_MODULE_VERSION "0.9
6
"
#define DRV_MODULE_RELDATE "Mar
6
, 2002"
#define DRV_MODULE_VERSION "0.9
8
"
#define DRV_MODULE_RELDATE "Mar
28
, 2002"
#define TG3_DEF_MAC_MODE 0
#define TG3_DEF_RX_MODE 0
...
...
@@ -3206,12 +3206,19 @@ static int tg3_load_5701_a0_firmware_fix(struct tg3 *tp)
/* Now startup only the RX cpu. */
tw32
(
RX_CPU_BASE
+
CPU_STATE
,
0xffffffff
);
tw32
(
RX_CPU_BASE
+
CPU_PC
,
TG3_FW_TEXT_ADDR
);
/* Flush posted writes. */
tr32
(
RX_CPU_BASE
+
CPU_PC
);
for
(
i
=
0
;
i
<
5
;
i
++
)
{
if
(
tr32
(
RX_CPU_BASE
+
CPU_PC
)
==
TG3_FW_TEXT_ADDR
)
break
;
tw32
(
RX_CPU_BASE
+
CPU_STATE
,
0xffffffff
);
tw32
(
RX_CPU_BASE
+
CPU_MODE
,
CPU_MODE_HALT
);
tw32
(
RX_CPU_BASE
+
CPU_PC
,
TG3_FW_TEXT_ADDR
);
/* Flush posted writes. */
tr32
(
RX_CPU_BASE
+
CPU_PC
);
udelay
(
1000
);
}
if
(
i
>=
5
)
{
...
...
@@ -3224,6 +3231,9 @@ static int tg3_load_5701_a0_firmware_fix(struct tg3 *tp)
tw32
(
RX_CPU_BASE
+
CPU_STATE
,
0xffffffff
);
tw32
(
RX_CPU_BASE
+
CPU_MODE
,
0x00000000
);
/* Flush posted writes. */
tr32
(
RX_CPU_BASE
+
CPU_MODE
);
return
0
;
}
...
...
drivers/net/wan/sdla_chdlc.c
View file @
a4d37b10
...
...
@@ -2680,18 +2680,20 @@ static void process_route (sdla_t *card)
printk
(
KERN_INFO
"%s: Dynamic route failure.
\n
"
,
card
->
devname
);
if
(
card
->
u
.
c
.
slarp_timer
)
{
u32
addr_net
=
htonl
(
chdlc_priv_area
->
IP_address
);
printk
(
KERN_INFO
"%s: Bad IP address %
s
received
\n
"
,
printk
(
KERN_INFO
"%s: Bad IP address %
u.%u.%u.%u
received
\n
"
,
card
->
devname
,
in_ntoa
(
ntohl
(
chdlc_priv_area
->
IP_address
)
));
NIPQUAD
(
addr_net
));
printk
(
KERN_INFO
"%s: from remote station.
\n
"
,
card
->
devname
);
}
else
{
u32
addr_net
=
htonl
(
chdlc_priv_area
->
IP_address
);
printk
(
KERN_INFO
"%s: Bad IP address %
s
issued
\n
"
,
card
->
devname
,
in_ntoa
(
ntohl
(
chdlc_priv_area
->
IP_address
)
));
printk
(
KERN_INFO
"%s: Bad IP address %
u.%u.%u.%u
issued
\n
"
,
card
->
devname
,
NIPQUAD
(
addr_net
));
printk
(
KERN_INFO
"%s: to remote station. Local
\n
"
,
card
->
devname
);
printk
(
KERN_INFO
"%s: IP address must be A.B.C.1
\n
"
,
...
...
@@ -2810,16 +2812,16 @@ static void process_route (sdla_t *card)
}
if
(
err
)
{
printk
(
KERN_INFO
"%s: Add route %
s
failed (%d)
\n
"
,
card
->
devname
,
in_ntoa
(
remote_IP_addr
),
err
);
printk
(
KERN_INFO
"%s: Add route %
u.%u.%u.%u
failed (%d)
\n
"
,
card
->
devname
,
NIPQUAD
(
remote_IP_addr
),
err
);
}
else
{
((
chdlc_private_area_t
*
)
dev
->
priv
)
->
route_status
=
ROUTE_ADDED
;
printk
(
KERN_INFO
"%s: Dynamic route added.
\n
"
,
card
->
devname
);
printk
(
KERN_INFO
"%s: Local IP addr : %
s
\n
"
,
card
->
devname
,
in_ntoa
(
local_IP_addr
));
printk
(
KERN_INFO
"%s: Remote IP addr: %
s
\n
"
,
card
->
devname
,
in_ntoa
(
remote_IP_addr
));
printk
(
KERN_INFO
"%s: Local IP addr : %
u.%u.%u.%u
\n
"
,
card
->
devname
,
NIPQUAD
(
local_IP_addr
));
printk
(
KERN_INFO
"%s: Remote IP addr: %
u.%u.%u.%u
\n
"
,
card
->
devname
,
NIPQUAD
(
remote_IP_addr
));
chdlc_priv_area
->
route_removed
=
0
;
}
break
;
...
...
@@ -2851,13 +2853,13 @@ static void process_route (sdla_t *card)
if
(
err
)
{
printk
(
KERN_INFO
"%s: Remove route %s failed, (err %d)
\n
"
,
card
->
devname
,
in_ntoa
(
remote_IP_addr
),
card
->
devname
,
NIPQUAD
(
remote_IP_addr
),
err
);
}
else
{
((
chdlc_private_area_t
*
)
dev
->
priv
)
->
route_status
=
NO_ROUTE
;
printk
(
KERN_INFO
"%s: Dynamic route removed: %
s
\n
"
,
card
->
devname
,
in_ntoa
(
local_IP_addr
));
printk
(
KERN_INFO
"%s: Dynamic route removed: %
u.%u.%u.%u
\n
"
,
card
->
devname
,
NIPQUAD
(
local_IP_addr
));
chdlc_priv_area
->
route_removed
=
1
;
}
break
;
...
...
drivers/net/wan/sdla_fr.c
View file @
a4d37b10
...
...
@@ -152,7 +152,6 @@
#include <asm/io.h>
/* for inb(), outb(), etc. */
#include <linux/time.h>
/* for do_gettimeofday */
#include <linux/in.h>
/* sockaddr_in */
#include <linux/inet.h>
/* in_ntoa(), etc... */
#include <asm/errno.h>
#include <linux/ip.h>
...
...
@@ -2809,16 +2808,15 @@ static void process_route (netdevice_t *dev)
set_fs
(
fs
);
/* restore old block */
if
(
err
)
{
printk
(
KERN_INFO
"%s: Route Add failed. Error: %d
\n
"
,
card
->
devname
,
err
);
printk
(
KERN_INFO
"%s: Address: %
s
\n
"
,
chan
->
name
,
in_ntoa
(
chan
->
ip_remote
));
printk
(
KERN_INFO
"%s: Address: %
u.%u.%u.%u
\n
"
,
chan
->
name
,
NIPQUAD
(
chan
->
ip_remote
));
}
else
{
printk
(
KERN_INFO
"%s: Route Added Successfully: %
s
\n
"
,
card
->
devname
,
in_ntoa
(
chan
->
ip_remote
));
printk
(
KERN_INFO
"%s: Route Added Successfully: %
u.%u.%u.%U
\n
"
,
card
->
devname
,
NIPQUAD
(
chan
->
ip_remote
));
chan
->
route_flag
=
ROUTE_ADDED
;
}
break
;
...
...
@@ -2841,17 +2839,15 @@ static void process_route (netdevice_t *dev)
set_fs
(
fs
);
if
(
err
)
{
printk
(
KERN_INFO
"%s: Deleting of route failed. Error: %d
\n
"
,
card
->
devname
,
err
);
printk
(
KERN_INFO
"%s: Address: %
s
\n
"
,
dev
->
name
,
in_ntoa
(
chan
->
ip_remote
)
);
printk
(
KERN_INFO
"%s: Address: %
u.%u.%u.%u
\n
"
,
dev
->
name
,
NIPQUAD
(
chan
->
ip_remote
)
);
}
else
{
printk
(
KERN_INFO
"%s: Route Removed Sucessfuly: %s
\n
"
,
card
->
devname
,
in_ntoa
(
ip_tmp
));
printk
(
KERN_INFO
"%s: Route Removed Sucessfuly: %u.%u.%u.%u
\n
"
,
card
->
devname
,
NIPQUAD
(
ip_tmp
));
chan
->
route_flag
=
NO_ROUTE
;
}
break
;
...
...
@@ -2887,8 +2883,8 @@ static void process_route (netdevice_t *dev)
if
(
err
)
{
printk
(
KERN_INFO
"%s: Adding of route failed. Error: %d
\n
"
,
card
->
devname
,
err
);
printk
(
KERN_INFO
"%s: Address: %
s
\n
"
,
chan
->
name
,
in_ntoa
(
dev
->
pa_dstaddr
)
);
printk
(
KERN_INFO
"%s: Address: %
u.%u.%u.%u
\n
"
,
chan
->
name
,
NIPQUAD
(
dev
->
pa_dstaddr
)
);
}
else
{
chan
->
route_flag
=
ROUTE_ADDED
;
...
...
@@ -2902,11 +2898,10 @@ static void process_route (netdevice_t *dev)
set_fs
(
fs
);
/* restore old block */
if
(
err
)
{
printk
(
KERN_INFO
"%s: Deleting of route failed. Error: %d
\n
"
,
card
->
devname
,
err
);
printk
(
KERN_INFO
"%s: Address: %
s
\n
"
,
dev
->
name
,
in_ntoa
(
dev
->
pa_dstaddr
)
);
printk
(
KERN_INFO
"%s: Address: %
u.%u.%u.%u
\n
"
,
dev
->
name
,
NIPQUAD
(
dev
->
pa_dstaddr
)
);
}
else
{
printk
(
KERN_INFO
"%s: Removed route.
\n
"
,
...
...
@@ -4337,8 +4332,8 @@ int process_ARP(arphdr_1490_t *ArpPacket, sdla_t *card, netdevice_t* dev)
case
0x08
:
// Inverse ARP request -- Send Reply, add route.
/* Check for valid Address */
printk
(
KERN_INFO
"%s: Recvd PtP addr -InArp Req: %
s
\n
"
,
card
->
devname
,
in_ntoa
(
arphdr
->
ar_sip
));
printk
(
KERN_INFO
"%s: Recvd PtP addr -InArp Req: %
u.%u.%u.%u
\n
"
,
card
->
devname
,
NIPQUAD
(
arphdr
->
ar_sip
));
/* Check that the network address is the same as ours, only
...
...
@@ -4348,15 +4343,14 @@ int process_ARP(arphdr_1490_t *ArpPacket, sdla_t *card, netdevice_t* dev)
if
(
in_dev
->
ifa_list
->
ifa_mask
!=
0xFFFFFFFF
&&
(
in_dev
->
ifa_list
->
ifa_mask
&
arphdr
->
ar_sip
)
!=
(
in_dev
->
ifa_list
->
ifa_mask
&
in_dev
->
ifa_list
->
ifa_local
)){
printk
(
KERN_INFO
"%s: Invalid PtP address. %
s
InARP ignored.
\n
"
,
card
->
devname
,
in_ntoa
(
arphdr
->
ar_sip
));
"%s: Invalid PtP address. %
u.%u.%u.%u
InARP ignored.
\n
"
,
card
->
devname
,
NIPQUAD
(
arphdr
->
ar_sip
));
printk
(
KERN_INFO
"%s: mask %
s
\n
"
,
card
->
devname
,
in_ntoa
(
in_dev
->
if
a_list
->
ifa_mask
));
printk
(
KERN_INFO
"%s: local %
s
\n
"
,
card
->
devname
,
in_ntoa
(
in_dev
->
if
a_list
->
ifa_local
));
printk
(
KERN_INFO
"%s: mask %
u.%u.%u.%u
\n
"
,
card
->
devname
,
NIPQUAD
(
in_dev
->
id
a_list
->
ifa_mask
));
printk
(
KERN_INFO
"%s: local %
u.%u.%u.%u
\n
"
,
card
->
devname
,
NIPQUAD
(
in_dev
->
id
a_list
->
ifa_local
));
return
-
1
;
}
...
...
@@ -4401,8 +4395,8 @@ int process_ARP(arphdr_1490_t *ArpPacket, sdla_t *card, netdevice_t* dev)
case
0x09
:
// Inverse ARP reply
/* Check for valid Address */
printk
(
KERN_INFO
"%s: Recvd PtP addr %
s
-InArp Reply
\n
"
,
card
->
devname
,
in_ntoa
(
arphdr
->
ar_sip
));
printk
(
KERN_INFO
"%s: Recvd PtP addr %
u.%u.%u.%u
-InArp Reply
\n
"
,
card
->
devname
,
NIPQUAD
(
arphdr
->
ar_sip
));
/* Compare network addresses, only if network mask
...
...
@@ -4450,8 +4444,8 @@ int process_ARP(arphdr_1490_t *ArpPacket, sdla_t *card, netdevice_t* dev)
case
0x08
:
// Inverse ARP request -- Send Reply, add route.
/* Check for valid Address */
printk
(
KERN_INFO
"%s: Recvd PtP addr %
s
-InArp Req
\n
"
,
((
fr_channel_t
*
)
dev
->
priv
)
->
name
,
in_ntoa
(
arphdr
->
ar_sip
));
printk
(
KERN_INFO
"%s: Recvd PtP addr %
u.%u.%u.%u
-InArp Req
\n
"
,
((
fr_channel_t
*
)
dev
->
priv
)
->
name
,
NIPQUAD
(
arphdr
->
ar_sip
));
if
(
dev
->
pa_mask
!=
0xFFFFFFFF
){
...
...
@@ -4492,8 +4486,8 @@ int process_ARP(arphdr_1490_t *ArpPacket, sdla_t *card, netdevice_t* dev)
case
0x09
:
// Inverse ARP reply
/* Check for valid Address */
printk
(
KERN_INFO
"%s: Recvd PtP addr %
s
-InArp Reply
\n
"
,
((
fr_channel_t
*
)
dev
->
priv
)
->
name
,
in_ntoa
(
arphdr
->
ar_sip
));
printk
(
KERN_INFO
"%s: Recvd PtP addr %
u.%u.%u.%u
-InArp Reply
\n
"
,
((
fr_channel_t
*
)
dev
->
priv
)
->
name
,
NIPQUAD
(
arphdr
->
ar_sip
));
if
((
dev
->
pa_mask
&
arphdr
->
ar_sip
)
!=
(
dev
->
pa_mask
&
dev
->
pa_addr
))
{
printk
(
KERN_INFO
"%s: Invalid PtP address. InARP ignored.
\n
"
,
...
...
drivers/net/wan/sdla_ppp.c
View file @
a4d37b10
...
...
@@ -102,7 +102,6 @@
#include <linux/if_arp.h>
/* ARPHRD_* defines */
#include <asm/byteorder.h>
/* htons(), etc. */
#include <linux/in.h>
/* sockaddr_in */
#include <linux/inet.h>
/* in_aton(), in_ntoa() prototypes */
/* ---- 2.4.X KERNEL SUPPORT -----------------------*/
...
...
@@ -2269,10 +2268,11 @@ static void process_route (sdla_t *card)
struct
in_device
*
in_dev
=
dev
->
ip_ptr
;
if
(
in_dev
!=
NULL
)
{
struct
in_ifaddr
*
ifa
=
in_dev
->
ifa_list
;
printk
(
KERN_INFO
"%s: Assigned Lcl. Addr: %s
\n
"
,
card
->
devname
,
in_ntoa
(
ifa
->
ifa_local
));
printk
(
KERN_INFO
"%s: Assigned Rmt. Addr: %s
\n
"
,
card
->
devname
,
in_ntoa
(
ifa
->
ifa_address
));
printk
(
KERN_INFO
"%s: Assigned Lcl. Addr: %u.%u.%u.%u
\n
"
,
card
->
devname
,
NIPQUAD
(
ifa
->
ifa_local
));
printk
(
KERN_INFO
"%s: Assigned Rmt. Addr: %u.%u.%u.%u
\n
"
,
card
->
devname
,
NIPQUAD
(
ifa
->
ifa_address
));
}
else
{
printk
(
KERN_INFO
"%s: Error: Failed to add a route for PPP interface %s
\n
"
,
...
...
@@ -2294,10 +2294,10 @@ static void process_route (sdla_t *card)
"%s: An error occurred in IP assignment.
\n
"
,
card
->
devname
);
}
else
{
printk
(
KERN_INFO
"%s: Assigned Lcl. Addr: %
s
\n
"
,
card
->
devname
,
in_ntoa
(
dev
->
pa_addr
));
printk
(
KERN_INFO
"%s: Assigned Rmt. Addr: %
s
\n
"
,
card
->
devname
,
in_ntoa
(
dev
->
pa_dstaddr
));
printk
(
KERN_INFO
"%s: Assigned Lcl. Addr: %
u.%u.%u.%u
\n
"
,
card
->
devname
,
NIPQUAD
(
dev
->
pa_addr
));
printk
(
KERN_INFO
"%s: Assigned Rmt. Addr: %
u.%u.%u.%U
\n
"
,
card
->
devname
,
NIPQUAD
(
dev
->
pa_dstaddr
));
}
}
...
...
@@ -2408,16 +2408,8 @@ static int config508(netdevice_t *dev, sdla_t *card)
/* Debugging code used to check that IP addresses
* obtained from the kernel are correct */
{
char
laddr
[
20
];
char
raddr
[
20
];
strcpy
(
laddr
,
in_ntoa
(
cfg
.
ip_local
));
strcpy
(
raddr
,
in_ntoa
(
cfg
.
ip_remote
));
NEX_PRINTK
(
KERN_INFO
"Local %s Remote %s Name %s
\n
"
,
laddr
,
raddr
,
dev
->
name
);
}
NEX_PRINTK
(
KERN_INFO
"Local %u.%u.%u.%u Remote %u.%u.%u.%u Name %s
\n
"
,
NIPQUAD
(
ip_local
),
NIPQUAD
(
ip_remote
),
dev
->
name
);
break
;
case
WANOPT_PPP_HOST
:
...
...
@@ -2436,18 +2428,9 @@ static int config508(netdevice_t *dev, sdla_t *card)
/* Debugging code used to check that IP addresses
* obtained from the kernel are correct */
{
char
laddr
[
20
];
char
raddr
[
20
];
strcpy
(
laddr
,
in_ntoa
(
cfg
.
ip_local
));
strcpy
(
raddr
,
in_ntoa
(
cfg
.
ip_remote
));
NEX_PRINTK
(
KERN_INFO
"Local %s Remote %s Name %s
\n
"
,
laddr
,
raddr
,
dev
->
name
);
NEX_PRINTK
(
KERN_INFO
"Local %u.%u.%u.%u Remote %u.%u.%u.%u Name %s
\n
"
,
NIPQUAD
(
ip_local
),
NIPQUAD
(
ip_remote
),
dev
->
name
);
}
break
;
case
WANOPT_PPP_PEER
:
...
...
@@ -3130,10 +3113,10 @@ static int read_info( sdla_t *card )
if
(
err
)
{
printk
(
KERN_INFO
"%s: Adding of route failed: %i
\n
"
,
card
->
devname
,
err
);
printk
(
KERN_INFO
"%s: Local : %
s
\n
"
,
card
->
devname
,
in_ntoa
(
ppp_priv_area
->
ip_local
));
printk
(
KERN_INFO
"%s: Remote: %
s
\n
"
,
card
->
devname
,
in_ntoa
(
ppp_priv_area
->
ip_remote
));
printk
(
KERN_INFO
"%s: Local : %
u.%u.%u.%u
\n
"
,
card
->
devname
,
NIPQUAD
(
ppp_priv_area
->
ip_local
));
printk
(
KERN_INFO
"%s: Remote: %
u.%u.%u.%u
\n
"
,
card
->
devname
,
NIPQUAD
(
ppp_priv_area
->
ip_remote
));
}
return
err
;
}
...
...
@@ -3212,8 +3195,8 @@ static void remove_route( sdla_t *card )
card
->
devname
,
err
);
return
;
}
else
{
printk
(
KERN_INFO
"%s: PPP Deleting dynamic route %
s
successfuly
\n
"
,
card
->
devname
,
in_ntoa
(
ip_addr
));
printk
(
KERN_INFO
"%s: PPP Deleting dynamic route %
u.%u.%u.%u
successfuly
\n
"
,
card
->
devname
,
NIPQUAD
(
ip_addr
));
}
return
;
}
...
...
fs/nfs/mount_clnt.c
View file @
a4d37b10
...
...
@@ -13,7 +13,6 @@
#include <linux/uio.h>
#include <linux/net.h>
#include <linux/in.h>
#include <linux/inet.h>
#include <linux/sunrpc/clnt.h>
#include <linux/sunrpc/xprt.h>
#include <linux/sunrpc/sched.h>
...
...
@@ -69,7 +68,7 @@ nfs_gen_mount(struct sockaddr_in *addr, char *path, struct nfs_fh *fh, int versi
dprintk
(
"NFS: nfs_mount(%08x:%s)
\n
"
,
(
unsigned
)
ntohl
(
addr
->
sin_addr
.
s_addr
),
path
);
s
trcpy
(
hostname
,
in_ntoa
(
addr
->
sin_addr
.
s_addr
));
s
printf
(
hostname
,
"%u.%u.%u.%u"
,
NIPQUAD
(
addr
->
sin_addr
.
s_addr
));
if
(
!
(
mnt_clnt
=
mnt_create
(
hostname
,
addr
,
version
)))
return
-
EACCES
;
...
...
fs/nfs/nfsroot.c
View file @
a4d37b10
...
...
@@ -78,7 +78,6 @@
#include <linux/nfs_fs.h>
#include <linux/nfs_mount.h>
#include <linux/in.h>
#include <linux/inet.h>
#include <linux/major.h>
#include <linux/utsname.h>
#include <net/ipconfig.h>
...
...
@@ -281,7 +280,8 @@ static int __init root_nfs_addr(void)
return
-
1
;
}
strncpy
(
nfs_data
.
hostname
,
in_ntoa
(
servaddr
),
sizeof
(
nfs_data
.
hostname
)
-
1
);
snprintf
(
nfs_data
.
hostname
,
sizeof
(
nfs_data
.
hostname
),
"%u.%u.%u.%u"
,
NIPQUAD
(
servaddr
));
return
0
;
}
...
...
include/linux/inet.h
View file @
a4d37b10
...
...
@@ -47,7 +47,6 @@
#include <linux/net.h>
extern
void
inet_proto_init
(
struct
net_proto
*
pro
);
extern
char
*
in_ntoa
(
__u32
in
);
extern
__u32
in_aton
(
const
char
*
str
);
#endif
...
...
include/linux/kernel_stat.h
View file @
a4d37b10
...
...
@@ -29,9 +29,6 @@ struct kernel_stat {
#if !defined(CONFIG_ARCH_S390)
unsigned
int
irqs
[
NR_CPUS
][
NR_IRQS
];
#endif
unsigned
int
ipackets
,
opackets
;
unsigned
int
ierrors
,
oerrors
;
unsigned
int
collisions
;
};
extern
struct
kernel_stat
kstat
;
...
...
include/linux/tcp.h
View file @
a4d37b10
...
...
@@ -231,9 +231,9 @@ struct tcp_opt {
/* Data for direct copy to user */
struct
{
struct
sk_buff_head
prequeue
;
int
memory
;
struct
task_struct
*
task
;
struct
iovec
*
iov
;
int
memory
;
int
len
;
}
ucopy
;
...
...
include/linux/wanrouter.h
View file @
a4d37b10
...
...
@@ -475,7 +475,6 @@ typedef struct wanif_conf
#include <linux/fs.h>
/* support for device drivers */
#include <linux/proc_fs.h>
/* proc filesystem pragmatics */
#include <linux/inet.h>
/* in_aton(), in_ntoa() prototypes */
#include <linux/netdevice.h>
/* support for network drivers */
/*----------------------------------------------------------------------------
* WAN device data space.
...
...
include/net/tcp.h
View file @
a4d37b10
...
...
@@ -828,6 +828,11 @@ extern int tcp_sync_mss(struct sock *sk, u32 pmtu);
extern
const
char
timer_bug_msg
[];
/* Read 'sendfile()'-style from a TCP socket */
typedef
int
(
*
sk_read_actor_t
)(
read_descriptor_t
*
,
struct
sk_buff
*
,
unsigned
int
,
size_t
);
extern
int
tcp_read_sock
(
struct
sock
*
sk
,
read_descriptor_t
*
desc
,
sk_read_actor_t
recv_actor
);
static
inline
void
tcp_clear_xmit_timer
(
struct
sock
*
sk
,
int
what
)
{
...
...
net/Config.help
View file @
a4d37b10
...
...
@@ -190,11 +190,11 @@ CONFIG_DECNET
The module is called decnet.o.
CONFIG_ATALK
AppleTalk is the
way Apple computers speak to each other on a
network. If your Linux box is connected to such a network and you
w
ant to join the conversation, say Y. You will need to use th
e
netatalk package so that your Linux box can act as a print and file
server for Macs as
well as access AppleTalk printers. Check out
AppleTalk is the
protocol that Apple computers can use to communicate
on a
network. If your Linux box is connected to such a network and you
w
ish to connect to it, say Y. You will need to use the netatalk packag
e
so that your Linux box can act as a print and file server for Macs as
well as access AppleTalk printers. Check out
<http://www.zettabyte.net/netatalk/> on the WWW for details.
EtherTalk is the name used for AppleTalk over Ethernet and the
cheaper and slower LocalTalk is AppleTalk over a proprietary Apple
...
...
net/Config.in
View file @
a4d37b10
...
...
@@ -52,7 +52,10 @@ tristate 'The IPX protocol' CONFIG_IPX
if [ "$CONFIG_IPX" != "n" ]; then
source net/ipx/Config.in
fi
tristate 'Appletalk protocol support' CONFIG_ATALK
source drivers/net/appletalk/Config.in
tristate 'DECnet Support' CONFIG_DECNET
if [ "$CONFIG_DECNET" != "n" ]; then
source net/decnet/Config.in
...
...
@@ -68,10 +71,10 @@ if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
# fi
if [ "$CONFIG_INET" = "y" ]; then
tristate 'Acorn Econet/AUN protocols (EXPERIMENTAL)' CONFIG_ECONET
fi
if [ "$CONFIG_ECONET" != "n" ]; then
bool ' AUN over UDP' CONFIG_ECONET_AUNUDP
bool ' Native Econet' CONFIG_ECONET_NATIVE
if [ "$CONFIG_ECONET" != "n" ]; then
bool ' AUN over UDP' CONFIG_ECONET_AUNUDP
bool ' Native Econet' CONFIG_ECONET_NATIVE
fi
fi
tristate 'WAN router' CONFIG_WAN_ROUTER
bool 'Fast switching (read help!)' CONFIG_NET_FASTROUTE
...
...
net/bridge/br_forward.c
View file @
a4d37b10
...
...
@@ -48,12 +48,8 @@ static int __br_forward_finish(struct sk_buff *skb)
static
void
__br_deliver
(
struct
net_bridge_port
*
to
,
struct
sk_buff
*
skb
)
{
struct
net_device
*
indev
;
indev
=
skb
->
dev
;
skb
->
dev
=
to
->
dev
;
NF_HOOK
(
PF_BRIDGE
,
NF_BR_LOCAL_OUT
,
skb
,
indev
,
skb
->
dev
,
NF_HOOK
(
PF_BRIDGE
,
NF_BR_LOCAL_OUT
,
skb
,
NULL
,
skb
->
dev
,
__br_forward_finish
);
}
...
...
net/bridge/br_input.c
View file @
a4d37b10
...
...
@@ -161,8 +161,10 @@ void br_handle_frame(struct sk_buff *skb)
handle_special_frame:
if
(
!
dest
[
5
])
{
br_stp_handle_bpdu
(
skb
);
read_unlock
(
&
br
->
lock
);
return
;
}
kfree_skb
(
skb
);
read_unlock
(
&
br
->
lock
);
}
net/core/netfilter.c
View file @
a4d37b10
...
...
@@ -83,8 +83,7 @@ void nf_unregister_hook(struct nf_hook_ops *reg)
/* Do exclusive ranges overlap? */
static
inline
int
overlap
(
int
min1
,
int
max1
,
int
min2
,
int
max2
)
{
return
(
min1
>=
min2
&&
min1
<
max2
)
||
(
max1
>
min2
&&
max1
<=
max2
);
return
max1
>
min2
&&
min1
<
max2
;
}
/* Functions to register sockopt ranges (exclusive). */
...
...
net/ipv4/af_inet.c
View file @
a4d37b10
...
...
@@ -1158,8 +1158,8 @@ static int __init inet_init(void)
sizeof
(
struct
raw_sock
),
0
,
SLAB_HWCACHE_ALIGN
,
0
,
0
);
if
(
!
tcp_sk_cachep
||
!
udp_sk_cachep
||
!
raw4_sk_cachep
)
printk
(
KERN_CRIT
__FUNCTION__
"
: Can't create protocol sock SLAB caches!
\n
"
);
printk
(
KERN_CRIT
"inet_init
: Can't create protocol sock SLAB caches!
\n
"
);
/*
* Tell SOCKET that we are alive...
*/
...
...
net/ipv4/fib_frontend.c
View file @
a4d37b10
...
...
@@ -604,6 +604,11 @@ static int fib_netdev_event(struct notifier_block *this, unsigned long event, vo
struct
net_device
*
dev
=
ptr
;
struct
in_device
*
in_dev
=
__in_dev_get
(
dev
);
if
(
event
==
NETDEV_UNREGISTER
)
{
fib_disable_ip
(
dev
,
2
);
return
NOTIFY_DONE
;
}
if
(
!
in_dev
)
return
NOTIFY_DONE
;
...
...
@@ -620,9 +625,6 @@ static int fib_netdev_event(struct notifier_block *this, unsigned long event, vo
case
NETDEV_DOWN
:
fib_disable_ip
(
dev
,
0
);
break
;
case
NETDEV_UNREGISTER
:
fib_disable_ip
(
dev
,
1
);
break
;
case
NETDEV_CHANGEMTU
:
case
NETDEV_CHANGE
:
rt_cache_flush
(
0
);
...
...
net/ipv4/fib_semantics.c
View file @
a4d37b10
...
...
@@ -185,6 +185,7 @@ int ip_fib_check_default(u32 gw, struct net_device *dev)
continue
;
for_nexthops
(
fi
)
{
if
(
nh
->
nh_dev
==
dev
&&
nh
->
nh_gw
==
gw
&&
nh
->
nh_scope
==
RT_SCOPE_LINK
&&
!
(
nh
->
nh_flags
&
RTNH_F_DEAD
))
{
read_unlock
(
&
fib_info_lock
);
return
0
;
...
...
@@ -379,15 +380,23 @@ static int fib_check_nh(const struct rtmsg *r, struct fib_info *fi, struct fib_n
/* It is not necessary, but requires a bit of thinking */
if
(
key
.
scope
<
RT_SCOPE_LINK
)
key
.
scope
=
RT_SCOPE_LINK
;
if
((
err
=
fib_lookup
(
&
key
,
&
res
))
!=
0
)
return
err
;
err
=
-
EINVAL
;
if
(
res
.
type
!=
RTN_UNICAST
&&
res
.
type
!=
RTN_LOCAL
)
goto
out
;
nh
->
nh_scope
=
res
.
scope
;
nh
->
nh_oif
=
FIB_RES_OIF
(
res
);
nh
->
nh_dev
=
FIB_RES_DEV
(
res
);
if
(
nh
->
nh_dev
)
atomic_inc
(
&
nh
->
nh_dev
->
refcnt
);
if
((
nh
->
nh_dev
=
FIB_RES_DEV
(
res
))
==
NULL
)
goto
out
;
atomic_inc
(
&
nh
->
nh_dev
->
refcnt
);
err
=
-
ENETDOWN
;
if
(
!
(
nh
->
nh_dev
->
flags
&
IFF_UP
))
goto
out
;
err
=
0
;
out:
fib_res_put
(
&
res
);
return
err
;
}
else
{
struct
in_device
*
in_dev
;
...
...
@@ -875,13 +884,15 @@ int fib_sync_down(u32 local, struct net_device *dev, int force)
fi
->
fib_power
-=
nh
->
nh_power
;
nh
->
nh_power
=
0
;
spin_unlock_bh
(
&
fib_multipath_lock
);
if
(
force
&&
nh
->
nh_dev
)
{
dev_put
(
nh
->
nh_dev
);
nh
->
nh_dev
=
NULL
;
}
#endif
dead
++
;
}
#ifdef CONFIG_IP_ROUTE_MULTIPATH
if
(
force
>
1
&&
nh
->
nh_dev
==
dev
)
{
dead
=
fi
->
fib_nhs
;
break
;
}
#endif
}
endfor_nexthops
(
fi
)
if
(
dead
==
fi
->
fib_nhs
)
{
fi
->
fib_flags
|=
RTNH_F_DEAD
;
...
...
@@ -914,10 +925,6 @@ int fib_sync_up(struct net_device *dev)
alive
++
;
continue
;
}
if
(
nh
->
nh_dev
==
NULL
&&
nh
->
nh_oif
==
dev
->
ifindex
)
{
dev_hold
(
dev
);
nh
->
nh_dev
=
dev
;
}
if
(
nh
->
nh_dev
==
NULL
||
!
(
nh
->
nh_dev
->
flags
&
IFF_UP
))
continue
;
if
(
nh
->
nh_dev
!=
dev
||
__in_dev_get
(
dev
)
==
NULL
)
...
...
net/ipv4/tcp.c
View file @
a4d37b10
...
...
@@ -251,6 +251,7 @@
#include <linux/poll.h>
#include <linux/init.h>
#include <linux/smp_lock.h>
#include <linux/fs.h>
#include <net/icmp.h>
#include <net/tcp.h>
...
...
@@ -1377,6 +1378,84 @@ static void tcp_prequeue_process(struct sock *sk)
tp
->
ucopy
.
memory
=
0
;
}
static
inline
struct
sk_buff
*
tcp_recv_skb
(
struct
sock
*
sk
,
u32
seq
,
u32
*
off
)
{
struct
sk_buff
*
skb
;
u32
offset
;
skb_queue_walk
(
&
sk
->
receive_queue
,
skb
)
{
offset
=
seq
-
TCP_SKB_CB
(
skb
)
->
seq
;
if
(
skb
->
h
.
th
->
syn
)
offset
--
;
if
(
offset
<
skb
->
len
||
skb
->
h
.
th
->
fin
)
{
*
off
=
offset
;
return
skb
;
}
}
return
NULL
;
}
/*
* This routine provides an alternative to tcp_recvmsg() for routines
* that would like to handle copying from skbuffs directly in 'sendfile'
* fashion.
* Note:
* - It is assumed that the socket was locked by the caller.
* - The routine does not block.
* - At present, there is no support for reading OOB data
* or for 'peeking' the socket using this routine
* (although both would be easy to implement).
*/
int
tcp_read_sock
(
struct
sock
*
sk
,
read_descriptor_t
*
desc
,
sk_read_actor_t
recv_actor
)
{
struct
sk_buff
*
skb
;
struct
tcp_opt
*
tp
=
tcp_sk
(
sk
);
u32
seq
=
tp
->
copied_seq
;
u32
offset
;
int
copied
=
0
;
if
(
sk
->
state
==
TCP_LISTEN
)
return
-
ENOTCONN
;
while
((
skb
=
tcp_recv_skb
(
sk
,
seq
,
&
offset
))
!=
NULL
)
{
if
(
offset
<
skb
->
len
)
{
size_t
used
,
len
;
len
=
skb
->
len
-
offset
;
/* Stop reading if we hit a patch of urgent data */
if
(
tp
->
urg_data
)
{
u32
urg_offset
=
tp
->
urg_seq
-
seq
;
if
(
urg_offset
<
len
)
len
=
urg_offset
;
if
(
!
len
)
break
;
}
used
=
recv_actor
(
desc
,
skb
,
offset
,
len
);
if
(
used
<=
len
)
{
seq
+=
used
;
copied
+=
used
;
offset
+=
used
;
}
if
(
offset
!=
skb
->
len
)
break
;
}
if
(
skb
->
h
.
th
->
fin
)
{
tcp_eat_skb
(
sk
,
skb
);
++
seq
;
break
;
}
tcp_eat_skb
(
sk
,
skb
);
if
(
!
desc
->
count
)
break
;
}
tp
->
copied_seq
=
seq
;
/* Clean up data we have read: This will do ACK frames. */
if
(
copied
)
cleanup_rbuf
(
sk
,
copied
);
return
copied
;
}
/*
* This routine copies from a sock struct into the user buffer.
*
...
...
net/ipv4/utils.c
View file @
a4d37b10
...
...
@@ -42,21 +42,6 @@
#include <linux/skbuff.h>
/*
* Display an IP address in readable format.
*/
char
*
in_ntoa
(
__u32
in
)
{
static
char
buff
[
18
];
char
*
p
;
p
=
(
char
*
)
&
in
;
sprintf
(
buff
,
"%d.%d.%d.%d"
,
(
p
[
0
]
&
255
),
(
p
[
1
]
&
255
),
(
p
[
2
]
&
255
),
(
p
[
3
]
&
255
));
return
(
buff
);
}
/*
* Convert an ASCII string to binary IP.
*/
...
...
net/ipv6/addrconf.c
View file @
a4d37b10
...
...
@@ -1833,7 +1833,7 @@ static void ipv6_ifa_notify(int event, struct inet6_ifaddr *ifp)
break
;
case
RTM_DELADDR
:
addrconf_leave_solict
(
ifp
->
idev
->
dev
,
&
ifp
->
addr
);
if
(
!
ipv6_chk_addr
(
&
ifp
->
addr
,
ifp
->
idev
->
dev
))
if
(
!
ipv6_chk_addr
(
&
ifp
->
addr
,
NULL
))
ip6_rt_addr_del
(
&
ifp
->
addr
,
ifp
->
idev
->
dev
);
break
;
}
...
...
net/ipv6/netfilter/ip6_tables.c
View file @
a4d37b10
...
...
@@ -110,7 +110,7 @@ static LIST_HEAD(ip6t_tables);
#define ADD_COUNTER(c,b,p) do { (c).bcnt += (b); (c).pcnt += (p); } while(0)
#ifdef CONFIG_SMP
#define TABLE_OFFSET(t,p) (SMP_ALIGN((t)->size)*
cpu_number_map
(p))
#define TABLE_OFFSET(t,p) (SMP_ALIGN((t)->size)*(p))
#else
#define TABLE_OFFSET(t,p) 0
#endif
...
...
@@ -336,7 +336,8 @@ ip6t_do_table(struct sk_buff **pskb,
read_lock_bh
(
&
table
->
lock
);
IP_NF_ASSERT
(
table
->
valid_hooks
&
(
1
<<
hook
));
table_base
=
(
void
*
)
table
->
private
->
entries
+
TABLE_OFFSET
(
table
->
private
,
smp_processor_id
());
+
TABLE_OFFSET
(
table
->
private
,
cpu_number_map
(
smp_processor_id
()));
e
=
get_entry
(
table_base
,
table
->
private
->
hook_entry
[
hook
]);
#ifdef CONFIG_NETFILTER_DEBUG
...
...
@@ -426,7 +427,7 @@ ip6t_do_table(struct sk_buff **pskb,
#endif
/* Target might have changed stuff. */
ipv6
=
(
*
pskb
)
->
nh
.
ipv6h
;
protohdr
=
(
u_int32_t
*
)
ipv6
+
IPV6_HDR_LEN
;
protohdr
=
(
u_int32_t
*
)
((
void
*
)
ipv6
+
IPV6_HDR_LEN
)
;
datalen
=
(
*
pskb
)
->
len
-
IPV6_HDR_LEN
;
if
(
verdict
==
IP6T_CONTINUE
)
...
...
@@ -913,7 +914,7 @@ translate_table(const char *name,
/* And one copy for every other CPU */
for
(
i
=
1
;
i
<
smp_num_cpus
;
i
++
)
{
memcpy
(
newinfo
->
entries
+
SMP_ALIGN
(
newinfo
->
size
*
i
)
,
memcpy
(
newinfo
->
entries
+
SMP_ALIGN
(
newinfo
->
size
)
*
i
,
newinfo
->
entries
,
SMP_ALIGN
(
newinfo
->
size
));
}
...
...
@@ -1795,9 +1796,15 @@ static int __init init(void)
}
#ifdef CONFIG_PROC_FS
if
(
!
proc_net_create
(
"ip6_tables_names"
,
0
,
ip6t_get_tables
))
{
nf_unregister_sockopt
(
&
ip6t_sockopts
);
return
-
ENOMEM
;
{
struct
proc_dir_entry
*
proc
;
proc
=
proc_net_create
(
"ip6_tables_names"
,
0
,
ip6t_get_tables
);
if
(
!
proc
)
{
nf_unregister_sockopt
(
&
ip6t_sockopts
);
return
-
ENOMEM
;
}
proc
->
owner
=
THIS_MODULE
;
}
#endif
...
...
net/ipv6/netfilter/ip6t_mac.c
View file @
a4d37b10
...
...
@@ -34,8 +34,10 @@ ip6t_mac_checkentry(const char *tablename,
unsigned
int
hook_mask
)
{
if
(
hook_mask
&
~
((
1
<<
NF_IP6_PRE_ROUTING
)
|
(
1
<<
NF_IP6_LOCAL_IN
)))
{
printk
(
"ip6t_mac: only valid for PRE_ROUTING or LOCAL_IN.
\n
"
);
&
~
((
1
<<
NF_IP6_PRE_ROUTING
)
|
(
1
<<
NF_IP6_LOCAL_IN
)
|
(
1
<<
NF_IP6_FORWARD
)))
{
printk
(
"ip6t_mac: only valid for PRE_ROUTING, LOCAL_IN or"
" FORWARD
\n
"
);
return
0
;
}
...
...
@@ -60,3 +62,5 @@ static void __exit fini(void)
module_init
(
init
);
module_exit
(
fini
);
MODULE_LICENSE
(
"GPL"
);
MODULE_DESCRIPTION
(
"MAC address matching module for IPv6"
);
net/ipv6/raw.c
View file @
a4d37b10
...
...
@@ -281,6 +281,16 @@ void rawv6_err(struct sock *sk, struct sk_buff *skb,
static
inline
int
rawv6_rcv_skb
(
struct
sock
*
sk
,
struct
sk_buff
*
skb
)
{
#if defined(CONFIG_FILTER)
if
(
sk
->
filter
&&
skb
->
ip_summed
!=
CHECKSUM_UNNECESSARY
)
{
if
((
unsigned
short
)
csum_fold
(
skb_checksum
(
skb
,
0
,
skb
->
len
,
skb
->
csum
)))
{
IP6_INC_STATS_BH
(
Ip6InDiscards
);
kfree_skb
(
skb
);
return
0
;
}
skb
->
ip_summed
=
CHECKSUM_UNNECESSARY
;
}
#endif
/* Charge it to the socket. */
if
(
sock_queue_rcv_skb
(
sk
,
skb
)
<
0
)
{
IP6_INC_STATS_BH
(
Ip6InDiscards
);
...
...
@@ -302,10 +312,35 @@ static inline int rawv6_rcv_skb(struct sock * sk, struct sk_buff * skb)
int
rawv6_rcv
(
struct
sock
*
sk
,
struct
sk_buff
*
skb
)
{
struct
inet_opt
*
inet
=
inet_sk
(
sk
);
struct
raw6_opt
*
raw_opt
=
raw6_sk
(
sk
);
if
(
!
raw_opt
->
checksum
)
skb
->
ip_summed
=
CHECKSUM_UNNECESSARY
;
if
(
skb
->
ip_summed
!=
CHECKSUM_UNNECESSARY
)
{
if
(
skb
->
ip_summed
==
CHECKSUM_HW
)
{
skb
->
ip_summed
=
CHECKSUM_UNNECESSARY
;
if
(
csum_ipv6_magic
(
&
skb
->
nh
.
ipv6h
->
saddr
,
&
skb
->
nh
.
ipv6h
->
daddr
,
skb
->
len
,
inet
->
num
,
skb
->
csum
))
{
NETDEBUG
(
if
(
net_ratelimit
())
printk
(
KERN_DEBUG
"raw v6 hw csum failure.
\n
"
));
skb
->
ip_summed
=
CHECKSUM_NONE
;
}
}
if
(
skb
->
ip_summed
==
CHECKSUM_NONE
)
skb
->
csum
=
~
csum_ipv6_magic
(
&
skb
->
nh
.
ipv6h
->
saddr
,
&
skb
->
nh
.
ipv6h
->
daddr
,
skb
->
len
,
inet
->
num
,
0
);
}
if
(
inet
->
hdrincl
)
{
__skb_push
(
skb
,
skb
->
nh
.
raw
-
skb
->
data
);
skb
->
h
.
raw
=
skb
->
nh
.
raw
;
if
(
skb
->
ip_summed
!=
CHECKSUM_UNNECESSARY
&&
(
unsigned
short
)
csum_fold
(
skb_checksum
(
skb
,
0
,
skb
->
len
,
skb
->
csum
)))
{
IP6_INC_STATS_BH
(
Ip6InDiscards
);
kfree_skb
(
skb
);
return
0
;
}
skb
->
ip_summed
=
CHECKSUM_UNNECESSARY
;
}
rawv6_rcv_skb
(
sk
,
skb
);
...
...
@@ -345,7 +380,17 @@ int rawv6_recvmsg(struct sock *sk, struct msghdr *msg, int len,
msg
->
msg_flags
|=
MSG_TRUNC
;
}
err
=
skb_copy_datagram_iovec
(
skb
,
0
,
msg
->
msg_iov
,
copied
);
if
(
skb
->
ip_summed
==
CHECKSUM_UNNECESSARY
)
{
err
=
skb_copy_datagram_iovec
(
skb
,
0
,
msg
->
msg_iov
,
copied
);
}
else
if
(
msg
->
msg_flags
&
MSG_TRUNC
)
{
if
((
unsigned
short
)
csum_fold
(
skb_checksum
(
skb
,
0
,
skb
->
len
,
skb
->
csum
)))
goto
csum_copy_err
;
err
=
skb_copy_datagram_iovec
(
skb
,
0
,
msg
->
msg_iov
,
copied
);
}
else
{
err
=
skb_copy_and_csum_datagram_iovec
(
skb
,
0
,
msg
->
msg_iov
);
if
(
err
==
-
EINVAL
)
goto
csum_copy_err
;
}
if
(
err
)
goto
out_free
;
...
...
@@ -372,6 +417,27 @@ int rawv6_recvmsg(struct sock *sk, struct msghdr *msg, int len,
skb_free_datagram
(
sk
,
skb
);
out:
return
err
;
csum_copy_err:
/* Clear queue. */
if
(
flags
&
MSG_PEEK
)
{
int
clear
=
0
;
spin_lock_irq
(
&
sk
->
receive_queue
.
lock
);
if
(
skb
==
skb_peek
(
&
sk
->
receive_queue
))
{
__skb_unlink
(
skb
,
&
sk
->
receive_queue
);
clear
=
1
;
}
spin_unlock_irq
(
&
sk
->
receive_queue
.
lock
);
if
(
clear
)
kfree_skb
(
skb
);
}
/* Error for blocking case is chosen to masquerade
as some normal condition.
*/
err
=
(
flags
&
MSG_DONTWAIT
)
?
-
EAGAIN
:
-
EHOSTUNREACH
;
IP6_INC_STATS_USER
(
Ip6InDiscards
);
goto
out_free
;
}
/*
...
...
net/ipv6/sit.c
View file @
a4d37b10
...
...
@@ -64,7 +64,8 @@ static int ipip6_fb_tunnel_init(struct net_device *dev);
static
int
ipip6_tunnel_init
(
struct
net_device
*
dev
);
static
struct
net_device
ipip6_fb_tunnel_dev
=
{
"sit0"
,
0x0
,
0x0
,
0x0
,
0x0
,
0
,
0
,
0
,
0
,
0
,
NULL
,
ipip6_fb_tunnel_init
,
name:
"sit0"
,
init:
ipip6_fb_tunnel_init
};
static
struct
ip_tunnel
ipip6_fb_tunnel
=
{
...
...
net/ipv6/udp.c
View file @
a4d37b10
...
...
@@ -508,7 +508,7 @@ static inline int udpv6_queue_rcv_skb(struct sock * sk, struct sk_buff *skb)
{
#if defined(CONFIG_FILTER)
if
(
sk
->
filter
&&
skb
->
ip_summed
!=
CHECKSUM_UNNECESSARY
)
{
if
((
unsigned
short
)
csum_fold
(
csum_partial
(
skb
->
h
.
raw
,
skb
->
len
,
skb
->
csum
)))
{
if
((
unsigned
short
)
csum_fold
(
skb_checksum
(
skb
,
0
,
skb
->
len
,
skb
->
csum
)))
{
UDP6_INC_STATS_BH
(
UdpInErrors
);
IP6_INC_STATS_BH
(
Ip6InDiscards
);
kfree_skb
(
skb
);
...
...
net/netsyms.c
View file @
a4d37b10
...
...
@@ -408,6 +408,8 @@ EXPORT_SYMBOL(secure_ipv6_id);
#endif
EXPORT_SYMBOL
(
tcp_read_sock
);
EXPORT_SYMBOL
(
netlink_set_err
);
EXPORT_SYMBOL
(
netlink_broadcast
);
EXPORT_SYMBOL
(
netlink_unicast
);
...
...
@@ -446,7 +448,6 @@ EXPORT_SYMBOL(ipv4_config);
EXPORT_SYMBOL
(
dev_open
);
/* Used by other modules */
EXPORT_SYMBOL
(
in_ntoa
);
EXPORT_SYMBOL
(
xrlim_allow
);
EXPORT_SYMBOL
(
ip_rcv
);
...
...
net/sched/sch_generic.c
View file @
a4d37b10
...
...
@@ -280,7 +280,7 @@ pfifo_fast_enqueue(struct sk_buff *skb, struct Qdisc* qdisc)
list
=
((
struct
sk_buff_head
*
)
qdisc
->
data
)
+
prio2band
[
skb
->
priority
&
TC_PRIO_MAX
];
if
(
list
->
qlen
<=
skb
->
dev
->
tx_queue_len
)
{
if
(
list
->
qlen
<=
qdisc
->
dev
->
tx_queue_len
)
{
__skb_queue_tail
(
list
,
skb
);
qdisc
->
q
.
qlen
++
;
return
0
;
...
...
net/sched/sch_ingress.c
View file @
a4d37b10
...
...
@@ -43,6 +43,9 @@
#define PRIV(sch) ((struct ingress_qdisc_data *) (sch)->data)
/* Thanks to Doron Oz for this hack
*/
static
int
nf_registered
=
0
;
struct
ingress_qdisc_data
{
struct
Qdisc
*
q
;
...
...
@@ -147,15 +150,21 @@ static int ingress_enqueue(struct sk_buff *skb,struct Qdisc *sch)
#ifdef CONFIG_NET_CLS_POLICE
case
TC_POLICE_SHOT
:
result
=
NF_DROP
;
sch
->
stats
.
drops
++
;
break
;
case
TC_POLICE_RECLASSIFY
:
/* DSCP remarking here ? */
case
TC_POLICE_OK
:
case
TC_POLICE_UNSPEC
:
default:
sch
->
stats
.
packets
++
;
sch
->
stats
.
bytes
+=
skb
->
len
;
result
=
NF_ACCEPT
;
break
;
}
#else
sch
->
stats
.
packets
++
;
sch
->
stats
.
bytes
+=
skb
->
len
;
#endif
};
skb
->
tc_index
=
TC_H_MIN
(
res
.
classid
);
return
result
;
...
...
@@ -236,22 +245,21 @@ int ingress_init(struct Qdisc *sch,struct rtattr *opt)
{
struct
ingress_qdisc_data
*
p
=
PRIV
(
sch
);
if
(
!
nf_registered
)
{
if
(
nf_register_hook
(
&
ing_ops
)
<
0
)
{
printk
(
"ingress qdisc registration error
\n
"
);
goto
error
;
}
nf_registered
++
;
}
DPRINTK
(
"ingress_init(sch %p,[qdisc %p],opt %p)
\n
"
,
sch
,
p
,
opt
);
memset
(
p
,
0
,
sizeof
(
*
p
));
p
->
filter_list
=
NULL
;
p
->
q
=
&
noop_qdisc
;
#ifndef MODULE
if
(
nf_register_hook
(
&
ing_ops
)
<
0
)
{
printk
(
"Unable to register ingress
\n
"
);
goto
error
;
}
#endif
DPRINTK
(
"ingress_init: qdisc %p
\n
"
,
sch
);
MOD_INC_USE_COUNT
;
return
0
;
#ifndef MODULE
error:
#endif
return
-
EINVAL
;
}
...
...
@@ -295,12 +303,9 @@ static void ingress_destroy(struct Qdisc *sch)
/* for future use */
qdisc_destroy(p->q);
#endif
#ifndef MODULE
nf_unregister_hook
(
&
ing_ops
);
#endif
MOD_DEC_USE_COUNT
;
}
...
...
@@ -356,6 +361,7 @@ struct Qdisc_ops ingress_qdisc_ops =
ingress_dump
,
/* dump */
};
#ifdef MODULE
int
init_module
(
void
)
{
...
...
@@ -366,20 +372,15 @@ int init_module(void)
return
ret
;
}
if
(
nf_register_hook
(
&
ing_ops
)
<
0
)
{
printk
(
"Unable to register ingress on hook
\n
"
);
unregister_qdisc
(
&
ingress_qdisc_ops
);
return
0
;
}
return
ret
;
}
void
cleanup_module
(
void
)
{
nf_unregister_hook
(
&
ing_ops
);
unregister_qdisc
(
&
ingress_qdisc_ops
);
if
(
nf_registered
)
nf_unregister_hook
(
&
ing_ops
);
}
#endif
MODULE_LICENSE
(
"GPL"
);
net/sunrpc/pmap_clnt.c
View file @
a4d37b10
...
...
@@ -87,8 +87,6 @@ rpc_getport(struct rpc_task *task, struct rpc_clnt *clnt)
}
#ifdef CONFIG_ROOT_NFS
char
*
in_ntoa
(
__u32
in
);
int
rpc_getport_external
(
struct
sockaddr_in
*
sin
,
__u32
prog
,
__u32
vers
,
int
prot
)
{
...
...
@@ -100,7 +98,7 @@ rpc_getport_external(struct sockaddr_in *sin, __u32 prog, __u32 vers, int prot)
dprintk
(
"RPC: rpc_getport_external(%u.%u.%u.%u, %d, %d, %d)
\n
"
,
NIPQUAD
(
sin
->
sin_addr
.
s_addr
),
prog
,
vers
,
prot
);
s
trcpy
(
hostname
,
in_ntoa
(
sin
->
sin_addr
.
s_addr
));
s
printf
(
hostname
,
"%u.%u.%u.%u"
,
NIPQUAD
(
sin
->
sin_addr
.
s_addr
));
if
(
!
(
pmap_clnt
=
pmap_create
(
hostname
,
sin
,
prot
)))
return
-
EACCES
;
...
...
net/unix/af_unix.c
View file @
a4d37b10
...
...
@@ -1886,8 +1886,8 @@ static int __init af_unix_init(void)
sizeof
(
struct
unix_sock
),
0
,
SLAB_HWCACHE_ALIGN
,
0
,
0
);
if
(
!
unix_sk_cachep
)
printk
(
KERN_CRIT
__FUNCTION__
": Cannot create unix_sock SLAB cache!
\n
"
);
printk
(
KERN_CRIT
"
af_unix_init
: Cannot create unix_sock SLAB cache!
\n
"
);
sock_register
(
&
unix_family_ops
);
#ifdef CONFIG_PROC_FS
...
...
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