summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorThomas Graf <tgraf@suug.ch>2013-01-31 09:47:58 (GMT)
committerThomas Graf <tgraf@suug.ch>2013-01-31 09:47:58 (GMT)
commit73cb5f57bab8e0cbe5958ffc03dd126f14e07bf6 (patch)
tree8ec711fcb4d0ff75a5d89608922f54f4ecbc2503 /lib
parentb06c23a9dd6e93fc7325421897dbaa81af7a9e8c (diff)
parent4f088d38aecd86f5377287f8a0ad8534fe441ad9 (diff)
downloadlibnl-73cb5f57bab8e0cbe5958ffc03dd126f14e07bf6.zip
libnl-73cb5f57bab8e0cbe5958ffc03dd126f14e07bf6.tar.gz
libnl-73cb5f57bab8e0cbe5958ffc03dd126f14e07bf6.tar.bz2
Merge branch 'nattuple' of https://github.com/rmfought/libnl
Diffstat (limited to 'lib')
-rw-r--r--lib/netfilter/exp.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/netfilter/exp.c b/lib/netfilter/exp.c
index a348f99..86ed8d1 100644
--- a/lib/netfilter/exp.c
+++ b/lib/netfilter/exp.c
@@ -351,7 +351,11 @@ static int nfnl_exp_build_tuple(struct nl_msg *msg, const struct nfnl_exp *exp,
int type = exp_get_tuple_attr(cta);
- tuple = nla_nest_start(msg, cta);
+ if (cta == CTA_EXPECT_NAT)
+ tuple = nla_nest_start(msg, CTA_EXPECT_NAT_TUPLE);
+ else
+ tuple = nla_nest_start(msg, cta);
+
if (!tuple)
goto nla_put_failure;
@@ -420,7 +424,7 @@ static int nfnl_exp_build_nat(struct nl_msg *msg, const struct nfnl_exp *exp)
nfnl_exp_get_nat_dir(exp));
}
- if ((err = nfnl_exp_build_tuple(msg, exp, CTA_EXPECT_NAT_TUPLE)) < 0)
+ if ((err = nfnl_exp_build_tuple(msg, exp, CTA_EXPECT_NAT)) < 0)
goto nla_put_failure;
nla_nest_end(msg, nat);