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
434f8122
Commit
434f8122
authored
Nov 04, 2003
by
Linus Torvalds
Browse files
Options
Browse Files
Download
Plain Diff
Merge
bk://kernel.bkbits.net/davem/net-2.5
into home.osdl.org:/home/torvalds/v2.5/linux
parents
3656b384
2d7b2832
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
30 additions
and
13 deletions
+30
-13
net/bridge/netfilter/ebt_limit.c
net/bridge/netfilter/ebt_limit.c
+11
-2
net/ipv4/arp.c
net/ipv4/arp.c
+4
-1
net/ipv4/netfilter/ip_nat_core.c
net/ipv4/netfilter/ip_nat_core.c
+2
-1
net/ipv4/netfilter/ip_queue.c
net/ipv4/netfilter/ip_queue.c
+2
-3
net/ipv6/netfilter/ip6_queue.c
net/ipv6/netfilter/ip6_queue.c
+2
-3
net/irda/af_irda.c
net/irda/af_irda.c
+6
-2
net/irda/irlmp.c
net/irda/irlmp.c
+1
-1
net/netlink/af_netlink.c
net/netlink/af_netlink.c
+2
-0
No files found.
net/bridge/netfilter/ebt_limit.c
View file @
434f8122
...
@@ -20,7 +20,16 @@
...
@@ -20,7 +20,16 @@
static
spinlock_t
limit_lock
=
SPIN_LOCK_UNLOCKED
;
static
spinlock_t
limit_lock
=
SPIN_LOCK_UNLOCKED
;
#define CREDITS_PER_JIFFY 128
#define MAX_CPJ (0xFFFFFFFF / (HZ*60*60*24))
#define _POW2_BELOW2(x) ((x)|((x)>>1))
#define _POW2_BELOW4(x) (_POW2_BELOW2(x)|_POW2_BELOW2((x)>>2))
#define _POW2_BELOW8(x) (_POW2_BELOW4(x)|_POW2_BELOW4((x)>>4))
#define _POW2_BELOW16(x) (_POW2_BELOW8(x)|_POW2_BELOW8((x)>>8))
#define _POW2_BELOW32(x) (_POW2_BELOW16(x)|_POW2_BELOW16((x)>>16))
#define POW2_BELOW32(x) ((_POW2_BELOW32(x)>>1) + 1)
#define CREDITS_PER_JIFFY POW2_BELOW32(MAX_CPJ)
static
int
ebt_limit_match
(
const
struct
sk_buff
*
skb
,
static
int
ebt_limit_match
(
const
struct
sk_buff
*
skb
,
const
struct
net_device
*
in
,
const
struct
net_device
*
out
,
const
struct
net_device
*
in
,
const
struct
net_device
*
out
,
...
@@ -68,7 +77,7 @@ static int ebt_limit_check(const char *tablename, unsigned int hookmask,
...
@@ -68,7 +77,7 @@ static int ebt_limit_check(const char *tablename, unsigned int hookmask,
/* Check for overflow. */
/* Check for overflow. */
if
(
info
->
burst
==
0
||
if
(
info
->
burst
==
0
||
user2credits
(
info
->
avg
*
info
->
burst
)
<
user2credits
(
info
->
avg
))
{
user2credits
(
info
->
avg
*
info
->
burst
)
<
user2credits
(
info
->
avg
))
{
printk
(
"Overflow in ebt_limit: %u/%u
\n
"
,
printk
(
"Overflow in ebt_limit
, try lower
: %u/%u
\n
"
,
info
->
avg
,
info
->
burst
);
info
->
avg
,
info
->
burst
);
return
-
EINVAL
;
return
-
EINVAL
;
}
}
...
...
net/ipv4/arp.c
View file @
434f8122
...
@@ -1276,6 +1276,10 @@ static void *arp_get_idx(struct seq_file *seq, loff_t pos)
...
@@ -1276,6 +1276,10 @@ static void *arp_get_idx(struct seq_file *seq, loff_t pos)
static
void
*
arp_seq_start
(
struct
seq_file
*
seq
,
loff_t
*
pos
)
static
void
*
arp_seq_start
(
struct
seq_file
*
seq
,
loff_t
*
pos
)
{
{
struct
arp_iter_state
*
state
=
seq
->
private
;
state
->
is_pneigh
=
0
;
state
->
bucket
=
0
;
return
*
pos
?
arp_get_idx
(
seq
,
*
pos
-
1
)
:
SEQ_START_TOKEN
;
return
*
pos
?
arp_get_idx
(
seq
,
*
pos
-
1
)
:
SEQ_START_TOKEN
;
}
}
...
@@ -1399,7 +1403,6 @@ static int arp_seq_open(struct inode *inode, struct file *file)
...
@@ -1399,7 +1403,6 @@ static int arp_seq_open(struct inode *inode, struct file *file)
seq
=
file
->
private_data
;
seq
=
file
->
private_data
;
seq
->
private
=
s
;
seq
->
private
=
s
;
memset
(
s
,
0
,
sizeof
(
*
s
));
out:
out:
return
rc
;
return
rc
;
out_kfree:
out_kfree:
...
...
net/ipv4/netfilter/ip_nat_core.c
View file @
434f8122
...
@@ -421,7 +421,8 @@ get_unique_tuple(struct ip_conntrack_tuple *tuple,
...
@@ -421,7 +421,8 @@ get_unique_tuple(struct ip_conntrack_tuple *tuple,
*
tuple
=
((
struct
ip_conntrack_tuple
)
*
tuple
=
((
struct
ip_conntrack_tuple
)
{
*
manip
,
orig_tuple
->
dst
});
{
*
manip
,
orig_tuple
->
dst
});
DEBUGP
(
"get_unique_tuple: Found current src map
\n
"
);
DEBUGP
(
"get_unique_tuple: Found current src map
\n
"
);
return
1
;
if
(
!
ip_nat_used_tuple
(
tuple
,
conntrack
))
return
1
;
}
}
}
}
...
...
net/ipv4/netfilter/ip_queue.c
View file @
434f8122
...
@@ -581,15 +581,14 @@ static struct notifier_block ipq_nl_notifier = {
...
@@ -581,15 +581,14 @@ static struct notifier_block ipq_nl_notifier = {
.
notifier_call
=
ipq_rcv_nl_event
,
.
notifier_call
=
ipq_rcv_nl_event
,
};
};
static
int
sysctl_maxlen
=
IPQ_QMAX_DEFAULT
;
static
struct
ctl_table_header
*
ipq_sysctl_header
;
static
struct
ctl_table_header
*
ipq_sysctl_header
;
static
ctl_table
ipq_table
[]
=
{
static
ctl_table
ipq_table
[]
=
{
{
{
.
ctl_name
=
NET_IPQ_QMAX
,
.
ctl_name
=
NET_IPQ_QMAX
,
.
procname
=
NET_IPQ_QMAX_NAME
,
.
procname
=
NET_IPQ_QMAX_NAME
,
.
data
=
&
sysctl
_maxlen
,
.
data
=
&
queue
_maxlen
,
.
maxlen
=
sizeof
(
sysctl
_maxlen
),
.
maxlen
=
sizeof
(
queue
_maxlen
),
.
mode
=
0644
,
.
mode
=
0644
,
.
proc_handler
=
proc_dointvec
.
proc_handler
=
proc_dointvec
},
},
...
...
net/ipv6/netfilter/ip6_queue.c
View file @
434f8122
...
@@ -584,15 +584,14 @@ static struct notifier_block ipq_nl_notifier = {
...
@@ -584,15 +584,14 @@ static struct notifier_block ipq_nl_notifier = {
.
notifier_call
=
ipq_rcv_nl_event
,
.
notifier_call
=
ipq_rcv_nl_event
,
};
};
static
int
sysctl_maxlen
=
IPQ_QMAX_DEFAULT
;
static
struct
ctl_table_header
*
ipq_sysctl_header
;
static
struct
ctl_table_header
*
ipq_sysctl_header
;
static
ctl_table
ipq_table
[]
=
{
static
ctl_table
ipq_table
[]
=
{
{
{
.
ctl_name
=
NET_IPQ_QMAX
,
.
ctl_name
=
NET_IPQ_QMAX
,
.
procname
=
NET_IPQ_QMAX_NAME
,
.
procname
=
NET_IPQ_QMAX_NAME
,
.
data
=
&
sysctl
_maxlen
,
.
data
=
&
queue
_maxlen
,
.
maxlen
=
sizeof
(
sysctl
_maxlen
),
.
maxlen
=
sizeof
(
queue
_maxlen
),
.
mode
=
0644
,
.
mode
=
0644
,
.
proc_handler
=
proc_dointvec
.
proc_handler
=
proc_dointvec
},
},
...
...
net/irda/af_irda.c
View file @
434f8122
...
@@ -188,8 +188,10 @@ static void irda_connect_confirm(void *instance, void *sap,
...
@@ -188,8 +188,10 @@ static void irda_connect_confirm(void *instance, void *sap,
IRDA_DEBUG
(
2
,
"%s(%p)
\n
"
,
__FUNCTION__
,
self
);
IRDA_DEBUG
(
2
,
"%s(%p)
\n
"
,
__FUNCTION__
,
self
);
sk
=
self
->
sk
;
sk
=
self
->
sk
;
if
(
sk
==
NULL
)
if
(
sk
==
NULL
)
{
dev_kfree_skb
(
skb
);
return
;
return
;
}
dev_kfree_skb
(
skb
);
dev_kfree_skb
(
skb
);
// Should be ??? skb_queue_tail(&sk->sk_receive_queue, skb);
// Should be ??? skb_queue_tail(&sk->sk_receive_queue, skb);
...
@@ -248,8 +250,10 @@ static void irda_connect_indication(void *instance, void *sap,
...
@@ -248,8 +250,10 @@ static void irda_connect_indication(void *instance, void *sap,
IRDA_DEBUG
(
2
,
"%s(%p)
\n
"
,
__FUNCTION__
,
self
);
IRDA_DEBUG
(
2
,
"%s(%p)
\n
"
,
__FUNCTION__
,
self
);
sk
=
self
->
sk
;
sk
=
self
->
sk
;
if
(
sk
==
NULL
)
if
(
sk
==
NULL
)
{
dev_kfree_skb
(
skb
);
return
;
return
;
}
/* How much header space do we need to reserve */
/* How much header space do we need to reserve */
self
->
max_header_size
=
max_header_size
;
self
->
max_header_size
=
max_header_size
;
...
...
net/irda/irlmp.c
View file @
434f8122
...
@@ -1812,6 +1812,7 @@ static void *irlmp_seq_start(struct seq_file *seq, loff_t *pos)
...
@@ -1812,6 +1812,7 @@ static void *irlmp_seq_start(struct seq_file *seq, loff_t *pos)
void
*
v
;
void
*
v
;
loff_t
off
=
*
pos
;
loff_t
off
=
*
pos
;
iter
->
hashbin
=
NULL
;
if
(
off
--
==
0
)
if
(
off
--
==
0
)
return
LSAP_START_TOKEN
;
return
LSAP_START_TOKEN
;
...
@@ -1950,7 +1951,6 @@ static int irlmp_seq_open(struct inode *inode, struct file *file)
...
@@ -1950,7 +1951,6 @@ static int irlmp_seq_open(struct inode *inode, struct file *file)
seq
=
file
->
private_data
;
seq
=
file
->
private_data
;
seq
->
private
=
s
;
seq
->
private
=
s
;
memset
(
s
,
0
,
sizeof
(
*
s
));
out:
out:
return
rc
;
return
rc
;
out_kfree:
out_kfree:
...
...
net/netlink/af_netlink.c
View file @
434f8122
...
@@ -394,6 +394,7 @@ static int netlink_getname(struct socket *sock, struct sockaddr *addr, int *addr
...
@@ -394,6 +394,7 @@ static int netlink_getname(struct socket *sock, struct sockaddr *addr, int *addr
struct
sockaddr_nl
*
nladdr
=
(
struct
sockaddr_nl
*
)
addr
;
struct
sockaddr_nl
*
nladdr
=
(
struct
sockaddr_nl
*
)
addr
;
nladdr
->
nl_family
=
AF_NETLINK
;
nladdr
->
nl_family
=
AF_NETLINK
;
nladdr
->
nl_pad
=
0
;
*
addr_len
=
sizeof
(
*
nladdr
);
*
addr_len
=
sizeof
(
*
nladdr
);
if
(
peer
)
{
if
(
peer
)
{
...
@@ -717,6 +718,7 @@ static int netlink_recvmsg(struct kiocb *kiocb, struct socket *sock,
...
@@ -717,6 +718,7 @@ static int netlink_recvmsg(struct kiocb *kiocb, struct socket *sock,
if
(
msg
->
msg_name
)
{
if
(
msg
->
msg_name
)
{
struct
sockaddr_nl
*
addr
=
(
struct
sockaddr_nl
*
)
msg
->
msg_name
;
struct
sockaddr_nl
*
addr
=
(
struct
sockaddr_nl
*
)
msg
->
msg_name
;
addr
->
nl_family
=
AF_NETLINK
;
addr
->
nl_family
=
AF_NETLINK
;
addr
->
nl_pad
=
0
;
addr
->
nl_pid
=
NETLINK_CB
(
skb
).
pid
;
addr
->
nl_pid
=
NETLINK_CB
(
skb
).
pid
;
addr
->
nl_groups
=
NETLINK_CB
(
skb
).
dst_groups
;
addr
->
nl_groups
=
NETLINK_CB
(
skb
).
dst_groups
;
msg
->
msg_namelen
=
sizeof
(
*
addr
);
msg
->
msg_namelen
=
sizeof
(
*
addr
);
...
...
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