summaryrefslogtreecommitdiffstats
path: root/extensions/libxt_connlimit.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 /extensions/libxt_connlimit.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 'extensions/libxt_connlimit.c')
-rw-r--r--extensions/libxt_connlimit.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/extensions/libxt_connlimit.c b/extensions/libxt_connlimit.c
index 7a2fb452..65de1936 100644
--- a/extensions/libxt_connlimit.c
+++ b/extensions/libxt_connlimit.c
@@ -74,7 +74,7 @@ static int connlimit_parse(int c, char **argv, int invert, unsigned int *flags,
*flags |= 0x2;
i = strtoul(argv[optind-1], &err, 0);
- if (family == AF_INET6) {
+ if (family == NFPROTO_IPV6) {
if (i > 128 || *err != '\0')
exit_error(PARAMETER_PROBLEM,
"--connlimit-mask must be between "
@@ -103,7 +103,7 @@ static int connlimit_parse4(int c, char **argv, int invert,
struct xt_entry_match **match)
{
return connlimit_parse(c, argv, invert, flags,
- (void *)(*match)->data, AF_INET);
+ (void *)(*match)->data, NFPROTO_IPV4);
}
static int connlimit_parse6(int c, char **argv, int invert,
@@ -111,7 +111,7 @@ static int connlimit_parse6(int c, char **argv, int invert,
struct xt_entry_match **match)
{
return connlimit_parse(c, argv, invert, flags,
- (void *)(*match)->data, AF_INET6);
+ (void *)(*match)->data, NFPROTO_IPV6);
}
static void connlimit_check(unsigned int flags)
@@ -179,7 +179,7 @@ static void connlimit_save6(const void *ip, const struct xt_entry_match *match)
static struct xtables_match connlimit_match = {
.name = "connlimit",
- .family = AF_INET,
+ .family = NFPROTO_IPV4,
.version = XTABLES_VERSION,
.size = XT_ALIGN(sizeof(struct xt_connlimit_info)),
.userspacesize = offsetof(struct xt_connlimit_info, data),
@@ -194,7 +194,7 @@ static struct xtables_match connlimit_match = {
static struct xtables_match connlimit_match6 = {
.name = "connlimit",
- .family = AF_INET6,
+ .family = NFPROTO_IPV6,
.version = XTABLES_VERSION,
.size = XT_ALIGN(sizeof(struct xt_connlimit_info)),
.userspacesize = offsetof(struct xt_connlimit_info, data),