diff options
author | Yasuyuki Kozakai <yasuyuki.kozakai@toshiba.co.jp> | 2005-09-19 18:34:40 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2005-09-19 18:34:40 -0400 |
commit | e674d0f38de6109b59dbe30fba8b296a03229b8e (patch) | |
tree | 459271f7cef6319dfa7ca9ab050269c98e551994 /include | |
parent | 926b50f92a30090da2c1a8675de954c2d9b09732 (diff) |
[NETFILTER] ip6tables: remove duplicate code
Some IPv6 matches have very similar loops to find IPv6 extension header
and we can unify them. This patch introduces ipv6_find_hdr() to do it.
I just checked that it can find the target headers in the packet which has
dst,hbh,rt,frag,ah,esp headers.
Signed-off-by: Yasuyuki Kozakai <yasuyuki.kozakai@toshiba.co.jp>
Signed-off-by: Harald Welte <laforge@netfilter.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/netfilter_ipv6/ip6_tables.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/netfilter_ipv6/ip6_tables.h b/include/linux/netfilter_ipv6/ip6_tables.h index 58c72a52dc65..59f70b34e029 100644 --- a/include/linux/netfilter_ipv6/ip6_tables.h +++ b/include/linux/netfilter_ipv6/ip6_tables.h | |||
@@ -455,6 +455,9 @@ extern unsigned int ip6t_do_table(struct sk_buff **pskb, | |||
455 | 455 | ||
456 | /* Check for an extension */ | 456 | /* Check for an extension */ |
457 | extern int ip6t_ext_hdr(u8 nexthdr); | 457 | extern int ip6t_ext_hdr(u8 nexthdr); |
458 | /* find specified header and get offset to it */ | ||
459 | extern int ipv6_find_hdr(const struct sk_buff *skb, unsigned int *offset, | ||
460 | u8 target); | ||
458 | 461 | ||
459 | #define IP6T_ALIGN(s) (((s) + (__alignof__(struct ip6t_entry)-1)) & ~(__alignof__(struct ip6t_entry)-1)) | 462 | #define IP6T_ALIGN(s) (((s) + (__alignof__(struct ip6t_entry)-1)) & ~(__alignof__(struct ip6t_entry)-1)) |
460 | 463 | ||