From: Pablo Neira Ayuso <pablo@netfilter.org>
To: netfilter-devel@vger.kernel.org
Cc: pwouters@redhat.com, fweimer@redhat.com
Subject: [PATCH conntrackd 8/8] conntrackd: missing break in expectation message parser function
Date: Tue, 18 Aug 2015 19:28:39 +0200 [thread overview]
Message-ID: <1439918919-6937-9-git-send-email-pablo@netfilter.org> (raw)
In-Reply-To: <1439918919-6937-1-git-send-email-pablo@netfilter.org>
Fortunately, the TLVs come in order in the message, however, if the order is
changed we'll incorrectly set up the expectation.
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
---
src/parse.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/parse.c b/src/parse.c
index 3ac4092..919d36c 100644
--- a/src/parse.c
+++ b/src/parse.c
@@ -524,13 +524,15 @@ int msg2exp(struct nf_expect *exp, struct nethdr *net, size_t remain)
attr = NTA_NEXT(attr, len);
continue;
}
- switch(exp_h[attr->nta_attr].exp_attr) {
+ switch (exp_h[attr->nta_attr].exp_attr) {
case ATTR_EXP_MASTER:
exp_h[attr->nta_attr].parse(master, attr->nta_attr,
NTA_DATA(attr));
+ break;
case ATTR_EXP_EXPECTED:
exp_h[attr->nta_attr].parse(expected, attr->nta_attr,
NTA_DATA(attr));
+ break;
case ATTR_EXP_MASK:
exp_h[attr->nta_attr].parse(mask, attr->nta_attr,
NTA_DATA(attr));
--
1.7.10.4
prev parent reply other threads:[~2015-08-18 17:22 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-18 17:28 [PATCH conntrackd 0/8] unsorted fixes Pablo Neira Ayuso
2015-08-18 17:28 ` [PATCH conntrackd 1/8] conntrackd: fix sanitization of expection attribute in the wire format Pablo Neira Ayuso
2015-08-18 17:28 ` [PATCH conntrackd 2/8] conntrackd: NTA_MAX is also an invalid attribute Pablo Neira Ayuso
2015-08-18 17:28 ` [PATCH conntrackd 3/8] conntrackd: fix leak in fork_process_new() Pablo Neira Ayuso
2015-08-18 17:28 ` [PATCH conntrackd 4/8] conntrackd: fix descriptor leak in do_local_request() Pablo Neira Ayuso
2015-08-18 17:28 ` [PATCH conntrackd 5/8] conntrackd: fix error handling in nfq_queue_cb() Pablo Neira Ayuso
2015-08-18 17:28 ` [PATCH conntrackd 6/8] conntrackd: simplify branch in tcp_accept() Pablo Neira Ayuso
2015-08-18 17:28 ` [PATCH conntrackd 7/8] conntrackd: use strncpy to set up the cache name Pablo Neira Ayuso
2015-08-18 17:28 ` Pablo Neira Ayuso [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1439918919-6937-9-git-send-email-pablo@netfilter.org \
--to=pablo@netfilter.org \
--cc=fweimer@redhat.com \
--cc=netfilter-devel@vger.kernel.org \
--cc=pwouters@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).