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
c8cdaf99
Commit
c8cdaf99
authored
Mar 10, 2008
by
YOSHIFUJI Hideaki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[IPV4,IPV6]: Share cork.rt between IPv4 and IPv6.
Signed-off-by:
YOSHIFUJI Hideaki
<
yoshfuji@linux-ipv6.org
>
parent
a9b05723
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
16 deletions
+13
-16
include/linux/ipv6.h
include/linux/ipv6.h
+0
-1
include/net/inet_sock.h
include/net/inet_sock.h
+1
-1
net/ipv4/ip_output.c
net/ipv4/ip_output.c
+6
-8
net/ipv6/ip6_output.c
net/ipv6/ip6_output.c
+6
-6
No files found.
include/linux/ipv6.h
View file @
c8cdaf99
...
...
@@ -315,7 +315,6 @@ struct ipv6_pinfo {
struct
sk_buff
*
pktoptions
;
struct
{
struct
ipv6_txoptions
*
opt
;
struct
rt6_info
*
rt
;
int
hop_limit
;
int
tclass
;
}
cork
;
...
...
include/net/inet_sock.h
View file @
c8cdaf99
...
...
@@ -136,7 +136,7 @@ struct inet_sock {
unsigned
int
flags
;
unsigned
int
fragsize
;
struct
ip_options
*
opt
;
struct
rtable
*
r
t
;
struct
dst_entry
*
ds
t
;
int
length
;
/* Total length of all frames */
__be32
addr
;
struct
flowi
fl
;
...
...
net/ipv4/ip_output.c
View file @
c8cdaf99
...
...
@@ -825,7 +825,7 @@ int ip_append_data(struct sock *sk,
inet
->
cork
.
fragsize
=
mtu
=
inet
->
pmtudisc
==
IP_PMTUDISC_PROBE
?
rt
->
u
.
dst
.
dev
->
mtu
:
dst_mtu
(
rt
->
u
.
dst
.
path
);
inet
->
cork
.
rt
=
r
t
;
inet
->
cork
.
dst
=
&
rt
->
u
.
ds
t
;
inet
->
cork
.
length
=
0
;
sk
->
sk_sndmsg_page
=
NULL
;
sk
->
sk_sndmsg_off
=
0
;
...
...
@@ -834,7 +834,7 @@ int ip_append_data(struct sock *sk,
transhdrlen
+=
exthdrlen
;
}
}
else
{
rt
=
inet
->
cork
.
r
t
;
rt
=
(
struct
rtable
*
)
inet
->
cork
.
ds
t
;
if
(
inet
->
cork
.
flags
&
IPCORK_OPT
)
opt
=
inet
->
cork
.
opt
;
...
...
@@ -1083,7 +1083,7 @@ ssize_t ip_append_page(struct sock *sk, struct page *page,
if
(
skb_queue_empty
(
&
sk
->
sk_write_queue
))
return
-
EINVAL
;
rt
=
inet
->
cork
.
r
t
;
rt
=
(
struct
rtable
*
)
inet
->
cork
.
ds
t
;
if
(
inet
->
cork
.
flags
&
IPCORK_OPT
)
opt
=
inet
->
cork
.
opt
;
...
...
@@ -1208,10 +1208,8 @@ static void ip_cork_release(struct inet_sock *inet)
inet
->
cork
.
flags
&=
~
IPCORK_OPT
;
kfree
(
inet
->
cork
.
opt
);
inet
->
cork
.
opt
=
NULL
;
if
(
inet
->
cork
.
rt
)
{
ip_rt_put
(
inet
->
cork
.
rt
);
inet
->
cork
.
rt
=
NULL
;
}
dst_release
(
inet
->
cork
.
dst
);
inet
->
cork
.
dst
=
NULL
;
}
/*
...
...
@@ -1224,7 +1222,7 @@ int ip_push_pending_frames(struct sock *sk)
struct
sk_buff
**
tail_skb
;
struct
inet_sock
*
inet
=
inet_sk
(
sk
);
struct
ip_options
*
opt
=
NULL
;
struct
rtable
*
rt
=
inet
->
cork
.
r
t
;
struct
rtable
*
rt
=
(
struct
rtable
*
)
inet
->
cork
.
ds
t
;
struct
iphdr
*
iph
;
__be16
df
=
0
;
__u8
ttl
;
...
...
net/ipv6/ip6_output.c
View file @
c8cdaf99
...
...
@@ -1115,7 +1115,7 @@ int ip6_append_data(struct sock *sk, int getfrag(void *from, char *to,
/* need source address above miyazawa*/
}
dst_hold
(
&
rt
->
u
.
dst
);
np
->
cork
.
rt
=
r
t
;
inet
->
cork
.
dst
=
&
rt
->
u
.
ds
t
;
inet
->
cork
.
fl
=
*
fl
;
np
->
cork
.
hop_limit
=
hlimit
;
np
->
cork
.
tclass
=
tclass
;
...
...
@@ -1136,7 +1136,7 @@ int ip6_append_data(struct sock *sk, int getfrag(void *from, char *to,
length
+=
exthdrlen
;
transhdrlen
+=
exthdrlen
;
}
else
{
rt
=
np
->
cork
.
r
t
;
rt
=
(
struct
rt6_info
*
)
inet
->
cork
.
ds
t
;
fl
=
&
inet
->
cork
.
fl
;
if
(
inet
->
cork
.
flags
&
IPCORK_OPT
)
opt
=
np
->
cork
.
opt
;
...
...
@@ -1381,9 +1381,9 @@ static void ip6_cork_release(struct inet_sock *inet, struct ipv6_pinfo *np)
inet
->
cork
.
flags
&=
~
IPCORK_OPT
;
kfree
(
np
->
cork
.
opt
);
np
->
cork
.
opt
=
NULL
;
if
(
np
->
cork
.
r
t
)
{
dst_release
(
&
np
->
cork
.
rt
->
u
.
dst
);
np
->
cork
.
r
t
=
NULL
;
if
(
inet
->
cork
.
ds
t
)
{
dst_release
(
inet
->
cork
.
dst
);
inet
->
cork
.
ds
t
=
NULL
;
inet
->
cork
.
flags
&=
~
IPCORK_ALLFRAG
;
}
memset
(
&
inet
->
cork
.
fl
,
0
,
sizeof
(
inet
->
cork
.
fl
));
...
...
@@ -1398,7 +1398,7 @@ int ip6_push_pending_frames(struct sock *sk)
struct
ipv6_pinfo
*
np
=
inet6_sk
(
sk
);
struct
ipv6hdr
*
hdr
;
struct
ipv6_txoptions
*
opt
=
np
->
cork
.
opt
;
struct
rt6_info
*
rt
=
np
->
cork
.
r
t
;
struct
rt6_info
*
rt
=
(
struct
rt6_info
*
)
inet
->
cork
.
ds
t
;
struct
flowi
*
fl
=
&
inet
->
cork
.
fl
;
unsigned
char
proto
=
fl
->
proto
;
int
err
=
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