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
31fba77b
Commit
31fba77b
authored
Oct 13, 2003
by
Tim Shepard
Committed by
David S. Miller
Oct 13, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[TCP]: Fix numbering of lines in /proc/net/tcp
parent
27890f3b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
net/ipv4/tcp_ipv4.c
net/ipv4/tcp_ipv4.c
+7
-7
No files found.
net/ipv4/tcp_ipv4.c
View file @
31fba77b
...
...
@@ -2145,7 +2145,6 @@ static void *listening_get_first(struct seq_file *seq)
if
(
!
sk
)
continue
;
++
st
->
num
;
if
(
sk
->
sk_family
==
st
->
family
)
{
rc
=
sk
;
goto
out
;
...
...
@@ -2159,7 +2158,7 @@ static void *listening_get_first(struct seq_file *seq)
for
(
st
->
sbucket
=
0
;
st
->
sbucket
<
TCP_SYNQ_HSIZE
;
++
st
->
sbucket
)
{
for
(
req
=
tp
->
listen_opt
->
syn_table
[
st
->
sbucket
];
req
;
req
=
req
->
dl_next
,
++
st
->
num
)
{
req
;
req
=
req
->
dl_next
)
{
if
(
req
->
class
->
family
!=
st
->
family
)
continue
;
rc
=
req
;
...
...
@@ -2181,6 +2180,8 @@ static void *listening_get_next(struct seq_file *seq, void *cur)
struct
sock
*
sk
=
cur
;
struct
tcp_iter_state
*
st
=
seq
->
private
;
++
st
->
num
;
if
(
st
->
state
==
TCP_SEQ_STATE_OPENREQ
)
{
struct
open_request
*
req
=
cur
;
...
...
@@ -2188,7 +2189,6 @@ static void *listening_get_next(struct seq_file *seq, void *cur)
req
=
req
->
dl_next
;
while
(
1
)
{
while
(
req
)
{
++
st
->
num
;
if
(
req
->
class
->
family
==
st
->
family
)
{
cur
=
req
;
goto
out
;
...
...
@@ -2255,7 +2255,6 @@ static void *established_get_first(struct seq_file *seq)
read_lock
(
&
tcp_ehash
[
st
->
bucket
].
lock
);
sk_for_each
(
sk
,
node
,
&
tcp_ehash
[
st
->
bucket
].
chain
)
{
if
(
sk
->
sk_family
!=
st
->
family
)
{
++
st
->
num
;
continue
;
}
rc
=
sk
;
...
...
@@ -2265,7 +2264,6 @@ static void *established_get_first(struct seq_file *seq)
tw_for_each
(
tw
,
node
,
&
tcp_ehash
[
st
->
bucket
+
tcp_ehash_size
].
chain
)
{
if
(
tw
->
tw_family
!=
st
->
family
)
{
++
st
->
num
;
continue
;
}
rc
=
tw
;
...
...
@@ -2285,12 +2283,13 @@ static void *established_get_next(struct seq_file *seq, void *cur)
struct
hlist_node
*
node
;
struct
tcp_iter_state
*
st
=
seq
->
private
;
++
st
->
num
;
if
(
st
->
state
==
TCP_SEQ_STATE_TIME_WAIT
)
{
tw
=
cur
;
tw
=
tw_next
(
tw
);
get_tw:
while
(
tw
&&
tw
->
tw_family
!=
st
->
family
)
{
++
st
->
num
;
tw
=
tw_next
(
tw
);
}
if
(
tw
)
{
...
...
@@ -2312,7 +2311,6 @@ static void *established_get_next(struct seq_file *seq, void *cur)
sk_for_each_from
(
sk
,
node
)
{
if
(
sk
->
sk_family
==
st
->
family
)
goto
found
;
++
st
->
num
;
}
st
->
state
=
TCP_SEQ_STATE_TIME_WAIT
;
...
...
@@ -2356,6 +2354,8 @@ static void *tcp_get_idx(struct seq_file *seq, loff_t pos)
static
void
*
tcp_seq_start
(
struct
seq_file
*
seq
,
loff_t
*
pos
)
{
struct
tcp_iter_state
*
st
=
seq
->
private
;
st
->
num
=
0
;
return
*
pos
?
tcp_get_idx
(
seq
,
*
pos
-
1
)
:
SEQ_START_TOKEN
;
}
...
...
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