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
486874ac
Commit
486874ac
authored
Mar 19, 2003
by
Adrian Bunk
Committed by
David S. Miller
Mar 19, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[NF/IPV6]: Remove all ipv6_ext_hdrs from ip6tables.
parent
d21c8bd3
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
10 additions
and
84 deletions
+10
-84
include/linux/netfilter_ipv6/ip6_tables.h
include/linux/netfilter_ipv6/ip6_tables.h
+3
-0
net/ipv6/netfilter/ip6t_ah.c
net/ipv6/netfilter/ip6t_ah.c
+1
-12
net/ipv6/netfilter/ip6t_dst.c
net/ipv6/netfilter/ip6t_dst.c
+1
-12
net/ipv6/netfilter/ip6t_esp.c
net/ipv6/netfilter/ip6t_esp.c
+1
-12
net/ipv6/netfilter/ip6t_frag.c
net/ipv6/netfilter/ip6t_frag.c
+1
-12
net/ipv6/netfilter/ip6t_hbh.c
net/ipv6/netfilter/ip6t_hbh.c
+1
-12
net/ipv6/netfilter/ip6t_ipv6header.c
net/ipv6/netfilter/ip6t_ipv6header.c
+1
-12
net/ipv6/netfilter/ip6t_rt.c
net/ipv6/netfilter/ip6t_rt.c
+1
-12
No files found.
include/linux/netfilter_ipv6/ip6_tables.h
View file @
486874ac
...
...
@@ -449,6 +449,9 @@ extern unsigned int ip6t_do_table(struct sk_buff **pskb,
struct
ip6t_table
*
table
,
void
*
userdata
);
/* Check for an extension */
extern
int
ip6t_ext_hdr
(
u8
nexthdr
);
#define IP6T_ALIGN(s) (((s) + (__alignof__(struct ip6t_entry)-1)) & ~(__alignof__(struct ip6t_entry)-1))
#endif
/*__KERNEL__*/
...
...
net/ipv6/netfilter/ip6t_ah.c
View file @
486874ac
...
...
@@ -26,17 +26,6 @@ struct ahhdr {
__u32
spi
;
};
int
ipv6_ext_hdr
(
u8
nexthdr
)
{
return
(
(
nexthdr
==
NEXTHDR_HOP
)
||
(
nexthdr
==
NEXTHDR_ROUTING
)
||
(
nexthdr
==
NEXTHDR_FRAGMENT
)
||
(
nexthdr
==
NEXTHDR_AUTH
)
||
(
nexthdr
==
NEXTHDR_ESP
)
||
(
nexthdr
==
NEXTHDR_NONE
)
||
(
nexthdr
==
NEXTHDR_DEST
)
);
}
/* Returns 1 if the spi is matched by the range, 0 otherwise */
static
inline
int
spi_match
(
u_int32_t
min
,
u_int32_t
max
,
u_int32_t
spi
,
int
invert
)
...
...
@@ -79,7 +68,7 @@ match(const struct sk_buff *skb,
len
=
skb
->
len
-
ptr
;
temp
=
0
;
while
(
ip
v6
_ext_hdr
(
nexthdr
))
{
while
(
ip
6t
_ext_hdr
(
nexthdr
))
{
struct
ipv6_opt_hdr
*
hdr
;
DEBUGP
(
"ipv6_ah header iteration
\n
"
);
...
...
net/ipv6/netfilter/ip6t_dst.c
View file @
486874ac
...
...
@@ -29,17 +29,6 @@ MODULE_AUTHOR("Andras Kis-Szabo <kisza@sch.bme.hu>");
#define DEBUGP(format, args...)
#endif
int
ipv6_ext_hdr
(
u8
nexthdr
)
{
return
(
(
nexthdr
==
NEXTHDR_HOP
)
||
(
nexthdr
==
NEXTHDR_ROUTING
)
||
(
nexthdr
==
NEXTHDR_FRAGMENT
)
||
(
nexthdr
==
NEXTHDR_AUTH
)
||
(
nexthdr
==
NEXTHDR_ESP
)
||
(
nexthdr
==
NEXTHDR_NONE
)
||
(
nexthdr
==
NEXTHDR_DEST
)
);
}
/*
* (Type & 0xC0) >> 6
* 0 -> ignorable
...
...
@@ -84,7 +73,7 @@ match(const struct sk_buff *skb,
len
=
skb
->
len
-
ptr
;
temp
=
0
;
while
(
ip
v6
_ext_hdr
(
nexthdr
))
{
while
(
ip
6t
_ext_hdr
(
nexthdr
))
{
struct
ipv6_opt_hdr
*
hdr
;
DEBUGP
(
"ipv6_opts header iteration
\n
"
);
...
...
net/ipv6/netfilter/ip6t_esp.c
View file @
486874ac
...
...
@@ -23,17 +23,6 @@ struct esphdr {
__u32
spi
;
};
int
ipv6_ext_hdr
(
u8
nexthdr
)
{
return
(
(
nexthdr
==
NEXTHDR_HOP
)
||
(
nexthdr
==
NEXTHDR_ROUTING
)
||
(
nexthdr
==
NEXTHDR_FRAGMENT
)
||
(
nexthdr
==
NEXTHDR_AUTH
)
||
(
nexthdr
==
NEXTHDR_ESP
)
||
(
nexthdr
==
NEXTHDR_NONE
)
||
(
nexthdr
==
NEXTHDR_DEST
)
);
}
/* Returns 1 if the spi is matched by the range, 0 otherwise */
static
inline
int
spi_match
(
u_int32_t
min
,
u_int32_t
max
,
u_int32_t
spi
,
int
invert
)
...
...
@@ -74,7 +63,7 @@ match(const struct sk_buff *skb,
len
=
skb
->
len
-
ptr
;
temp
=
0
;
while
(
ip
v6
_ext_hdr
(
nexthdr
))
{
while
(
ip
6t
_ext_hdr
(
nexthdr
))
{
struct
ipv6_opt_hdr
*
hdr
;
int
hdrlen
;
...
...
net/ipv6/netfilter/ip6t_frag.c
View file @
486874ac
...
...
@@ -44,17 +44,6 @@ struct fraghdr {
__u32
id
;
};
int
ipv6_ext_hdr
(
u8
nexthdr
)
{
return
(
(
nexthdr
==
NEXTHDR_HOP
)
||
(
nexthdr
==
NEXTHDR_ROUTING
)
||
(
nexthdr
==
NEXTHDR_FRAGMENT
)
||
(
nexthdr
==
NEXTHDR_AUTH
)
||
(
nexthdr
==
NEXTHDR_ESP
)
||
(
nexthdr
==
NEXTHDR_NONE
)
||
(
nexthdr
==
NEXTHDR_DEST
)
);
}
/* Returns 1 if the id is matched by the range, 0 otherwise */
static
inline
int
id_match
(
u_int32_t
min
,
u_int32_t
max
,
u_int32_t
id
,
int
invert
)
...
...
@@ -93,7 +82,7 @@ match(const struct sk_buff *skb,
len
=
skb
->
len
-
ptr
;
temp
=
0
;
while
(
ip
v6
_ext_hdr
(
nexthdr
))
{
while
(
ip
6t
_ext_hdr
(
nexthdr
))
{
struct
ipv6_opt_hdr
*
hdr
;
DEBUGP
(
"ipv6_frag header iteration
\n
"
);
...
...
net/ipv6/netfilter/ip6t_hbh.c
View file @
486874ac
...
...
@@ -29,17 +29,6 @@ MODULE_AUTHOR("Andras Kis-Szabo <kisza@sch.bme.hu>");
#define DEBUGP(format, args...)
#endif
int
ipv6_ext_hdr
(
u8
nexthdr
)
{
return
(
(
nexthdr
==
NEXTHDR_HOP
)
||
(
nexthdr
==
NEXTHDR_ROUTING
)
||
(
nexthdr
==
NEXTHDR_FRAGMENT
)
||
(
nexthdr
==
NEXTHDR_AUTH
)
||
(
nexthdr
==
NEXTHDR_ESP
)
||
(
nexthdr
==
NEXTHDR_NONE
)
||
(
nexthdr
==
NEXTHDR_DEST
)
);
}
/*
* (Type & 0xC0) >> 6
* 0 -> ignorable
...
...
@@ -84,7 +73,7 @@ match(const struct sk_buff *skb,
len
=
skb
->
len
-
ptr
;
temp
=
0
;
while
(
ip
v6
_ext_hdr
(
nexthdr
))
{
while
(
ip
6t
_ext_hdr
(
nexthdr
))
{
struct
ipv6_opt_hdr
*
hdr
;
DEBUGP
(
"ipv6_opts header iteration
\n
"
);
...
...
net/ipv6/netfilter/ip6t_ipv6header.c
View file @
486874ac
...
...
@@ -24,17 +24,6 @@ MODULE_AUTHOR("Andras Kis-Szabo <kisza@sch.bme.hu>");
#define DEBUGP(format, args...)
#endif
int
ipv6_ext_hdr
(
u8
nexthdr
)
{
return
(
(
nexthdr
==
NEXTHDR_HOP
)
||
(
nexthdr
==
NEXTHDR_ROUTING
)
||
(
nexthdr
==
NEXTHDR_FRAGMENT
)
||
(
nexthdr
==
NEXTHDR_AUTH
)
||
(
nexthdr
==
NEXTHDR_ESP
)
||
(
nexthdr
==
NEXTHDR_NONE
)
||
(
nexthdr
==
NEXTHDR_DEST
)
);
}
static
int
ipv6header_match
(
const
struct
sk_buff
*
skb
,
const
struct
net_device
*
in
,
...
...
@@ -95,7 +84,7 @@ ipv6header_match(const struct sk_buff *skb,
temp
=
0
;
while
(
ip
v6
_ext_hdr
(
nexthdr
))
{
while
(
ip
6t
_ext_hdr
(
nexthdr
))
{
struct
ipv6_opt_hdr
*
hdr
;
int
hdrlen
;
...
...
net/ipv6/netfilter/ip6t_rt.c
View file @
486874ac
...
...
@@ -21,17 +21,6 @@ MODULE_AUTHOR("Andras Kis-Szabo <kisza@sch.bme.hu>");
#define DEBUGP(format, args...)
#endif
int
ipv6_ext_hdr
(
u8
nexthdr
)
{
return
(
(
nexthdr
==
NEXTHDR_HOP
)
||
(
nexthdr
==
NEXTHDR_ROUTING
)
||
(
nexthdr
==
NEXTHDR_FRAGMENT
)
||
(
nexthdr
==
NEXTHDR_AUTH
)
||
(
nexthdr
==
NEXTHDR_ESP
)
||
(
nexthdr
==
NEXTHDR_NONE
)
||
(
nexthdr
==
NEXTHDR_DEST
)
);
}
/* Returns 1 if the id is matched by the range, 0 otherwise */
static
inline
int
segsleft_match
(
u_int32_t
min
,
u_int32_t
max
,
u_int32_t
id
,
int
invert
)
...
...
@@ -71,7 +60,7 @@ match(const struct sk_buff *skb,
len
=
skb
->
len
-
ptr
;
temp
=
0
;
while
(
ip
v6
_ext_hdr
(
nexthdr
))
{
while
(
ip
6t
_ext_hdr
(
nexthdr
))
{
struct
ipv6_opt_hdr
*
hdr
;
DEBUGP
(
"ipv6_rt header iteration
\n
"
);
...
...
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