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
3a3d5cbd
Commit
3a3d5cbd
authored
Aug 17, 2003
by
Ville Nuorvala
Committed by
David S. Miller
Aug 17, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[IPV6]: Fix tunnel encap limit handling as per RFC2473.
parent
5b703aa0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
net/ipv6/ip6_tunnel.c
net/ipv6/ip6_tunnel.c
+4
-4
No files found.
net/ipv6/ip6_tunnel.c
View file @
3a3d5cbd
...
@@ -423,7 +423,7 @@ void ip6ip6_err(struct sk_buff *skb, struct inet6_skb_parm *opt,
...
@@ -423,7 +423,7 @@ void ip6ip6_err(struct sk_buff *skb, struct inet6_skb_parm *opt,
if
(
teli
&&
teli
==
info
-
2
)
{
if
(
teli
&&
teli
==
info
-
2
)
{
tel
=
(
struct
ipv6_tlv_tnl_enc_lim
*
)
&
skb
->
data
[
teli
];
tel
=
(
struct
ipv6_tlv_tnl_enc_lim
*
)
&
skb
->
data
[
teli
];
if
(
tel
->
encap_limit
<=
1
)
{
if
(
tel
->
encap_limit
==
0
)
{
if
(
net_ratelimit
())
if
(
net_ratelimit
())
printk
(
KERN_WARNING
printk
(
KERN_WARNING
"%s: Too small encapsulation "
"%s: Too small encapsulation "
...
@@ -669,7 +669,7 @@ int ip6ip6_tnl_xmit(struct sk_buff *skb, struct net_device *dev)
...
@@ -669,7 +669,7 @@ int ip6ip6_tnl_xmit(struct sk_buff *skb, struct net_device *dev)
struct
ipv6hdr
*
ipv6h
=
skb
->
nh
.
ipv6h
;
struct
ipv6hdr
*
ipv6h
=
skb
->
nh
.
ipv6h
;
struct
ipv6_txoptions
*
orig_opt
=
NULL
;
struct
ipv6_txoptions
*
orig_opt
=
NULL
;
struct
ipv6_txoptions
*
opt
=
NULL
;
struct
ipv6_txoptions
*
opt
=
NULL
;
__u8
encap_limit
=
0
;
int
encap_limit
=
-
1
;
__u16
offset
;
__u16
offset
;
struct
flowi
fl
;
struct
flowi
fl
;
struct
ip6_flowlabel
*
fl_lbl
=
NULL
;
struct
ip6_flowlabel
*
fl_lbl
=
NULL
;
...
@@ -692,7 +692,7 @@ int ip6ip6_tnl_xmit(struct sk_buff *skb, struct net_device *dev)
...
@@ -692,7 +692,7 @@ int ip6ip6_tnl_xmit(struct sk_buff *skb, struct net_device *dev)
if
((
offset
=
parse_tlv_tnl_enc_lim
(
skb
,
skb
->
nh
.
raw
))
>
0
)
{
if
((
offset
=
parse_tlv_tnl_enc_lim
(
skb
,
skb
->
nh
.
raw
))
>
0
)
{
struct
ipv6_tlv_tnl_enc_lim
*
tel
;
struct
ipv6_tlv_tnl_enc_lim
*
tel
;
tel
=
(
struct
ipv6_tlv_tnl_enc_lim
*
)
&
skb
->
nh
.
raw
[
offset
];
tel
=
(
struct
ipv6_tlv_tnl_enc_lim
*
)
&
skb
->
nh
.
raw
[
offset
];
if
(
tel
->
encap_limit
<=
1
)
{
if
(
tel
->
encap_limit
==
0
)
{
icmpv6_send
(
skb
,
ICMPV6_PARAMPROB
,
icmpv6_send
(
skb
,
ICMPV6_PARAMPROB
,
ICMPV6_HDR_FIELD
,
offset
+
2
,
skb
->
dev
);
ICMPV6_HDR_FIELD
,
offset
+
2
,
skb
->
dev
);
goto
tx_err
;
goto
tx_err
;
...
@@ -715,7 +715,7 @@ int ip6ip6_tnl_xmit(struct sk_buff *skb, struct net_device *dev)
...
@@ -715,7 +715,7 @@ int ip6ip6_tnl_xmit(struct sk_buff *skb, struct net_device *dev)
if
(
fl_lbl
)
if
(
fl_lbl
)
orig_opt
=
fl_lbl
->
opt
;
orig_opt
=
fl_lbl
->
opt
;
}
}
if
(
encap_limit
>
0
)
{
if
(
encap_limit
>
=
0
)
{
if
(
!
(
opt
=
merge_options
(
sk
,
encap_limit
,
orig_opt
)))
{
if
(
!
(
opt
=
merge_options
(
sk
,
encap_limit
,
orig_opt
)))
{
goto
tx_err_free_fl_lbl
;
goto
tx_err_free_fl_lbl
;
}
}
...
...
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