summaryrefslogtreecommitdiffstats
path: root/src/libnfnetlink.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libnfnetlink.c')
-rw-r--r--src/libnfnetlink.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/libnfnetlink.c b/src/libnfnetlink.c
index 756893b..def45fb 100644
--- a/src/libnfnetlink.c
+++ b/src/libnfnetlink.c
@@ -725,6 +725,10 @@ int nfnl_parse_attr(struct nfattr *tb[], int max, struct nfattr *nfa, int len)
void nfnl_build_nfa_iovec(struct iovec *iov, struct nfattr *nfa,
u_int16_t type, u_int32_t len, unsigned char *val)
{
+ /* Set the attribut values */
+ nfa->nfa_len = sizeof(struct nfattr) + len;
+ nfa->nfa_type = type;
+
iov[0].iov_base = nfa;
iov[0].iov_len = sizeof(*nfa);
iov[1].iov_base = val;