Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 34534
b: refs/heads/master
c: 5fa2a76
h: refs/heads/master
v: v3
  • Loading branch information
Patrick McHardy authored and David S. Miller committed Sep 22, 2006
1 parent 399f95b commit 3bee1ff
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 245 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 91270cf81765152f6e77953440beb4d3b34a71b5
refs/heads/master: 5fa2a7601f994bdd034e871b7ea1abd6969fbb6c
2 changes: 1 addition & 1 deletion trunk/net/ipv6/netfilter/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# Link order matters here.
obj-$(CONFIG_IP6_NF_IPTABLES) += ip6_tables.o
obj-$(CONFIG_IP6_NF_MATCH_RT) += ip6t_rt.o
obj-$(CONFIG_IP6_NF_MATCH_OPTS) += ip6t_hbh.o ip6t_dst.o
obj-$(CONFIG_IP6_NF_MATCH_OPTS) += ip6t_hbh.o
obj-$(CONFIG_IP6_NF_MATCH_IPV6HEADER) += ip6t_ipv6header.o
obj-$(CONFIG_IP6_NF_MATCH_FRAG) += ip6t_frag.o
obj-$(CONFIG_IP6_NF_MATCH_AH) += ip6t_ah.o
Expand Down
219 changes: 0 additions & 219 deletions trunk/net/ipv6/netfilter/ip6t_dst.c

This file was deleted.

48 changes: 24 additions & 24 deletions trunk/net/ipv6/netfilter/ip6t_hbh.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,10 @@
#include <linux/netfilter_ipv6/ip6_tables.h>
#include <linux/netfilter_ipv6/ip6t_opts.h>

#define HOPBYHOP 1

MODULE_LICENSE("GPL");
#if HOPBYHOP
MODULE_DESCRIPTION("IPv6 HbH match");
#else
MODULE_DESCRIPTION("IPv6 DST match");
#endif
MODULE_DESCRIPTION("IPv6 opts match");
MODULE_AUTHOR("Andras Kis-Szabo <kisza@sch.bme.hu>");
MODULE_ALIAS("ip6t_dst");

#if 0
#define DEBUGP printk
Expand Down Expand Up @@ -71,11 +66,7 @@ match(const struct sk_buff *skb,
u8 _optlen, *lp = NULL;
unsigned int optlen;

#if HOPBYHOP
if (ipv6_find_hdr(skb, &ptr, NEXTHDR_HOP, NULL) < 0)
#else
if (ipv6_find_hdr(skb, &ptr, NEXTHDR_DEST, NULL) < 0)
#endif
if (ipv6_find_hdr(skb, &ptr, match->data, NULL) < 0)
return 0;

oh = skb_header_pointer(skb, ptr, sizeof(_optsh), &_optsh);
Expand Down Expand Up @@ -193,26 +184,35 @@ checkentry(const char *tablename,
return 1;
}

static struct ip6t_match opts_match = {
#if HOPBYHOP
.name = "hbh",
#else
.name = "dst",
#endif
.match = match,
.matchsize = sizeof(struct ip6t_opts),
.checkentry = checkentry,
.me = THIS_MODULE,
static struct xt_match opts_match[] = {
{
.name = "hbh",
.family = AF_INET6,
.match = match,
.matchsize = sizeof(struct ip6t_opts),
.checkentry = checkentry,
.me = THIS_MODULE,
.data = NEXTHDR_HOP,
},
{
.name = "dst",
.family = AF_INET6,
.match = match,
.matchsize = sizeof(struct ip6t_opts),
.checkentry = checkentry,
.me = THIS_MODULE,
.data = NEXTHDR_DEST,
},
};

static int __init ip6t_hbh_init(void)
{
return ip6t_register_match(&opts_match);
return xt_register_matches(opts_match, ARRAY_SIZE(opts_match));
}

static void __exit ip6t_hbh_fini(void)
{
ip6t_unregister_match(&opts_match);
xt_unregister_matches(opts_match, ARRAY_SIZE(opts_match));
}

module_init(ip6t_hbh_init);
Expand Down

0 comments on commit 3bee1ff

Please sign in to comment.