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
3d0213fb
Commit
3d0213fb
authored
Feb 01, 2003
by
Linus Torvalds
Browse files
Options
Browse Files
Download
Plain Diff
Merge
bk://kernel.bkbits.net/davem/sparc-2.5
into home.transmeta.com:/home/torvalds/v2.5/linux
parents
9dd8f18b
49082d39
Changes
17
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
147 additions
and
119 deletions
+147
-119
Documentation/networking/ip-sysctl.txt
Documentation/networking/ip-sysctl.txt
+8
-0
drivers/net/ppp_generic.c
drivers/net/ppp_generic.c
+3
-4
include/linux/sysctl.h
include/linux/sysctl.h
+2
-1
include/net/ip.h
include/net/ip.h
+1
-1
include/net/route.h
include/net/route.h
+1
-1
include/net/tcp.h
include/net/tcp.h
+4
-2
net/ipv4/ah.c
net/ipv4/ah.c
+2
-0
net/ipv4/esp.c
net/ipv4/esp.c
+2
-0
net/ipv4/fib_hash.c
net/ipv4/fib_hash.c
+1
-1
net/ipv4/ip_output.c
net/ipv4/ip_output.c
+2
-2
net/ipv4/sysctl_net_ipv4.c
net/ipv4/sysctl_net_ipv4.c
+2
-0
net/ipv4/tcp_ipv4.c
net/ipv4/tcp_ipv4.c
+45
-44
net/ipv4/tcp_minisocks.c
net/ipv4/tcp_minisocks.c
+6
-0
net/ipv4/tcp_output.c
net/ipv4/tcp_output.c
+4
-4
net/ipv4/xfrm_user.c
net/ipv4/xfrm_user.c
+7
-5
net/ipv6/tcp_ipv6.c
net/ipv6/tcp_ipv6.c
+54
-54
net/netsyms.c
net/netsyms.c
+3
-0
No files found.
Documentation/networking/ip-sysctl.txt
View file @
3d0213fb
...
@@ -281,6 +281,14 @@ tcp_rfc1337 - BOOLEAN
...
@@ -281,6 +281,14 @@ tcp_rfc1337 - BOOLEAN
assassination.
assassination.
Default: 0
Default: 0
tcp_low_latency - BOOLEAN
If set, the TCP stack makes decisions that prefer lower
latency as opposed to higher throughput. By default, this
option is not set meaning that higher throughput is preferred.
An example of an application where this default should be
changed would be a Beowulf compute cluster.
Default: 0
ip_local_port_range - 2 INTEGERS
ip_local_port_range - 2 INTEGERS
Defines the local port range that is used by TCP and UDP to
Defines the local port range that is used by TCP and UDP to
choose the local port. The first number is the first, the
choose the local port. The first number is the first, the
...
...
drivers/net/ppp_generic.c
View file @
3d0213fb
...
@@ -962,11 +962,10 @@ ppp_send_frame(struct ppp *ppp, struct sk_buff *skb)
...
@@ -962,11 +962,10 @@ ppp_send_frame(struct ppp *ppp, struct sk_buff *skb)
if
(
ppp
->
pass_filter
.
filter
if
(
ppp
->
pass_filter
.
filter
&&
sk_run_filter
(
skb
,
ppp
->
pass_filter
.
filter
,
&&
sk_run_filter
(
skb
,
ppp
->
pass_filter
.
filter
,
ppp
->
pass_filter
.
len
)
==
0
)
{
ppp
->
pass_filter
.
len
)
==
0
)
{
if
(
ppp
->
debug
&
1
)
{
if
(
ppp
->
debug
&
1
)
printk
(
KERN_DEBUG
"PPP: outbound frame not passed
\n
"
);
printk
(
KERN_DEBUG
"PPP: outbound frame not passed
\n
"
);
kfree_skb
(
skb
);
kfree_skb
(
skb
);
return
;
return
;
}
}
}
/* if this packet passes the active filter, record the time */
/* if this packet passes the active filter, record the time */
if
(
!
(
ppp
->
active_filter
.
filter
if
(
!
(
ppp
->
active_filter
.
filter
...
...
include/linux/sysctl.h
View file @
3d0213fb
...
@@ -305,7 +305,8 @@ enum
...
@@ -305,7 +305,8 @@ enum
NET_IPV4_ICMP_RATELIMIT
=
89
,
NET_IPV4_ICMP_RATELIMIT
=
89
,
NET_IPV4_ICMP_RATEMASK
=
90
,
NET_IPV4_ICMP_RATEMASK
=
90
,
NET_TCP_TW_REUSE
=
91
,
NET_TCP_TW_REUSE
=
91
,
NET_TCP_FRTO
=
92
NET_TCP_FRTO
=
92
,
NET_TCP_LOW_LATENCY
=
93
};
};
enum
{
enum
{
...
...
include/net/ip.h
View file @
3d0213fb
...
@@ -96,7 +96,7 @@ extern int ip_mc_output(struct sk_buff *skb);
...
@@ -96,7 +96,7 @@ extern int ip_mc_output(struct sk_buff *skb);
extern
int
ip_fragment
(
struct
sk_buff
*
skb
,
int
(
*
out
)(
struct
sk_buff
*
));
extern
int
ip_fragment
(
struct
sk_buff
*
skb
,
int
(
*
out
)(
struct
sk_buff
*
));
extern
int
ip_do_nat
(
struct
sk_buff
*
skb
);
extern
int
ip_do_nat
(
struct
sk_buff
*
skb
);
extern
void
ip_send_check
(
struct
iphdr
*
ip
);
extern
void
ip_send_check
(
struct
iphdr
*
ip
);
extern
int
ip_queue_xmit
(
struct
sk_buff
*
skb
);
extern
int
ip_queue_xmit
(
struct
sk_buff
*
skb
,
int
ipfragok
);
extern
void
ip_init
(
void
);
extern
void
ip_init
(
void
);
extern
int
ip_append_data
(
struct
sock
*
sk
,
extern
int
ip_append_data
(
struct
sock
*
sk
,
int
getfrag
(
void
*
from
,
char
*
to
,
int
offset
,
int
len
,
int
getfrag
(
void
*
from
,
char
*
to
,
int
offset
,
int
len
,
...
...
include/net/route.h
View file @
3d0213fb
...
@@ -167,7 +167,7 @@ static inline int ip_route_connect(struct rtable **rp, u32 dst,
...
@@ -167,7 +167,7 @@ static inline int ip_route_connect(struct rtable **rp, u32 dst,
ip_rt_put
(
*
rp
);
ip_rt_put
(
*
rp
);
*
rp
=
NULL
;
*
rp
=
NULL
;
}
}
return
ip_route_output_flow
(
rp
,
&
fl
,
sk
,
0
);
return
ip_route_output_flow
(
rp
,
&
fl
,
sk
,
1
);
}
}
static
inline
int
ip_route_newports
(
struct
rtable
**
rp
,
u16
sport
,
u16
dport
,
static
inline
int
ip_route_newports
(
struct
rtable
**
rp
,
u16
sport
,
u16
dport
,
...
...
include/net/tcp.h
View file @
3d0213fb
...
@@ -474,6 +474,7 @@ extern int sysctl_tcp_app_win;
...
@@ -474,6 +474,7 @@ extern int sysctl_tcp_app_win;
extern
int
sysctl_tcp_adv_win_scale
;
extern
int
sysctl_tcp_adv_win_scale
;
extern
int
sysctl_tcp_tw_reuse
;
extern
int
sysctl_tcp_tw_reuse
;
extern
int
sysctl_tcp_frto
;
extern
int
sysctl_tcp_frto
;
extern
int
sysctl_tcp_low_latency
;
extern
atomic_t
tcp_memory_allocated
;
extern
atomic_t
tcp_memory_allocated
;
extern
atomic_t
tcp_sockets_allocated
;
extern
atomic_t
tcp_sockets_allocated
;
...
@@ -566,7 +567,8 @@ static inline void tcp_openreq_free(struct open_request *req)
...
@@ -566,7 +567,8 @@ static inline void tcp_openreq_free(struct open_request *req)
*/
*/
struct
tcp_func
{
struct
tcp_func
{
int
(
*
queue_xmit
)
(
struct
sk_buff
*
skb
);
int
(
*
queue_xmit
)
(
struct
sk_buff
*
skb
,
int
ipfragok
);
void
(
*
send_check
)
(
struct
sock
*
sk
,
void
(
*
send_check
)
(
struct
sock
*
sk
,
struct
tcphdr
*
th
,
struct
tcphdr
*
th
,
...
@@ -1348,7 +1350,7 @@ static __inline__ int tcp_prequeue(struct sock *sk, struct sk_buff *skb)
...
@@ -1348,7 +1350,7 @@ static __inline__ int tcp_prequeue(struct sock *sk, struct sk_buff *skb)
{
{
struct
tcp_opt
*
tp
=
tcp_sk
(
sk
);
struct
tcp_opt
*
tp
=
tcp_sk
(
sk
);
if
(
tp
->
ucopy
.
task
)
{
if
(
!
sysctl_tcp_low_latency
&&
tp
->
ucopy
.
task
)
{
__skb_queue_tail
(
&
tp
->
ucopy
.
prequeue
,
skb
);
__skb_queue_tail
(
&
tp
->
ucopy
.
prequeue
,
skb
);
tp
->
ucopy
.
memory
+=
skb
->
truesize
;
tp
->
ucopy
.
memory
+=
skb
->
truesize
;
if
(
tp
->
ucopy
.
memory
>
sk
->
rcvbuf
)
{
if
(
tp
->
ucopy
.
memory
>
sk
->
rcvbuf
)
{
...
...
net/ipv4/ah.c
View file @
3d0213fb
...
@@ -280,6 +280,8 @@ int ah_input(struct xfrm_state *x, struct sk_buff *skb)
...
@@ -280,6 +280,8 @@ int ah_input(struct xfrm_state *x, struct sk_buff *skb)
pskb_expand_head
(
skb
,
0
,
0
,
GFP_ATOMIC
))
pskb_expand_head
(
skb
,
0
,
0
,
GFP_ATOMIC
))
goto
out
;
goto
out
;
skb
->
ip_summed
=
CHECKSUM_NONE
;
ah
=
(
struct
ip_auth_hdr
*
)
skb
->
data
;
ah
=
(
struct
ip_auth_hdr
*
)
skb
->
data
;
iph
=
skb
->
nh
.
iph
;
iph
=
skb
->
nh
.
iph
;
...
...
net/ipv4/esp.c
View file @
3d0213fb
...
@@ -481,6 +481,8 @@ int esp_input(struct xfrm_state *x, struct sk_buff *skb)
...
@@ -481,6 +481,8 @@ int esp_input(struct xfrm_state *x, struct sk_buff *skb)
if
((
nfrags
=
skb_cow_data
(
skb
,
0
,
&
trailer
))
<
0
)
if
((
nfrags
=
skb_cow_data
(
skb
,
0
,
&
trailer
))
<
0
)
goto
out
;
goto
out
;
skb
->
ip_summed
=
CHECKSUM_NONE
;
esph
=
(
struct
ip_esp_hdr
*
)
skb
->
data
;
esph
=
(
struct
ip_esp_hdr
*
)
skb
->
data
;
iph
=
skb
->
nh
.
iph
;
iph
=
skb
->
nh
.
iph
;
...
...
net/ipv4/fib_hash.c
View file @
3d0213fb
...
@@ -941,7 +941,7 @@ static __inline__ struct fib_node *fib_get_next(struct seq_file *seq)
...
@@ -941,7 +941,7 @@ static __inline__ struct fib_node *fib_get_next(struct seq_file *seq)
if
(
!
iter
->
zone
)
if
(
!
iter
->
zone
)
goto
out
;
goto
out
;
if
(
iter
->
zone
->
fz_next
)
;
if
(
iter
->
zone
->
fz_next
)
break
;
break
;
}
}
...
...
net/ipv4/ip_output.c
View file @
3d0213fb
...
@@ -280,7 +280,7 @@ int ip_output(struct sk_buff *skb)
...
@@ -280,7 +280,7 @@ int ip_output(struct sk_buff *skb)
return
ip_finish_output
(
skb
);
return
ip_finish_output
(
skb
);
}
}
int
ip_queue_xmit
(
struct
sk_buff
*
skb
)
int
ip_queue_xmit
(
struct
sk_buff
*
skb
,
int
ipfragok
)
{
{
struct
sock
*
sk
=
skb
->
sk
;
struct
sock
*
sk
=
skb
->
sk
;
struct
inet_opt
*
inet
=
inet_sk
(
sk
);
struct
inet_opt
*
inet
=
inet_sk
(
sk
);
...
@@ -337,7 +337,7 @@ int ip_queue_xmit(struct sk_buff *skb)
...
@@ -337,7 +337,7 @@ int ip_queue_xmit(struct sk_buff *skb)
iph
=
(
struct
iphdr
*
)
skb_push
(
skb
,
sizeof
(
struct
iphdr
)
+
(
opt
?
opt
->
optlen
:
0
));
iph
=
(
struct
iphdr
*
)
skb_push
(
skb
,
sizeof
(
struct
iphdr
)
+
(
opt
?
opt
->
optlen
:
0
));
*
((
__u16
*
)
iph
)
=
htons
((
4
<<
12
)
|
(
5
<<
8
)
|
(
inet
->
tos
&
0xff
));
*
((
__u16
*
)
iph
)
=
htons
((
4
<<
12
)
|
(
5
<<
8
)
|
(
inet
->
tos
&
0xff
));
iph
->
tot_len
=
htons
(
skb
->
len
);
iph
->
tot_len
=
htons
(
skb
->
len
);
if
(
ip_dont_fragment
(
sk
,
&
rt
->
u
.
dst
))
if
(
ip_dont_fragment
(
sk
,
&
rt
->
u
.
dst
)
&&
!
ipfragok
)
iph
->
frag_off
=
htons
(
IP_DF
);
iph
->
frag_off
=
htons
(
IP_DF
);
else
else
iph
->
frag_off
=
0
;
iph
->
frag_off
=
0
;
...
...
net/ipv4/sysctl_net_ipv4.c
View file @
3d0213fb
...
@@ -223,6 +223,8 @@ ctl_table ipv4_table[] = {
...
@@ -223,6 +223,8 @@ ctl_table ipv4_table[] = {
&
sysctl_tcp_tw_reuse
,
sizeof
(
int
),
0644
,
NULL
,
&
proc_dointvec
},
&
sysctl_tcp_tw_reuse
,
sizeof
(
int
),
0644
,
NULL
,
&
proc_dointvec
},
{
NET_TCP_FRTO
,
"tcp_frto"
,
{
NET_TCP_FRTO
,
"tcp_frto"
,
&
sysctl_tcp_frto
,
sizeof
(
int
),
0644
,
NULL
,
&
proc_dointvec
},
&
sysctl_tcp_frto
,
sizeof
(
int
),
0644
,
NULL
,
&
proc_dointvec
},
{
NET_TCP_LOW_LATENCY
,
"tcp_low_latency"
,
&
sysctl_tcp_low_latency
,
sizeof
(
int
),
0644
,
NULL
,
&
proc_dointvec
},
{
0
}
{
0
}
};
};
...
...
net/ipv4/tcp_ipv4.c
View file @
3d0213fb
...
@@ -75,6 +75,7 @@
...
@@ -75,6 +75,7 @@
extern
int
sysctl_ip_dynaddr
;
extern
int
sysctl_ip_dynaddr
;
extern
int
sysctl_ip_default_ttl
;
extern
int
sysctl_ip_default_ttl
;
int
sysctl_tcp_tw_reuse
;
int
sysctl_tcp_tw_reuse
;
int
sysctl_tcp_low_latency
;
/* Check TCP sequence numbers in ICMP packets. */
/* Check TCP sequence numbers in ICMP packets. */
#define ICMP_MIN_LENGTH 8
#define ICMP_MIN_LENGTH 8
...
@@ -86,11 +87,11 @@ void tcp_v4_send_check(struct sock *sk, struct tcphdr *th, int len,
...
@@ -86,11 +87,11 @@ void tcp_v4_send_check(struct sock *sk, struct tcphdr *th, int len,
struct
sk_buff
*
skb
);
struct
sk_buff
*
skb
);
struct
tcp_hashinfo
__cacheline_aligned
tcp_hashinfo
=
{
struct
tcp_hashinfo
__cacheline_aligned
tcp_hashinfo
=
{
.
__tcp_lhash_lock
=
RW_LOCK_UNLOCKED
,
.
__tcp_lhash_lock
=
RW_LOCK_UNLOCKED
,
.
__tcp_lhash_users
=
ATOMIC_INIT
(
0
),
.
__tcp_lhash_users
=
ATOMIC_INIT
(
0
),
.
__tcp_lhash_wait
.
__tcp_lhash_wait
=
__WAIT_QUEUE_HEAD_INITIALIZER
(
tcp_hashinfo
.
__tcp_lhash_wait
),
=
__WAIT_QUEUE_HEAD_INITIALIZER
(
tcp_hashinfo
.
__tcp_lhash_wait
),
.
__tcp_portalloc_lock
=
SPIN_LOCK_UNLOCKED
.
__tcp_portalloc_lock
=
SPIN_LOCK_UNLOCKED
};
};
/*
/*
...
@@ -1410,11 +1411,11 @@ static inline struct ip_options *tcp_v4_save_options(struct sock *sk,
...
@@ -1410,11 +1411,11 @@ static inline struct ip_options *tcp_v4_save_options(struct sock *sk,
int
sysctl_max_syn_backlog
=
256
;
int
sysctl_max_syn_backlog
=
256
;
struct
or_calltable
or_ipv4
=
{
struct
or_calltable
or_ipv4
=
{
.
family
=
PF_INET
,
.
family
=
PF_INET
,
.
rtx_syn_ack
=
tcp_v4_send_synack
,
.
rtx_syn_ack
=
tcp_v4_send_synack
,
.
send_ack
=
tcp_v4_or_send_ack
,
.
send_ack
=
tcp_v4_or_send_ack
,
.
destructor
=
tcp_v4_or_free
,
.
destructor
=
tcp_v4_or_free
,
.
send_reset
=
tcp_v4_send_reset
,
.
send_reset
=
tcp_v4_send_reset
,
};
};
int
tcp_v4_conn_request
(
struct
sock
*
sk
,
struct
sk_buff
*
skb
)
int
tcp_v4_conn_request
(
struct
sock
*
sk
,
struct
sk_buff
*
skb
)
...
@@ -2047,17 +2048,17 @@ int tcp_v4_tw_remember_stamp(struct tcp_tw_bucket *tw)
...
@@ -2047,17 +2048,17 @@ int tcp_v4_tw_remember_stamp(struct tcp_tw_bucket *tw)
}
}
struct
tcp_func
ipv4_specific
=
{
struct
tcp_func
ipv4_specific
=
{
.
queue_xmit
=
ip_queue_xmit
,
.
queue_xmit
=
ip_queue_xmit
,
.
send_check
=
tcp_v4_send_check
,
.
send_check
=
tcp_v4_send_check
,
.
rebuild_header
=
tcp_v4_rebuild_header
,
.
rebuild_header
=
tcp_v4_rebuild_header
,
.
conn_request
=
tcp_v4_conn_request
,
.
conn_request
=
tcp_v4_conn_request
,
.
syn_recv_sock
=
tcp_v4_syn_recv_sock
,
.
syn_recv_sock
=
tcp_v4_syn_recv_sock
,
.
remember_stamp
=
tcp_v4_remember_stamp
,
.
remember_stamp
=
tcp_v4_remember_stamp
,
.
net_header_len
=
sizeof
(
struct
iphdr
),
.
net_header_len
=
sizeof
(
struct
iphdr
),
.
setsockopt
=
ip_setsockopt
,
.
setsockopt
=
ip_setsockopt
,
.
getsockopt
=
ip_getsockopt
,
.
getsockopt
=
ip_getsockopt
,
.
addr2sockaddr
=
v4_addr2sockaddr
,
.
addr2sockaddr
=
v4_addr2sockaddr
,
.
sockaddr_len
=
sizeof
(
struct
sockaddr_in
),
.
sockaddr_len
=
sizeof
(
struct
sockaddr_in
),
};
};
/* NOTE: A lot of things set to zero explicitly by call to
/* NOTE: A lot of things set to zero explicitly by call to
...
@@ -2543,10 +2544,10 @@ static int tcp_seq_show(struct seq_file *seq, void *v)
...
@@ -2543,10 +2544,10 @@ static int tcp_seq_show(struct seq_file *seq, void *v)
}
}
static
struct
seq_operations
tcp_seq_ops
=
{
static
struct
seq_operations
tcp_seq_ops
=
{
.
start
=
tcp_seq_start
,
.
start
=
tcp_seq_start
,
.
next
=
tcp_seq_next
,
.
next
=
tcp_seq_next
,
.
stop
=
tcp_seq_stop
,
.
stop
=
tcp_seq_stop
,
.
show
=
tcp_seq_show
,
.
show
=
tcp_seq_show
,
};
};
static
int
tcp_seq_open
(
struct
inode
*
inode
,
struct
file
*
file
)
static
int
tcp_seq_open
(
struct
inode
*
inode
,
struct
file
*
file
)
...
@@ -2571,10 +2572,10 @@ static int tcp_seq_open(struct inode *inode, struct file *file)
...
@@ -2571,10 +2572,10 @@ static int tcp_seq_open(struct inode *inode, struct file *file)
}
}
static
struct
file_operations
tcp_seq_fops
=
{
static
struct
file_operations
tcp_seq_fops
=
{
.
open
=
tcp_seq_open
,
.
open
=
tcp_seq_open
,
.
read
=
seq_read
,
.
read
=
seq_read
,
.
llseek
=
seq_lseek
,
.
llseek
=
seq_lseek
,
.
release
=
ip_seq_release
,
.
release
=
ip_seq_release
,
};
};
int
__init
tcp_proc_init
(
void
)
int
__init
tcp_proc_init
(
void
)
...
@@ -2596,23 +2597,23 @@ void __init tcp_proc_exit(void)
...
@@ -2596,23 +2597,23 @@ void __init tcp_proc_exit(void)
#endif
/* CONFIG_PROC_FS */
#endif
/* CONFIG_PROC_FS */
struct
proto
tcp_prot
=
{
struct
proto
tcp_prot
=
{
.
name
=
"TCP"
,
.
name
=
"TCP"
,
.
close
=
tcp_close
,
.
close
=
tcp_close
,
.
connect
=
tcp_v4_connect
,
.
connect
=
tcp_v4_connect
,
.
disconnect
=
tcp_disconnect
,
.
disconnect
=
tcp_disconnect
,
.
accept
=
tcp_accept
,
.
accept
=
tcp_accept
,
.
ioctl
=
tcp_ioctl
,
.
ioctl
=
tcp_ioctl
,
.
init
=
tcp_v4_init_sock
,
.
init
=
tcp_v4_init_sock
,
.
destroy
=
tcp_v4_destroy_sock
,
.
destroy
=
tcp_v4_destroy_sock
,
.
shutdown
=
tcp_shutdown
,
.
shutdown
=
tcp_shutdown
,
.
setsockopt
=
tcp_setsockopt
,
.
setsockopt
=
tcp_setsockopt
,
.
getsockopt
=
tcp_getsockopt
,
.
getsockopt
=
tcp_getsockopt
,
.
sendmsg
=
tcp_sendmsg
,
.
sendmsg
=
tcp_sendmsg
,
.
recvmsg
=
tcp_recvmsg
,
.
recvmsg
=
tcp_recvmsg
,
.
backlog_rcv
=
tcp_v4_do_rcv
,
.
backlog_rcv
=
tcp_v4_do_rcv
,
.
hash
=
tcp_v4_hash
,
.
hash
=
tcp_v4_hash
,
.
unhash
=
tcp_unhash
,
.
unhash
=
tcp_unhash
,
.
get_port
=
tcp_v4_get_port
,
.
get_port
=
tcp_v4_get_port
,
};
};
...
...
net/ipv4/tcp_minisocks.c
View file @
3d0213fb
...
@@ -952,6 +952,12 @@ struct sock *tcp_check_req(struct sock *sk,struct sk_buff *skb,
...
@@ -952,6 +952,12 @@ struct sock *tcp_check_req(struct sock *sk,struct sk_buff *skb,
if
(
flg
&
(
TCP_FLAG_RST
|
TCP_FLAG_SYN
))
if
(
flg
&
(
TCP_FLAG_RST
|
TCP_FLAG_SYN
))
goto
embryonic_reset
;
goto
embryonic_reset
;
/* ACK sequence verified above, just make sure ACK is
* set. If ACK not set, just silently drop the packet.
*/
if
(
!
(
flg
&
TCP_FLAG_ACK
))
return
NULL
;
/* If TCP_DEFER_ACCEPT is set, drop bare ACK. */
/* If TCP_DEFER_ACCEPT is set, drop bare ACK. */
if
(
tp
->
defer_accept
&&
TCP_SKB_CB
(
skb
)
->
end_seq
==
req
->
rcv_isn
+
1
)
{
if
(
tp
->
defer_accept
&&
TCP_SKB_CB
(
skb
)
->
end_seq
==
req
->
rcv_isn
+
1
)
{
req
->
acked
=
1
;
req
->
acked
=
1
;
...
...
net/ipv4/tcp_output.c
View file @
3d0213fb
...
@@ -276,7 +276,7 @@ int tcp_transmit_skb(struct sock *sk, struct sk_buff *skb)
...
@@ -276,7 +276,7 @@ int tcp_transmit_skb(struct sock *sk, struct sk_buff *skb)
TCP_INC_STATS
(
TcpOutSegs
);
TCP_INC_STATS
(
TcpOutSegs
);
err
=
tp
->
af_specific
->
queue_xmit
(
skb
);
err
=
tp
->
af_specific
->
queue_xmit
(
skb
,
0
);
if
(
err
<=
0
)
if
(
err
<=
0
)
return
err
;
return
err
;
...
@@ -786,13 +786,13 @@ static void tcp_retrans_try_collapse(struct sock *sk, struct sk_buff *skb, int m
...
@@ -786,13 +786,13 @@ static void tcp_retrans_try_collapse(struct sock *sk, struct sk_buff *skb, int m
/* Ok. We will be able to collapse the packet. */
/* Ok. We will be able to collapse the packet. */
__skb_unlink
(
next_skb
,
next_skb
->
list
);
__skb_unlink
(
next_skb
,
next_skb
->
list
);
memcpy
(
skb_put
(
skb
,
next_skb_size
),
next_skb
->
data
,
next_skb_size
);
if
(
next_skb
->
ip_summed
==
CHECKSUM_HW
)
if
(
next_skb
->
ip_summed
==
CHECKSUM_HW
)
skb
->
ip_summed
=
CHECKSUM_HW
;
skb
->
ip_summed
=
CHECKSUM_HW
;
if
(
skb
->
ip_summed
!=
CHECKSUM_HW
)
{
if
(
skb
->
ip_summed
!=
CHECKSUM_HW
)
memcpy
(
skb_put
(
skb
,
next_skb_size
),
next_skb
->
data
,
next_skb_size
);
skb
->
csum
=
csum_block_add
(
skb
->
csum
,
next_skb
->
csum
,
skb_size
);
skb
->
csum
=
csum_block_add
(
skb
->
csum
,
next_skb
->
csum
,
skb_size
);
}
/* Update sequence range on original skb. */
/* Update sequence range on original skb. */
TCP_SKB_CB
(
skb
)
->
end_seq
=
TCP_SKB_CB
(
next_skb
)
->
end_seq
;
TCP_SKB_CB
(
skb
)
->
end_seq
=
TCP_SKB_CB
(
next_skb
)
->
end_seq
;
...
...
net/ipv4/xfrm_user.c
View file @
3d0213fb
...
@@ -276,9 +276,11 @@ static int dump_one_state(struct xfrm_state *x, int count, void *ptr)
...
@@ -276,9 +276,11 @@ static int dump_one_state(struct xfrm_state *x, int count, void *ptr)
copy_to_user_state
(
x
,
p
);
copy_to_user_state
(
x
,
p
);
if
(
x
->
aalg
)
if
(
x
->
aalg
)
RTA_PUT
(
skb
,
XFRMA_ALG_AUTH
,
sizeof
(
*
(
x
->
aalg
)),
x
->
aalg
);
RTA_PUT
(
skb
,
XFRMA_ALG_AUTH
,
sizeof
(
*
(
x
->
aalg
))
+
(
x
->
aalg
->
alg_key_len
+
7
)
/
8
,
x
->
aalg
);
if
(
x
->
ealg
)
if
(
x
->
ealg
)
RTA_PUT
(
skb
,
XFRMA_ALG_CRYPT
,
sizeof
(
*
(
x
->
ealg
)),
x
->
ealg
);
RTA_PUT
(
skb
,
XFRMA_ALG_CRYPT
,
sizeof
(
*
(
x
->
ealg
))
+
(
x
->
ealg
->
alg_key_len
+
7
)
/
8
,
x
->
ealg
);
if
(
x
->
calg
)
if
(
x
->
calg
)
RTA_PUT
(
skb
,
XFRMA_ALG_COMP
,
sizeof
(
*
(
x
->
calg
)),
x
->
calg
);
RTA_PUT
(
skb
,
XFRMA_ALG_COMP
,
sizeof
(
*
(
x
->
calg
)),
x
->
calg
);
...
@@ -655,6 +657,7 @@ static int xfrm_dump_policy(struct sk_buff *skb, struct netlink_callback *cb)
...
@@ -655,6 +657,7 @@ static int xfrm_dump_policy(struct sk_buff *skb, struct netlink_callback *cb)
info
.
in_skb
=
cb
->
skb
;
info
.
in_skb
=
cb
->
skb
;
info
.
out_skb
=
skb
;
info
.
out_skb
=
skb
;
info
.
nlmsg_seq
=
cb
->
nlh
->
nlmsg_seq
;
info
.
nlmsg_seq
=
cb
->
nlh
->
nlmsg_seq
;
info
.
this_idx
=
0
;
info
.
start_idx
=
cb
->
args
[
0
];
info
.
start_idx
=
cb
->
args
[
0
];
(
void
)
xfrm_policy_walk
(
dump_one_policy
,
&
info
);
(
void
)
xfrm_policy_walk
(
dump_one_policy
,
&
info
);
cb
->
args
[
0
]
=
info
.
this_idx
;
cb
->
args
[
0
]
=
info
.
this_idx
;
...
@@ -752,7 +755,7 @@ static int xfrm_user_rcv_msg(struct sk_buff *skb, struct nlmsghdr *nlh, int *err
...
@@ -752,7 +755,7 @@ static int xfrm_user_rcv_msg(struct sk_buff *skb, struct nlmsghdr *nlh, int *err
{
{
struct
rtattr
*
xfrma
[
XFRMA_MAX
];
struct
rtattr
*
xfrma
[
XFRMA_MAX
];
struct
xfrm_link
*
link
;
struct
xfrm_link
*
link
;
int
type
,
min_len
,
kind
;
int
type
,
min_len
;
if
(
!
(
nlh
->
nlmsg_flags
&
NLM_F_REQUEST
))
if
(
!
(
nlh
->
nlmsg_flags
&
NLM_F_REQUEST
))
return
0
;
return
0
;
...
@@ -768,7 +771,6 @@ static int xfrm_user_rcv_msg(struct sk_buff *skb, struct nlmsghdr *nlh, int *err
...
@@ -768,7 +771,6 @@ static int xfrm_user_rcv_msg(struct sk_buff *skb, struct nlmsghdr *nlh, int *err
goto
err_einval
;
goto
err_einval
;
type
-=
XFRM_MSG_BASE
;
type
-=
XFRM_MSG_BASE
;
kind
=
(
type
&
3
);
link
=
&
xfrm_dispatch
[
type
];
link
=
&
xfrm_dispatch
[
type
];
/* All operations require privileges, even GET */
/* All operations require privileges, even GET */
...
@@ -777,7 +779,7 @@ static int xfrm_user_rcv_msg(struct sk_buff *skb, struct nlmsghdr *nlh, int *err
...
@@ -777,7 +779,7 @@ static int xfrm_user_rcv_msg(struct sk_buff *skb, struct nlmsghdr *nlh, int *err
return
-
1
;
return
-
1
;
}
}
if
(
kind
==
2
&&
(
nlh
->
nlmsg_flags
&
NLM_F_DUMP
))
{
if
(
(
type
==
2
||
type
==
5
)
&&
(
nlh
->
nlmsg_flags
&
NLM_F_DUMP
))
{
u32
rlen
;
u32
rlen
;
if
(
link
->
dump
==
NULL
)
if
(
link
->
dump
==
NULL
)
...
...
net/ipv6/tcp_ipv6.c
View file @
3d0213fb
...
@@ -934,11 +934,11 @@ static void tcp_v6_or_free(struct open_request *req)
...
@@ -934,11 +934,11 @@ static void tcp_v6_or_free(struct open_request *req)
}
}
static
struct
or_calltable
or_ipv6
=
{
static
struct
or_calltable
or_ipv6
=
{
AF_INET6
,
.
family
=
AF_INET6
,
tcp_v6_send_synack
,
.
rtx_syn_ack
=
tcp_v6_send_synack
,
tcp_v6_or_send_ack
,
.
send_ack
=
tcp_v6_or_send_ack
,
tcp_v6_or_free
,
.
destructor
=
tcp_v6_or_free
,
tcp_v6_send_reset
.
send_reset
=
tcp_v6_send_reset
};
};
static
int
ipv6_opt_accepted
(
struct
sock
*
sk
,
struct
sk_buff
*
skb
)
static
int
ipv6_opt_accepted
(
struct
sock
*
sk
,
struct
sk_buff
*
skb
)
...
@@ -1746,7 +1746,7 @@ static int tcp_v6_rebuild_header(struct sock *sk)
...
@@ -1746,7 +1746,7 @@ static int tcp_v6_rebuild_header(struct sock *sk)
return
0
;
return
0
;
}
}
static
int
tcp_v6_xmit
(
struct
sk_buff
*
skb
)
static
int
tcp_v6_xmit
(
struct
sk_buff
*
skb
,
int
ipfragok
)
{
{
struct
sock
*
sk
=
skb
->
sk
;
struct
sock
*
sk
=
skb
->
sk
;
struct
inet_opt
*
inet
=
inet_sk
(
sk
);
struct
inet_opt
*
inet
=
inet_sk
(
sk
);
...
@@ -1812,18 +1812,18 @@ static int tcp_v6_remember_stamp(struct sock *sk)
...
@@ -1812,18 +1812,18 @@ static int tcp_v6_remember_stamp(struct sock *sk)
}
}
static
struct
tcp_func
ipv6_specific
=
{
static
struct
tcp_func
ipv6_specific
=
{
tcp_v6_xmit
,
.
queue_xmit
=
tcp_v6_xmit
,
tcp_v6_send_check
,
.
send_check
=
tcp_v6_send_check
,
tcp_v6_rebuild_header
,
.
rebuild_header
=
tcp_v6_rebuild_header
,
tcp_v6_conn_request
,
.
conn_request
=
tcp_v6_conn_request
,
tcp_v6_syn_recv_sock
,
.
syn_recv_sock
=
tcp_v6_syn_recv_sock
,
tcp_v6_remember_stamp
,
.
remember_stamp
=
tcp_v6_remember_stamp
,
sizeof
(
struct
ipv6hdr
),
.
net_header_len
=
sizeof
(
struct
ipv6hdr
),
ipv6_setsockopt
,
.
setsockopt
=
ipv6_setsockopt
,
ipv6_getsockopt
,
.
getsockopt
=
ipv6_getsockopt
,
v6_addr2sockaddr
,
.
addr2sockaddr
=
v6_addr2sockaddr
,
sizeof
(
struct
sockaddr_in6
)
.
sockaddr_len
=
sizeof
(
struct
sockaddr_in6
)
};
};
/*
/*
...
@@ -1831,18 +1831,18 @@ static struct tcp_func ipv6_specific = {
...
@@ -1831,18 +1831,18 @@ static struct tcp_func ipv6_specific = {
*/
*/
static
struct
tcp_func
ipv6_mapped
=
{
static
struct
tcp_func
ipv6_mapped
=
{
ip_queue_xmit
,
.
queue_xmit
=
ip_queue_xmit
,
tcp_v4_send_check
,
.
send_check
=
tcp_v4_send_check
,
tcp_v4_rebuild_header
,
.
rebuild_header
=
tcp_v4_rebuild_header
,
tcp_v6_conn_request
,
.
conn_request
=
tcp_v6_conn_request
,
tcp_v6_syn_recv_sock
,
.
syn_recv_sock
=
tcp_v6_syn_recv_sock
,
tcp_v4_remember_stamp
,
.
remember_stamp
=
tcp_v4_remember_stamp
,
sizeof
(
struct
iphdr
),
.
net_header_len
=
sizeof
(
struct
iphdr
),
ipv6_setsockopt
,
.
setsockopt
=
ipv6_setsockopt
,
ipv6_getsockopt
,
.
getsockopt
=
ipv6_getsockopt
,
v6_addr2sockaddr
,
.
addr2sockaddr
=
v6_addr2sockaddr
,
sizeof
(
struct
sockaddr_in6
)
.
sockaddr_len
=
sizeof
(
struct
sockaddr_in6
)
};
};
...
@@ -2157,23 +2157,23 @@ int tcp6_get_info(char *buffer, char **start, off_t offset, int length)
...
@@ -2157,23 +2157,23 @@ int tcp6_get_info(char *buffer, char **start, off_t offset, int length)
}
}
struct
proto
tcpv6_prot
=
{
struct
proto
tcpv6_prot
=
{
.
name
=
"TCPv6"
,
.
name
=
"TCPv6"
,
.
close
=
tcp_close
,
.
close
=
tcp_close
,
.
connect
=
tcp_v6_connect
,
.
connect
=
tcp_v6_connect
,
.
disconnect
=
tcp_disconnect
,
.
disconnect
=
tcp_disconnect
,
.
accept
=
tcp_accept
,
.
accept
=
tcp_accept
,
.
ioctl
=
tcp_ioctl
,
.
ioctl
=
tcp_ioctl
,
.
init
=
tcp_v6_init_sock
,
.
init
=
tcp_v6_init_sock
,
.
destroy
=
tcp_v6_destroy_sock
,
.
destroy
=
tcp_v6_destroy_sock
,
.
shutdown
=
tcp_shutdown
,
.
shutdown
=
tcp_shutdown
,
.
setsockopt
=
tcp_setsockopt
,
.
setsockopt
=
tcp_setsockopt
,
.
getsockopt
=
tcp_getsockopt
,
.
getsockopt
=
tcp_getsockopt
,
.
sendmsg
=
tcp_sendmsg
,
.
sendmsg
=
tcp_sendmsg
,
.
recvmsg
=
tcp_recvmsg
,
.
recvmsg
=
tcp_recvmsg
,
.
backlog_rcv
=
tcp_v6_do_rcv
,
.
backlog_rcv
=
tcp_v6_do_rcv
,
.
hash
=
tcp_v6_hash
,
.
hash
=
tcp_v6_hash
,
.
unhash
=
tcp_unhash
,
.
unhash
=
tcp_unhash
,
.
get_port
=
tcp_v6_get_port
,
.
get_port
=
tcp_v6_get_port
,
};
};
static
struct
inet6_protocol
tcpv6_protocol
=
{
static
struct
inet6_protocol
tcpv6_protocol
=
{
...
@@ -2184,13 +2184,13 @@ static struct inet6_protocol tcpv6_protocol = {
...
@@ -2184,13 +2184,13 @@ static struct inet6_protocol tcpv6_protocol = {
extern
struct
proto_ops
inet6_stream_ops
;
extern
struct
proto_ops
inet6_stream_ops
;
static
struct
inet_protosw
tcpv6_protosw
=
{
static
struct
inet_protosw
tcpv6_protosw
=
{
.
type
=
SOCK_STREAM
,
.
type
=
SOCK_STREAM
,
.
protocol
=
IPPROTO_TCP
,
.
protocol
=
IPPROTO_TCP
,
.
prot
=
&
tcpv6_prot
,
.
prot
=
&
tcpv6_prot
,
.
ops
=
&
inet6_stream_ops
,
.
ops
=
&
inet6_stream_ops
,
.
capability
=
-
1
,
.
capability
=
-
1
,
.
no_check
=
0
,
.
no_check
=
0
,
.
flags
=
INET_PROTOSW_PERMANENT
,
.
flags
=
INET_PROTOSW_PERMANENT
,
};
};
void
__init
tcpv6_init
(
void
)
void
__init
tcpv6_init
(
void
)
...
...
net/netsyms.c
View file @
3d0213fb
...
@@ -248,6 +248,8 @@ EXPORT_SYMBOL(inet_unregister_protosw);
...
@@ -248,6 +248,8 @@ EXPORT_SYMBOL(inet_unregister_protosw);
EXPORT_SYMBOL
(
ip_route_output_key
);
EXPORT_SYMBOL
(
ip_route_output_key
);
EXPORT_SYMBOL
(
ip_route_input
);
EXPORT_SYMBOL
(
ip_route_input
);
EXPORT_SYMBOL
(
icmp_send
);
EXPORT_SYMBOL
(
icmp_send
);
EXPORT_SYMBOL
(
icmp_statistics
);
EXPORT_SYMBOL
(
icmp_err_convert
);
EXPORT_SYMBOL
(
ip_options_compile
);
EXPORT_SYMBOL
(
ip_options_compile
);
EXPORT_SYMBOL
(
ip_options_undo
);
EXPORT_SYMBOL
(
ip_options_undo
);
EXPORT_SYMBOL
(
arp_send
);
EXPORT_SYMBOL
(
arp_send
);
...
@@ -427,6 +429,7 @@ EXPORT_SYMBOL(sysctl_tcp_wmem);
...
@@ -427,6 +429,7 @@ EXPORT_SYMBOL(sysctl_tcp_wmem);
EXPORT_SYMBOL
(
sysctl_tcp_ecn
);
EXPORT_SYMBOL
(
sysctl_tcp_ecn
);
EXPORT_SYMBOL
(
tcp_cwnd_application_limited
);
EXPORT_SYMBOL
(
tcp_cwnd_application_limited
);
EXPORT_SYMBOL
(
tcp_sendpage
);
EXPORT_SYMBOL
(
tcp_sendpage
);
EXPORT_SYMBOL
(
sysctl_tcp_low_latency
);
EXPORT_SYMBOL
(
tcp_write_xmit
);
EXPORT_SYMBOL
(
tcp_write_xmit
);
...
...
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