aboutsummaryrefslogtreecommitdiffstats
path: root/net/netfilter/xt_pkttype.c
diff options
context:
space:
mode:
authorJan Engelhardt <jengelh@medozas.de>2008-10-08 11:35:01 +0200
committerPatrick McHardy <kaber@trash.net>2008-10-08 11:35:01 +0200
commitee999d8b9573df1b547aacdc6d79f86eb79c25cd (patch)
tree83585a40918ad1ebad17f4a0cfbf5486c02c64d7 /net/netfilter/xt_pkttype.c
parentnetfilter: Introduce NFPROTO_* constants (diff)
downloadlinux-dev-ee999d8b9573df1b547aacdc6d79f86eb79c25cd.tar.xz
linux-dev-ee999d8b9573df1b547aacdc6d79f86eb79c25cd.zip
netfilter: x_tables: use NFPROTO_* in extensions
Signed-off-by: Jan Engelhardt <jengelh@medozas.de> Signed-off-by: Patrick McHardy <kaber@trash.net>
Diffstat (limited to 'net/netfilter/xt_pkttype.c')
-rw-r--r--net/netfilter/xt_pkttype.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/net/netfilter/xt_pkttype.c b/net/netfilter/xt_pkttype.c
index 7936f7e23254..81e86d319a8f 100644
--- a/net/netfilter/xt_pkttype.c
+++ b/net/netfilter/xt_pkttype.c
@@ -33,10 +33,10 @@ pkttype_mt(const struct sk_buff *skb, const struct net_device *in,
if (skb->pkt_type != PACKET_LOOPBACK)
type = skb->pkt_type;
- else if (match->family == AF_INET &&
+ else if (match->family == NFPROTO_IPV4 &&
ipv4_is_multicast(ip_hdr(skb)->daddr))
type = PACKET_MULTICAST;
- else if (match->family == AF_INET6 &&
+ else if (match->family == NFPROTO_IPV6 &&
ipv6_hdr(skb)->daddr.s6_addr[0] == 0xFF)
type = PACKET_MULTICAST;
else
@@ -48,14 +48,14 @@ pkttype_mt(const struct sk_buff *skb, const struct net_device *in,
static struct xt_match pkttype_mt_reg[] __read_mostly = {
{
.name = "pkttype",
- .family = AF_INET,
+ .family = NFPROTO_IPV4,
.match = pkttype_mt,
.matchsize = sizeof(struct xt_pkttype_info),
.me = THIS_MODULE,
},
{
.name = "pkttype",
- .family = AF_INET6,
+ .family = NFPROTO_IPV6,
.match = pkttype_mt,
.matchsize = sizeof(struct xt_pkttype_info),
.me = THIS_MODULE,