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
Show 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
assassination.
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
Defines the local port range that is used by TCP and UDP to
choose the local port. The first number is the first, the
...
...
drivers/net/ppp_generic.c
View file @
3d0213fb
...
...
@@ -962,12 +962,11 @@ ppp_send_frame(struct ppp *ppp, struct sk_buff *skb)
if
(
ppp
->
pass_filter
.
filter
&&
sk_run_filter
(
skb
,
ppp
->
pass_filter
.
filter
,
ppp
->
pass_filter
.
len
)
==
0
)
{
if
(
ppp
->
debug
&
1
)
{
if
(
ppp
->
debug
&
1
)
printk
(
KERN_DEBUG
"PPP: outbound frame not passed
\n
"
);
kfree_skb
(
skb
);
return
;
}
}
/* if this packet passes the active filter, record the time */
if
(
!
(
ppp
->
active_filter
.
filter
&&
sk_run_filter
(
skb
,
ppp
->
active_filter
.
filter
,
...
...
include/linux/sysctl.h
View file @
3d0213fb
...
...
@@ -305,7 +305,8 @@ enum
NET_IPV4_ICMP_RATELIMIT
=
89
,
NET_IPV4_ICMP_RATEMASK
=
90
,
NET_TCP_TW_REUSE
=
91
,
NET_TCP_FRTO
=
92
NET_TCP_FRTO
=
92
,
NET_TCP_LOW_LATENCY
=
93
};
enum
{
...
...
include/net/ip.h
View file @
3d0213fb
...
...
@@ -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_do_nat
(
struct
sk_buff
*
skb
);
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
int
ip_append_data
(
struct
sock
*
sk
,
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,
ip_rt_put
(
*
rp
);
*
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
,
...
...
include/net/tcp.h
View file @
3d0213fb
...
...
@@ -474,6 +474,7 @@ extern int sysctl_tcp_app_win;
extern
int
sysctl_tcp_adv_win_scale
;
extern
int
sysctl_tcp_tw_reuse
;
extern
int
sysctl_tcp_frto
;
extern
int
sysctl_tcp_low_latency
;
extern
atomic_t
tcp_memory_allocated
;
extern
atomic_t
tcp_sockets_allocated
;
...
...
@@ -566,7 +567,8 @@ static inline void tcp_openreq_free(struct open_request *req)
*/
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
,
struct
tcphdr
*
th
,
...
...
@@ -1348,7 +1350,7 @@ static __inline__ int tcp_prequeue(struct sock *sk, struct sk_buff *skb)
{
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
);
tp
->
ucopy
.
memory
+=
skb
->
truesize
;
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)
pskb_expand_head
(
skb
,
0
,
0
,
GFP_ATOMIC
))
goto
out
;
skb
->
ip_summed
=
CHECKSUM_NONE
;
ah
=
(
struct
ip_auth_hdr
*
)
skb
->
data
;
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)
if
((
nfrags
=
skb_cow_data
(
skb
,
0
,
&
trailer
))
<
0
)
goto
out
;
skb
->
ip_summed
=
CHECKSUM_NONE
;
esph
=
(
struct
ip_esp_hdr
*
)
skb
->
data
;
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)
if
(
!
iter
->
zone
)
goto
out
;
if
(
iter
->
zone
->
fz_next
)
;
if
(
iter
->
zone
->
fz_next
)
break
;
}
...
...
net/ipv4/ip_output.c
View file @
3d0213fb
...
...
@@ -280,7 +280,7 @@ int ip_output(struct sk_buff *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
inet_opt
*
inet
=
inet_sk
(
sk
);
...
...
@@ -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
));
*
((
__u16
*
)
iph
)
=
htons
((
4
<<
12
)
|
(
5
<<
8
)
|
(
inet
->
tos
&
0xff
));
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
);
else
iph
->
frag_off
=
0
;
...
...
net/ipv4/sysctl_net_ipv4.c
View file @
3d0213fb
...
...
@@ -223,6 +223,8 @@ ctl_table ipv4_table[] = {
&
sysctl_tcp_tw_reuse
,
sizeof
(
int
),
0644
,
NULL
,
&
proc_dointvec
},
{
NET_TCP_FRTO
,
"tcp_frto"
,
&
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
}
};
...
...
net/ipv4/tcp_ipv4.c
View file @
3d0213fb
...
...
@@ -75,6 +75,7 @@
extern
int
sysctl_ip_dynaddr
;
extern
int
sysctl_ip_default_ttl
;
int
sysctl_tcp_tw_reuse
;
int
sysctl_tcp_low_latency
;
/* Check TCP sequence numbers in ICMP packets. */
#define ICMP_MIN_LENGTH 8
...
...
@@ -2049,14 +2050,14 @@ int tcp_v4_tw_remember_stamp(struct tcp_tw_bucket *tw)
struct
tcp_func
ipv4_specific
=
{
.
queue_xmit
=
ip_queue_xmit
,
.
send_check
=
tcp_v4_send_check
,
.
rebuild_header
=
tcp_v4_rebuild_header
,
.
rebuild_header
=
tcp_v4_rebuild_header
,
.
conn_request
=
tcp_v4_conn_request
,
.
syn_recv_sock
=
tcp_v4_syn_recv_sock
,
.
remember_stamp
=
tcp_v4_remember_stamp
,
.
net_header_len
=
sizeof
(
struct
iphdr
),
.
syn_recv_sock
=
tcp_v4_syn_recv_sock
,
.
remember_stamp
=
tcp_v4_remember_stamp
,
.
net_header_len
=
sizeof
(
struct
iphdr
),
.
setsockopt
=
ip_setsockopt
,
.
getsockopt
=
ip_getsockopt
,
.
addr2sockaddr
=
v4_addr2sockaddr
,
.
addr2sockaddr
=
v4_addr2sockaddr
,
.
sockaddr_len
=
sizeof
(
struct
sockaddr_in
),
};
...
...
net/ipv4/tcp_minisocks.c
View file @
3d0213fb
...
...
@@ -952,6 +952,12 @@ struct sock *tcp_check_req(struct sock *sk,struct sk_buff *skb,
if
(
flg
&
(
TCP_FLAG_RST
|
TCP_FLAG_SYN
))
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
(
tp
->
defer_accept
&&
TCP_SKB_CB
(
skb
)
->
end_seq
==
req
->
rcv_isn
+
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)
TCP_INC_STATS
(
TcpOutSegs
);
err
=
tp
->
af_specific
->
queue_xmit
(
skb
);
err
=
tp
->
af_specific
->
queue_xmit
(
skb
,
0
);
if
(
err
<=
0
)
return
err
;
...
...
@@ -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. */
__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
)
skb
->
ip_summed
=
CHECKSUM_HW
;
if
(
skb
->
ip_summed
!=
CHECKSUM_HW
)
{
memcpy
(
skb_put
(
skb
,
next_skb_size
),
next_skb
->
data
,
next_skb_size
);
if
(
skb
->
ip_summed
!=
CHECKSUM_HW
)
skb
->
csum
=
csum_block_add
(
skb
->
csum
,
next_skb
->
csum
,
skb_size
);
}
/* Update sequence range on original skb. */
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)
copy_to_user_state
(
x
,
p
);
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
)
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
)
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)
info
.
in_skb
=
cb
->
skb
;
info
.
out_skb
=
skb
;
info
.
nlmsg_seq
=
cb
->
nlh
->
nlmsg_seq
;
info
.
this_idx
=
0
;
info
.
start_idx
=
cb
->
args
[
0
];
(
void
)
xfrm_policy_walk
(
dump_one_policy
,
&
info
);
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
{
struct
rtattr
*
xfrma
[
XFRMA_MAX
];
struct
xfrm_link
*
link
;
int
type
,
min_len
,
kind
;
int
type
,
min_len
;
if
(
!
(
nlh
->
nlmsg_flags
&
NLM_F_REQUEST
))
return
0
;
...
...
@@ -768,7 +771,6 @@ static int xfrm_user_rcv_msg(struct sk_buff *skb, struct nlmsghdr *nlh, int *err
goto
err_einval
;
type
-=
XFRM_MSG_BASE
;
kind
=
(
type
&
3
);
link
=
&
xfrm_dispatch
[
type
];
/* 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
return
-
1
;
}
if
(
kind
==
2
&&
(
nlh
->
nlmsg_flags
&
NLM_F_DUMP
))
{
if
(
(
type
==
2
||
type
==
5
)
&&
(
nlh
->
nlmsg_flags
&
NLM_F_DUMP
))
{
u32
rlen
;
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)
}
static
struct
or_calltable
or_ipv6
=
{
AF_INET6
,
tcp_v6_send_synack
,
tcp_v6_or_send_ack
,
tcp_v6_or_free
,
tcp_v6_send_reset
.
family
=
AF_INET6
,
.
rtx_syn_ack
=
tcp_v6_send_synack
,
.
send_ack
=
tcp_v6_or_send_ack
,
.
destructor
=
tcp_v6_or_free
,
.
send_reset
=
tcp_v6_send_reset
};
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)
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
inet_opt
*
inet
=
inet_sk
(
sk
);
...
...
@@ -1812,18 +1812,18 @@ static int tcp_v6_remember_stamp(struct sock *sk)
}
static
struct
tcp_func
ipv6_specific
=
{
tcp_v6_xmit
,
tcp_v6_send_check
,
tcp_v6_rebuild_header
,
tcp_v6_conn_request
,
tcp_v6_syn_recv_sock
,
tcp_v6_remember_stamp
,
sizeof
(
struct
ipv6hdr
),
ipv6_setsockopt
,
ipv6_getsockopt
,
v6_addr2sockaddr
,
sizeof
(
struct
sockaddr_in6
)
.
queue_xmit
=
tcp_v6_xmit
,
.
send_check
=
tcp_v6_send_check
,
.
rebuild_header
=
tcp_v6_rebuild_header
,
.
conn_request
=
tcp_v6_conn_request
,
.
syn_recv_sock
=
tcp_v6_syn_recv_sock
,
.
remember_stamp
=
tcp_v6_remember_stamp
,
.
net_header_len
=
sizeof
(
struct
ipv6hdr
),
.
setsockopt
=
ipv6_setsockopt
,
.
getsockopt
=
ipv6_getsockopt
,
.
addr2sockaddr
=
v6_addr2sockaddr
,
.
sockaddr_len
=
sizeof
(
struct
sockaddr_in6
)
};
/*
...
...
@@ -1831,18 +1831,18 @@ static struct tcp_func ipv6_specific = {
*/
static
struct
tcp_func
ipv6_mapped
=
{
ip_queue_xmit
,
tcp_v4_send_check
,
tcp_v4_rebuild_header
,
tcp_v6_conn_request
,
tcp_v6_syn_recv_sock
,
tcp_v4_remember_stamp
,
sizeof
(
struct
iphdr
),
ipv6_setsockopt
,
ipv6_getsockopt
,
v6_addr2sockaddr
,
sizeof
(
struct
sockaddr_in6
)
.
queue_xmit
=
ip_queue_xmit
,
.
send_check
=
tcp_v4_send_check
,
.
rebuild_header
=
tcp_v4_rebuild_header
,
.
conn_request
=
tcp_v6_conn_request
,
.
syn_recv_sock
=
tcp_v6_syn_recv_sock
,
.
remember_stamp
=
tcp_v4_remember_stamp
,
.
net_header_len
=
sizeof
(
struct
iphdr
),
.
setsockopt
=
ipv6_setsockopt
,
.
getsockopt
=
ipv6_getsockopt
,
.
addr2sockaddr
=
v6_addr2sockaddr
,
.
sockaddr_len
=
sizeof
(
struct
sockaddr_in6
)
};
...
...
@@ -2188,7 +2188,7 @@ static struct inet_protosw tcpv6_protosw = {
.
protocol
=
IPPROTO_TCP
,
.
prot
=
&
tcpv6_prot
,
.
ops
=
&
inet6_stream_ops
,
.
capability
=
-
1
,
.
capability
=
-
1
,
.
no_check
=
0
,
.
flags
=
INET_PROTOSW_PERMANENT
,
};
...
...
net/netsyms.c
View file @
3d0213fb
...
...
@@ -248,6 +248,8 @@ EXPORT_SYMBOL(inet_unregister_protosw);
EXPORT_SYMBOL
(
ip_route_output_key
);
EXPORT_SYMBOL
(
ip_route_input
);
EXPORT_SYMBOL
(
icmp_send
);
EXPORT_SYMBOL
(
icmp_statistics
);
EXPORT_SYMBOL
(
icmp_err_convert
);
EXPORT_SYMBOL
(
ip_options_compile
);
EXPORT_SYMBOL
(
ip_options_undo
);
EXPORT_SYMBOL
(
arp_send
);
...
...
@@ -427,6 +429,7 @@ EXPORT_SYMBOL(sysctl_tcp_wmem);
EXPORT_SYMBOL
(
sysctl_tcp_ecn
);
EXPORT_SYMBOL
(
tcp_cwnd_application_limited
);
EXPORT_SYMBOL
(
tcp_sendpage
);
EXPORT_SYMBOL
(
sysctl_tcp_low_latency
);
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