summaryrefslogtreecommitdiffstats
path: root/libipq/libipq.c
diff options
context:
space:
mode:
authorJan Engelhardt <jengelh@medozas.de>2008-11-18 12:27:54 +0100
committerPatrick McHardy <kaber@trash.net>2008-11-18 12:27:54 +0100
commit03d99486d8283552705b58dc55b6085dffc38792 (patch)
tree98a383ac7e646d596ba872a443dc96da4b60cb04 /libipq/libipq.c
parentc354105d3578e3dd1ec825a57005fe60c095f7cb (diff)
src: use NFPROTO_ constants
Resync netfilter.h from the latest kernel and make use of the new NFPROTO_ constants that have been introduced. Signed-off-by: Jan Engelhardt <jengelh@medozas.de> Signed-off-by: Patrick McHardy <kaber@trash.net>
Diffstat (limited to 'libipq/libipq.c')
-rw-r--r--libipq/libipq.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libipq/libipq.c b/libipq/libipq.c
index 658af975..495fce16 100644
--- a/libipq/libipq.c
+++ b/libipq/libipq.c
@@ -217,9 +217,9 @@ struct ipq_handle *ipq_create_handle(u_int32_t flags, u_int32_t protocol)
memset(h, 0, sizeof(struct ipq_handle));
- if (protocol == PF_INET)
+ if (protocol == NFPROTO_IPV4)
h->fd = socket(PF_NETLINK, SOCK_RAW, NETLINK_FIREWALL);
- else if (protocol == PF_INET6)
+ else if (protocol == NFPROTO_IPV6)
h->fd = socket(PF_NETLINK, SOCK_RAW, NETLINK_IP6_FW);
else {
ipq_errno = IPQ_ERR_PROTOCOL;