summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author/C=DE/ST=Berlin/L=Berlin/O=Netfilter Project/OU=Development/CN=laforge/emailAddress=laforge@netfilter.org </C=DE/ST=Berlin/L=Berlin/O=Netfilter Project/OU=Development/CN=laforge/emailAddress=laforge@netfilter.org>2005-10-09 16:37:12 +0000
committer/C=DE/ST=Berlin/L=Berlin/O=Netfilter Project/OU=Development/CN=laforge/emailAddress=laforge@netfilter.org </C=DE/ST=Berlin/L=Berlin/O=Netfilter Project/OU=Development/CN=laforge/emailAddress=laforge@netfilter.org>2005-10-09 16:37:12 +0000
commit67aa2dd95dceb53bec834bf04824531fdec9aa4b (patch)
treeb2d84333b6264077218f7d3fee49a7aa284b3458
parentfcf38d20ea98d9e9ec033ad7617d755ecdab0275 (diff)
downloadlibnfnetlink-67aa2dd95dceb53bec834bf04824531fdec9aa4b.tar.gz
use NFA_TYPE() to use indication of nested/not-nested TLV
-rw-r--r--src/libnfnetlink.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/libnfnetlink.c b/src/libnfnetlink.c
index f3affe1..53f0bcc 100644
--- a/src/libnfnetlink.c
+++ b/src/libnfnetlink.c
@@ -50,7 +50,7 @@ void nfnl_dump_packet(struct nlmsghdr *nlh, int received_len, char *desc)
while (NFA_OK(nfa, len)) {
printf(" nfa@%p: nfa_type=%u, nfa_len=%u\n",
- nfa, nfa->nfa_type, nfa->nfa_len);
+ nfa, NFA_TYPE(nfa), nfa->nfa_len);
nfa = NFA_NEXT(nfa,len);
}
}
@@ -584,8 +584,8 @@ int nfnl_parse_attr(struct nfattr *tb[], int max, struct nfattr *nfa, int len)
memset(tb, 0, sizeof(struct nfattr *) * max);
while (NFA_OK(nfa, len)) {
- if (nfa->nfa_type <= max)
- tb[nfa->nfa_type-1] = nfa;
+ if (NFA_TYPE(nfa) <= max)
+ tb[NFA_TYPE(nfa)-1] = nfa;
nfa = NFA_NEXT(nfa,len);
}
if (len)
@@ -732,7 +732,7 @@ int nfnl_check_attributes(const struct nfnl_handle *h,
int attrlen = nlh->nlmsg_len - NLMSG_ALIGN(min_len);
while (NFA_OK(attr, attrlen)) {
- unsigned int flavor = attr->nfa_type;
+ unsigned int flavor = NFA_TYPE(attr);
if (flavor) {
if (flavor > cb->attr_count)
return -EINVAL;