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
19e8c107
Commit
19e8c107
authored
Mar 02, 2003
by
James Morris
Committed by
David S. Miller
Mar 02, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[NET]: dst_clone --> dst_hold where appropriate.
parent
f54cf50e
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
13 deletions
+13
-13
net/ipv4/route.c
net/ipv4/route.c
+1
-1
net/ipv6/ip6_output.c
net/ipv6/ip6_output.c
+1
-1
net/ipv6/route.c
net/ipv6/route.c
+10
-10
net/ipv6/tcp_ipv6.c
net/ipv6/tcp_ipv6.c
+1
-1
No files found.
net/ipv4/route.c
View file @
19e8c107
...
...
@@ -930,7 +930,7 @@ void ip_rt_redirect(u32 old_gw, u32 daddr, u32 new_gw,
rth
->
u
.
dst
.
dev
!=
dev
)
break
;
dst_
clone
(
&
rth
->
u
.
dst
);
dst_
hold
(
&
rth
->
u
.
dst
);
rcu_read_unlock
();
rt
=
dst_alloc
(
&
ipv4_dst_ops
);
...
...
net/ipv6/ip6_output.c
View file @
19e8c107
...
...
@@ -550,7 +550,7 @@ int ip6_build_xmit(struct sock *sk, inet_getfrag_t getfrag, const void *data,
||
(
fl
->
oif
&&
fl
->
oif
!=
dst
->
dev
->
ifindex
))
{
dst
=
NULL
;
}
else
dst_
clone
(
dst
);
dst_
hold
(
dst
);
}
if
(
dst
==
NULL
)
...
...
net/ipv6/route.c
View file @
19e8c107
...
...
@@ -356,7 +356,7 @@ static struct rt6_info *rt6_cow(struct rt6_info *ort, struct in6_addr *daddr,
rt
->
rt6i_nexthop
=
ndisc_get_neigh
(
rt
->
rt6i_dev
,
&
rt
->
rt6i_gateway
);
dst_
clone
(
&
rt
->
u
.
dst
);
dst_
hold
(
&
rt
->
u
.
dst
);
err
=
rt6_ins
(
rt
);
if
(
err
==
0
)
...
...
@@ -366,7 +366,7 @@ static struct rt6_info *rt6_cow(struct rt6_info *ort, struct in6_addr *daddr,
return
rt
;
}
dst_
clone
(
&
ip6_null_entry
.
u
.
dst
);
dst_
hold
(
&
ip6_null_entry
.
u
.
dst
);
return
&
ip6_null_entry
;
}
...
...
@@ -374,7 +374,7 @@ static struct rt6_info *rt6_cow(struct rt6_info *ort, struct in6_addr *daddr,
if (rt == &ip6_null_entry && strict) { \
while ((fn = fn->parent) != NULL) { \
if (fn->fn_flags & RTN_ROOT) { \
dst_
clone
(&rt->u.dst); \
dst_
hold
(&rt->u.dst); \
goto out; \
} \
if (fn->fn_flags & RTN_RTINFO) \
...
...
@@ -404,7 +404,7 @@ void ip6_route_input(struct sk_buff *skb)
if
((
rt
->
rt6i_flags
&
RTF_CACHE
))
{
rt
=
rt6_device_match
(
rt
,
skb
->
dev
->
ifindex
,
strict
);
BACKTRACK
();
dst_
clone
(
&
rt
->
u
.
dst
);
dst_
hold
(
&
rt
->
u
.
dst
);
goto
out
;
}
...
...
@@ -424,7 +424,7 @@ void ip6_route_input(struct sk_buff *skb)
*/
goto
relookup
;
}
dst_
clone
(
&
rt
->
u
.
dst
);
dst_
hold
(
&
rt
->
u
.
dst
);
out:
read_unlock_bh
(
&
rt6_lock
);
...
...
@@ -455,7 +455,7 @@ struct dst_entry * ip6_route_output(struct sock *sk, struct flowi *fl)
if
((
rt
->
rt6i_flags
&
RTF_CACHE
))
{
rt
=
rt6_device_match
(
rt
,
fl
->
oif
,
strict
);
BACKTRACK
();
dst_
clone
(
&
rt
->
u
.
dst
);
dst_
hold
(
&
rt
->
u
.
dst
);
goto
out
;
}
if
(
rt
->
rt6i_flags
&
RTF_DEFAULT
)
{
...
...
@@ -480,7 +480,7 @@ struct dst_entry * ip6_route_output(struct sock *sk, struct flowi *fl)
*/
goto
relookup
;
}
dst_
clone
(
&
rt
->
u
.
dst
);
dst_
hold
(
&
rt
->
u
.
dst
);
out:
read_unlock_bh
(
&
rt6_lock
);
...
...
@@ -815,7 +815,7 @@ static int ip6_route_del(struct in6_rtmsg *rtmsg)
if
(
rtmsg
->
rtmsg_metric
&&
rtmsg
->
rtmsg_metric
!=
rt
->
rt6i_metric
)
continue
;
dst_
clone
(
&
rt
->
u
.
dst
);
dst_
hold
(
&
rt
->
u
.
dst
);
read_unlock_bh
(
&
rt6_lock
);
return
ip6_del_rt
(
rt
);
...
...
@@ -878,7 +878,7 @@ void rt6_redirect(struct in6_addr *dest, struct in6_addr *saddr,
read_lock
(
&
rt6_lock
);
for
(
rt1
=
ip6_routing_table
.
leaf
;
rt1
;
rt1
=
rt1
->
u
.
next
)
{
if
(
!
ipv6_addr_cmp
(
saddr
,
&
rt1
->
rt6i_gateway
))
{
dst_
clone
(
&
rt1
->
u
.
dst
);
dst_
hold
(
&
rt1
->
u
.
dst
);
dst_release
(
&
rt
->
u
.
dst
);
read_unlock
(
&
rt6_lock
);
rt
=
rt1
;
...
...
@@ -1065,7 +1065,7 @@ struct rt6_info *rt6_get_dflt_router(struct in6_addr *addr, struct net_device *d
break
;
}
if
(
rt
)
dst_
clone
(
&
rt
->
u
.
dst
);
dst_
hold
(
&
rt
->
u
.
dst
);
write_unlock_bh
(
&
rt6_lock
);
return
rt
;
}
...
...
net/ipv6/tcp_ipv6.c
View file @
19e8c107
...
...
@@ -800,7 +800,7 @@ static void tcp_v6_err(struct sk_buff *skb, struct inet6_skb_parm *opt,
dst
=
ip6_route_output
(
sk
,
&
fl
);
}
else
dst_
clone
(
dst
);
dst_
hold
(
dst
);
if
(
dst
->
error
)
{
sk
->
err_soft
=
-
dst
->
error
;
...
...
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