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
nexedi
linux
Commits
6b829b28
Commit
6b829b28
authored
Mar 22, 2004
by
David S. Miller
Browse files
Options
Browse Files
Download
Plain Diff
Merge nuts.davemloft.net:/disk1/BK/network-2.6
into nuts.davemloft.net:/disk1/BK/net-2.6
parents
6d2b5ef4
12c12106
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
50 additions
and
35 deletions
+50
-35
drivers/net/b44.c
drivers/net/b44.c
+2
-0
net/ipv4/ipvs/ip_vs_conn.c
net/ipv4/ipvs/ip_vs_conn.c
+44
-32
net/ipv4/netfilter/Kconfig
net/ipv4/netfilter/Kconfig
+2
-2
net/ipv4/netfilter/ip_fw_compat_masq.c
net/ipv4/netfilter/ip_fw_compat_masq.c
+1
-1
net/ipv4/netfilter/ipchains_core.c
net/ipv4/netfilter/ipchains_core.c
+1
-0
No files found.
drivers/net/b44.c
View file @
6b829b28
...
...
@@ -1892,6 +1892,8 @@ static int b44_resume(struct pci_dev *pdev)
if
(
!
netif_running
(
dev
))
return
0
;
pci_restore_state
(
pdev
,
bp
->
pci_cfg_state
);
spin_lock_irq
(
&
bp
->
lock
);
b44_init_rings
(
bp
);
...
...
net/ipv4/ipvs/ip_vs_conn.c
View file @
6b829b28
...
...
@@ -125,25 +125,27 @@ static unsigned int ip_vs_conn_hashkey(unsigned proto, __u32 addr, __u16 port)
static
inline
int
ip_vs_conn_hash
(
struct
ip_vs_conn
*
cp
)
{
unsigned
hash
;
if
(
cp
->
flags
&
IP_VS_CONN_F_HASHED
)
{
IP_VS_ERR
(
"ip_vs_conn_hash(): request for already hashed, "
"called from %p
\n
"
,
__builtin_return_address
(
0
));
return
0
;
}
int
ret
;
/* Hash by protocol, client address and port */
hash
=
ip_vs_conn_hashkey
(
cp
->
protocol
,
cp
->
caddr
,
cp
->
cport
);
ct_write_lock
(
hash
);
list_add
(
&
cp
->
c_list
,
&
ip_vs_conn_tab
[
hash
]);
cp
->
flags
|=
IP_VS_CONN_F_HASHED
;
atomic_inc
(
&
cp
->
refcnt
);
if
(
!
(
cp
->
flags
&
IP_VS_CONN_F_HASHED
))
{
list_add
(
&
cp
->
c_list
,
&
ip_vs_conn_tab
[
hash
]);
cp
->
flags
|=
IP_VS_CONN_F_HASHED
;
atomic_inc
(
&
cp
->
refcnt
);
ret
=
1
;
}
else
{
IP_VS_ERR
(
"ip_vs_conn_hash(): request for already hashed, "
"called from %p
\n
"
,
__builtin_return_address
(
0
));
ret
=
0
;
}
ct_write_unlock
(
hash
);
return
1
;
return
ret
;
}
...
...
@@ -154,24 +156,24 @@ static inline int ip_vs_conn_hash(struct ip_vs_conn *cp)
static
inline
int
ip_vs_conn_unhash
(
struct
ip_vs_conn
*
cp
)
{
unsigned
hash
;
if
(
!
(
cp
->
flags
&
IP_VS_CONN_F_HASHED
))
{
IP_VS_ERR
(
"ip_vs_conn_unhash(): request for unhash flagged, "
"called from %p
\n
"
,
__builtin_return_address
(
0
));
return
0
;
}
int
ret
;
/* unhash it and decrease its reference counter */
hash
=
ip_vs_conn_hashkey
(
cp
->
protocol
,
cp
->
caddr
,
cp
->
cport
);
ct_write_lock
(
hash
);
list_del
(
&
cp
->
c_list
);
cp
->
flags
&=
~
IP_VS_CONN_F_HASHED
;
atomic_dec
(
&
cp
->
refcnt
);
if
(
cp
->
flags
&
IP_VS_CONN_F_HASHED
)
{
list_del
(
&
cp
->
c_list
);
cp
->
flags
&=
~
IP_VS_CONN_F_HASHED
;
atomic_dec
(
&
cp
->
refcnt
);
ret
=
1
;
}
else
ret
=
0
;
ct_write_unlock
(
hash
);
return
1
;
return
ret
;
}
...
...
@@ -285,12 +287,18 @@ void ip_vs_conn_put(struct ip_vs_conn *cp)
*/
void
ip_vs_conn_fill_cport
(
struct
ip_vs_conn
*
cp
,
__u16
cport
)
{
atomic_dec
(
&
ip_vs_conn_no_cport_cnt
);
ip_vs_conn_unhash
(
cp
);
cp
->
flags
&=
~
IP_VS_CONN_F_NO_CPORT
;
cp
->
cport
=
cport
;
/* hash on new dport */
ip_vs_conn_hash
(
cp
);
if
(
ip_vs_conn_unhash
(
cp
))
{
spin_lock
(
&
cp
->
lock
);
if
(
cp
->
flags
&
IP_VS_CONN_F_NO_CPORT
)
{
atomic_dec
(
&
ip_vs_conn_no_cport_cnt
);
cp
->
flags
&=
~
IP_VS_CONN_F_NO_CPORT
;
cp
->
cport
=
cport
;
}
spin_unlock
(
&
cp
->
lock
);
/* hash on new dport */
ip_vs_conn_hash
(
cp
);
}
}
...
...
@@ -457,11 +465,14 @@ int ip_vs_check_template(struct ip_vs_conn *ct)
/*
* Invalidate the connection template
*/
ip_vs_conn_unhash
(
ct
);
ct
->
dport
=
65535
;
ct
->
vport
=
65535
;
ct
->
cport
=
0
;
ip_vs_conn_hash
(
ct
);
if
(
ct
->
cport
)
{
if
(
ip_vs_conn_unhash
(
ct
))
{
ct
->
dport
=
65535
;
ct
->
vport
=
65535
;
ct
->
cport
=
0
;
ip_vs_conn_hash
(
ct
);
}
}
/*
* Simply decrease the refcnt of the template,
...
...
@@ -493,7 +504,8 @@ static void ip_vs_conn_expire(unsigned long data)
/*
* unhash it if it is hashed in the conn table
*/
ip_vs_conn_unhash
(
cp
);
if
(
!
ip_vs_conn_unhash
(
cp
))
goto
expire_later
;
/*
* refcnt==1 implies I'm the only one referrer
...
...
net/ipv4/netfilter/Kconfig
View file @
6b829b28
...
...
@@ -363,7 +363,7 @@ config IP_NF_NAT_LOCAL
Please note that you will need a recent version (>= 1.2.6a)
of the iptables userspace program in order to use this feature.
See
http://www.iptables.org/
for download instructions.
See
<http://www.iptables.org/>
for download instructions.
If unsure, say 'N'.
...
...
@@ -497,7 +497,7 @@ config IP_NF_TARGET_ULOG
which can only be viewed through syslog.
The apropriate userspace logging daemon (ulogd) may be obtained from
http://www.gnumonks.org/projects/ulogd
<http://www.gnumonks.org/projects/ulogd/>
To compile it as a module, choose M here. If unsure, say N.
...
...
net/ipv4/netfilter/ip_fw_compat_masq.c
View file @
6b829b28
...
...
@@ -221,7 +221,7 @@ static const char *masq_proto_name(u_int16_t protonum)
case
IPPROTO_TCP
:
return
"TCP"
;
case
IPPROTO_UDP
:
return
"UDP"
;
case
IPPROTO_ICMP
:
return
"ICMP"
;
default:
return
"MORE-CAFF
IE
NE-FOR-RUSTY"
;
default:
return
"MORE-CAFF
EI
NE-FOR-RUSTY"
;
}
}
...
...
net/ipv4/netfilter/ipchains_core.c
View file @
6b829b28
...
...
@@ -101,6 +101,7 @@
#include <linux/stat.h>
MODULE_LICENSE
(
"Dual BSD/GPL"
);
MODULE_AUTHOR
(
"Rusty Russell <rusty@rustcorp.com.au>"
);
MODULE_DESCRIPTION
(
"ipchains backwards compatibility layer"
);
/* Understanding locking in this code: (thanks to Alan Cox for using
...
...
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