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
dd12d6d5
Commit
dd12d6d5
authored
Mar 07, 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
52d820cb
b46f30e2
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
49 additions
and
26 deletions
+49
-26
include/linux/sysctl.h
include/linux/sysctl.h
+2
-1
include/net/ipv6.h
include/net/ipv6.h
+1
-0
net/core/netfilter.c
net/core/netfilter.c
+1
-0
net/ipv4/ip_sockglue.c
net/ipv4/ip_sockglue.c
+13
-1
net/ipv4/ipvs/ip_vs_ctl.c
net/ipv4/ipvs/ip_vs_ctl.c
+3
-3
net/ipv6/ipv6_sockglue.c
net/ipv6/ipv6_sockglue.c
+9
-2
net/ipv6/mcast.c
net/ipv6/mcast.c
+8
-0
net/ipv6/sysctl_net_ipv6.c
net/ipv6/sysctl_net_ipv6.c
+8
-0
net/sched/sch_red.c
net/sched/sch_red.c
+4
-19
No files found.
include/linux/sysctl.h
View file @
dd12d6d5
...
...
@@ -405,7 +405,8 @@ enum {
NET_IPV6_IP6FRAG_HIGH_THRESH
=
21
,
NET_IPV6_IP6FRAG_LOW_THRESH
=
22
,
NET_IPV6_IP6FRAG_TIME
=
23
,
NET_IPV6_IP6FRAG_SECRET_INTERVAL
=
24
NET_IPV6_IP6FRAG_SECRET_INTERVAL
=
24
,
NET_IPV6_MLD_MAX_MSF
=
25
,
};
enum
{
...
...
include/net/ipv6.h
View file @
dd12d6d5
...
...
@@ -108,6 +108,7 @@ struct frag_hdr {
/* sysctls */
extern
int
sysctl_ipv6_bindv6only
;
extern
int
sysctl_mld_max_msf
;
/* MIBs */
DECLARE_SNMP_STAT
(
struct
ipv6_mib
,
ipv6_statistics
);
...
...
net/core/netfilter.c
View file @
dd12d6d5
...
...
@@ -636,6 +636,7 @@ int ip_route_me_harder(struct sk_buff **pskb)
#ifdef CONFIG_IP_ROUTE_FWMARK
fl
.
nl_u
.
ip4_u
.
fwmark
=
(
*
pskb
)
->
nfmark
;
#endif
fl
.
proto
=
iph
->
protocol
;
if
(
ip_route_output_key
(
&
rt
,
&
fl
)
!=
0
)
return
-
1
;
...
...
net/ipv4/ip_sockglue.c
View file @
dd12d6d5
...
...
@@ -771,6 +771,8 @@ int ip_setsockopt(struct sock *sk, int level, int optname, char *optval, int opt
}
case
MCAST_MSFILTER
:
{
extern
int
sysctl_optmem_max
;
extern
int
sysctl_igmp_max_msf
;
struct
sockaddr_in
*
psin
;
struct
ip_msfilter
*
msf
=
0
;
struct
group_filter
*
gsf
=
0
;
...
...
@@ -778,6 +780,10 @@ int ip_setsockopt(struct sock *sk, int level, int optname, char *optval, int opt
if
(
optlen
<
GROUP_FILTER_SIZE
(
0
))
goto
e_inval
;
if
(
optlen
>
sysctl_optmem_max
)
{
err
=
-
ENOBUFS
;
break
;
}
gsf
=
(
struct
group_filter
*
)
kmalloc
(
optlen
,
GFP_KERNEL
);
if
(
gsf
==
0
)
{
err
=
-
ENOBUFS
;
...
...
@@ -787,7 +793,13 @@ int ip_setsockopt(struct sock *sk, int level, int optname, char *optval, int opt
if
(
copy_from_user
(
gsf
,
optval
,
optlen
))
{
goto
mc_msf_out
;
}
if
(
GROUP_FILTER_SIZE
(
gsf
->
gf_numsrc
)
<
optlen
)
{
/* numsrc >= (4G-140)/128 overflow in 32 bits */
if
(
gsf
->
gf_numsrc
>=
0x1ffffff
||
gsf
->
gf_numsrc
>
sysctl_igmp_max_msf
)
{
err
=
-
ENOBUFS
;
goto
mc_msf_out
;
}
if
(
GROUP_FILTER_SIZE
(
gsf
->
gf_numsrc
)
>
optlen
)
{
err
=
EINVAL
;
goto
mc_msf_out
;
}
...
...
net/ipv4/ipvs/ip_vs_ctl.c
View file @
dd12d6d5
...
...
@@ -1836,9 +1836,9 @@ do_ip_vs_set_ctl(struct sock *sk, int cmd, void *user, unsigned int len)
/* Check for valid protocol: TCP or UDP, even for fwmark!=0 */
if
(
usvc
->
protocol
!=
IPPROTO_TCP
&&
usvc
->
protocol
!=
IPPROTO_UDP
)
{
IP_VS_
INFO
(
"vs_ctl: invalid protocol: %d %d.%d.%d.%d:%d %s
"
,
ntohs
(
usvc
->
protocol
)
,
NIPQUAD
(
usvc
->
addr
),
ntohs
(
usvc
->
port
),
usvc
->
sched_name
);
IP_VS_
ERR
(
"set_ctl: invalid protocol: %d %d.%d.%d.%d:%d %s
\n
"
,
usvc
->
protocol
,
NIPQUAD
(
usvc
->
addr
),
ntohs
(
usvc
->
port
),
usvc
->
sched_name
);
ret
=
-
EFAULT
;
goto
out_unlock
;
}
...
...
net/ipv6/ipv6_sockglue.c
View file @
dd12d6d5
...
...
@@ -437,6 +437,7 @@ int ipv6_setsockopt(struct sock *sk, int level, int optname, char *optval,
case
MCAST_MSFILTER
:
{
extern
int
sysctl_optmem_max
;
extern
int
sysctl_mld_max_msf
;
struct
group_filter
*
gsf
;
if
(
optlen
<
GROUP_FILTER_SIZE
(
0
))
...
...
@@ -455,8 +456,14 @@ int ipv6_setsockopt(struct sock *sk, int level, int optname, char *optval,
kfree
(
gsf
);
break
;
}
if
(
GROUP_FILTER_SIZE
(
gsf
->
gf_numsrc
)
<
GROUP_FILTER_SIZE
(
0
)
||
GROUP_FILTER_SIZE
(
gsf
->
gf_numsrc
)
>
optlen
)
{
/* numsrc >= (4G-140)/128 overflow in 32 bits */
if
(
gsf
->
gf_numsrc
>=
0x1ffffffU
||
gsf
->
gf_numsrc
>
sysctl_mld_max_msf
)
{
kfree
(
gsf
);
retv
=
-
ENOBUFS
;
break
;
}
if
(
GROUP_FILTER_SIZE
(
gsf
->
gf_numsrc
)
>
optlen
)
{
kfree
(
gsf
);
retv
=
-
EINVAL
;
break
;
...
...
net/ipv6/mcast.c
View file @
dd12d6d5
...
...
@@ -166,6 +166,10 @@ int ip6_mc_leave_src(struct sock *sk, struct ipv6_mc_socklist *iml,
#define MLDV2_QQIC(value) MLDV2_EXP(0x80, 4, 3, value)
#define MLDV2_MRC(value) MLDV2_EXP(0x8000, 12, 3, value)
#define IPV6_MLD_MAX_MSF 10
int
sysctl_mld_max_msf
=
IPV6_MLD_MAX_MSF
;
/*
* socket join on multicast group
*/
...
...
@@ -404,6 +408,10 @@ int ip6_mc_source(int add, int omode, struct sock *sk,
}
/* else, add a new source to the filter */
if
(
psl
&&
psl
->
sl_count
>=
sysctl_mld_max_msf
)
{
err
=
-
ENOBUFS
;
goto
done
;
}
if
(
!
psl
||
psl
->
sl_count
==
psl
->
sl_max
)
{
struct
ip6_sf_socklist
*
newpsl
;
int
count
=
IP6_SFBLOCK
;
...
...
net/ipv6/sysctl_net_ipv6.c
View file @
dd12d6d5
...
...
@@ -76,6 +76,14 @@ ctl_table ipv6_table[] = {
.
proc_handler
=
&
proc_dointvec_jiffies
,
.
strategy
=
&
sysctl_jiffies
},
{
.
ctl_name
=
NET_IPV6_MLD_MAX_MSF
,
.
procname
=
"mld_max_msf"
,
.
data
=
&
sysctl_mld_max_msf
,
.
maxlen
=
sizeof
(
int
),
.
mode
=
0644
,
.
proc_handler
=
&
proc_dointvec
},
{
.
ctl_name
=
0
}
};
...
...
net/sched/sch_red.c
View file @
dd12d6d5
...
...
@@ -41,9 +41,6 @@
#include <net/pkt_sched.h>
#include <net/inet_ecn.h>
#define RED_ECN_ECT 0x02
#define RED_ECN_CE 0x01
/* Random Early Detection (RED) algorithm.
=======================================
...
...
@@ -165,28 +162,16 @@ static int red_ecn_mark(struct sk_buff *skb)
switch
(
skb
->
protocol
)
{
case
__constant_htons
(
ETH_P_IP
):
{
u8
tos
=
skb
->
nh
.
iph
->
tos
;
if
(
!
(
tos
&
RED_ECN_ECT
))
if
(
!
INET_ECN_is_capable
(
skb
->
nh
.
iph
->
tos
))
return
0
;
if
(
!
(
tos
&
RED_ECN_CE
))
if
(
INET_ECN_is_not_ce
(
skb
->
nh
.
iph
->
tos
))
IP_ECN_set_ce
(
skb
->
nh
.
iph
);
return
1
;
}
case
__constant_htons
(
ETH_P_IPV6
):
{
u32
label
=
*
(
u32
*
)
skb
->
nh
.
raw
;
if
(
!
(
label
&
__constant_htonl
(
RED_ECN_ECT
<<
20
)))
if
(
!
INET_ECN_is_capable
(
ip6_get_dsfield
(
skb
->
nh
.
ipv6h
)))
return
0
;
label
|=
__constant_htonl
(
RED_ECN_CE
<<
20
);
IP6_ECN_set_ce
(
skb
->
nh
.
ipv6h
);
return
1
;
}
default:
return
0
;
}
...
...
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