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
f2fab154
Commit
f2fab154
authored
Nov 15, 2004
by
Patrick McHardy
Browse files
Options
Browse Files
Download
Plain Diff
Merge coreworks.de:/home/kaber/src/nf/nf-2.6-ip6tables
into coreworks.de:/home/kaber/src/nf/nf-2.6
parents
40128c8e
2e905ca1
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
10 deletions
+22
-10
net/ipv6/netfilter/ip6t_eui64.c
net/ipv6/netfilter/ip6t_eui64.c
+1
-1
net/ipv6/netfilter/ip6t_ipv6header.c
net/ipv6/netfilter/ip6t_ipv6header.c
+21
-9
No files found.
net/ipv6/netfilter/ip6t_eui64.c
View file @
f2fab154
...
...
@@ -69,7 +69,7 @@ ip6t_eui64_checkentry(const char *tablename,
{
if
(
hook_mask
&
~
((
1
<<
NF_IP6_PRE_ROUTING
)
|
(
1
<<
NF_IP6_LOCAL_IN
)
|
(
1
<<
NF_IP6_
PRE_ROUTING
)
))
{
(
1
<<
NF_IP6_
FORWARD
)
))
{
printk
(
"ip6t_eui64: only valid for PRE_ROUTING, LOCAL_IN or FORWARD.
\n
"
);
return
0
;
}
...
...
net/ipv6/netfilter/ip6t_ipv6header.c
View file @
f2fab154
...
...
@@ -51,7 +51,7 @@ ipv6header_match(const struct sk_buff *skb,
temp
=
0
;
while
(
ip6t_ext_hdr
(
nexthdr
))
{
struct
ipv6_opt_hdr
*
hdr
;
struct
ipv6_opt_hdr
_hdr
,
*
hp
;
int
hdrlen
;
/* Is there enough space for the next ext header? */
...
...
@@ -68,15 +68,16 @@ ipv6header_match(const struct sk_buff *skb,
break
;
}
hdr
=
(
struct
ipv6_opt_hdr
*
)
skb
->
data
+
ptr
;
hp
=
skb_header_pointer
(
skb
,
ptr
,
sizeof
(
_hdr
),
&
_hdr
);
BUG_ON
(
hp
==
NULL
);
/* Calculate the header length */
if
(
nexthdr
==
NEXTHDR_FRAGMENT
)
{
hdrlen
=
8
;
}
else
if
(
nexthdr
==
NEXTHDR_AUTH
)
hdrlen
=
(
h
dr
->
hdrlen
+
2
)
<<
2
;
hdrlen
=
(
h
p
->
hdrlen
+
2
)
<<
2
;
else
hdrlen
=
ipv6_optlen
(
h
dr
);
hdrlen
=
ipv6_optlen
(
h
p
);
/* set the flag */
switch
(
nexthdr
){
...
...
@@ -100,7 +101,7 @@ ipv6header_match(const struct sk_buff *skb,
break
;
}
nexthdr
=
h
dr
->
nexthdr
;
nexthdr
=
h
p
->
nexthdr
;
len
-=
hdrlen
;
ptr
+=
hdrlen
;
if
(
ptr
>
skb
->
len
)
...
...
@@ -111,10 +112,14 @@ ipv6header_match(const struct sk_buff *skb,
temp
|=
MASK_PROTO
;
if
(
info
->
modeflag
)
return
(
!
(
(
temp
&
info
->
matchflags
)
^
info
->
matchflags
)
^
info
->
invflags
);
return
!
((
temp
^
info
->
matchflags
^
info
->
invflags
)
&
info
->
matchflags
);
else
{
if
(
info
->
invflags
)
return
temp
!=
info
->
matchflags
;
else
return
(
!
(
temp
^
info
->
matchflags
)
^
info
->
invflags
);
return
temp
==
info
->
matchflags
;
}
}
static
int
...
...
@@ -124,11 +129,18 @@ ipv6header_checkentry(const char *tablename,
unsigned
int
matchsize
,
unsigned
int
hook_mask
)
{
const
struct
ip6t_ipv6header_info
*
info
=
matchinfo
;
/* Check for obvious errors */
/* This match is valid in all hooks! */
if
(
matchsize
!=
IP6T_ALIGN
(
sizeof
(
struct
ip6t_ipv6header_info
)))
return
0
;
/* invflags is 0 or 0xff in hard mode */
if
((
!
info
->
modeflag
)
&&
info
->
invflags
!=
0x00
&&
info
->
invflags
!=
0xFF
)
return
0
;
return
1
;
}
...
...
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