Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
L
Linux
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
E-EXK4 - Operating System Group
projects
Linux
Commits
abbf46ae
Commit
abbf46ae
authored
14 years ago
by
David S. Miller
Browse files
Options
Downloads
Patches
Plain Diff
ipv6: Use ip6_dst_hoplimit() instead of direct dst_metric() calls.
Signed-off-by:
David S. Miller
<
davem@davemloft.net
>
parent
16359533
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
net/ipv6/netfilter/ip6t_REJECT.c
+1
-1
1 addition, 1 deletion
net/ipv6/netfilter/ip6t_REJECT.c
net/ipv6/route.c
+1
-0
1 addition, 0 deletions
net/ipv6/route.c
net/ipv6/xfrm6_mode_tunnel.c
+2
-1
2 additions, 1 deletion
net/ipv6/xfrm6_mode_tunnel.c
with
4 additions
and
2 deletions
net/ipv6/netfilter/ip6t_REJECT.c
+
1
−
1
View file @
abbf46ae
...
...
@@ -124,7 +124,7 @@ static void send_reset(struct net *net, struct sk_buff *oldskb)
skb_reset_network_header
(
nskb
);
ip6h
=
ipv6_hdr
(
nskb
);
ip6h
->
version
=
6
;
ip6h
->
hop_limit
=
dst_metric
(
dst
,
RTAX_HOPLIMIT
);
ip6h
->
hop_limit
=
ip6_dst_hoplimit
(
dst
);
ip6h
->
nexthdr
=
IPPROTO_TCP
;
ipv6_addr_copy
(
&
ip6h
->
saddr
,
&
oip6h
->
daddr
);
ipv6_addr_copy
(
&
ip6h
->
daddr
,
&
oip6h
->
saddr
);
...
...
This diff is collapsed.
Click to expand it.
net/ipv6/route.c
+
1
−
0
View file @
abbf46ae
...
...
@@ -1119,6 +1119,7 @@ int ip6_dst_hoplimit(struct dst_entry *dst)
}
return
hoplimit
;
}
EXPORT_SYMBOL
(
ip6_dst_hoplimit
);
/*
*
...
...
This diff is collapsed.
Click to expand it.
net/ipv6/xfrm6_mode_tunnel.c
+
2
−
1
View file @
abbf46ae
...
...
@@ -14,6 +14,7 @@
#include
<net/dsfield.h>
#include
<net/dst.h>
#include
<net/inet_ecn.h>
#include
<net/ip6_route.h>
#include
<net/ipv6.h>
#include
<net/xfrm.h>
...
...
@@ -53,7 +54,7 @@ static int xfrm6_mode_tunnel_output(struct xfrm_state *x, struct sk_buff *skb)
if
(
x
->
props
.
flags
&
XFRM_STATE_NOECN
)
dsfield
&=
~
INET_ECN_MASK
;
ipv6_change_dsfield
(
top_iph
,
0
,
dsfield
);
top_iph
->
hop_limit
=
dst_metric
(
dst
->
child
,
RTAX_HOPLIMIT
);
top_iph
->
hop_limit
=
ip6_dst_hoplimit
(
dst
->
child
);
ipv6_addr_copy
(
&
top_iph
->
saddr
,
(
struct
in6_addr
*
)
&
x
->
props
.
saddr
);
ipv6_addr_copy
(
&
top_iph
->
daddr
,
(
struct
in6_addr
*
)
&
x
->
id
.
daddr
);
return
0
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment