diff mbox

[nft] payload: reorder case in a switch for consistency

Message ID 1435312521-8184-1-git-send-email-eric@regit.org
State Accepted
Delegated to: Pablo Neira
Headers show

Commit Message

Eric Leblond June 26, 2015, 9:55 a.m. UTC
As pointed out by Patrick McHardy the order in the inet switch
in payload_gen_dependency was not consistent.

Signed-off-by: Eric Leblond <eric@regit.org>
---
 src/payload.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Comments

Pablo Neira Ayuso June 30, 2015, 12:03 a.m. UTC | #1
On Fri, Jun 26, 2015 at 11:55:21AM +0200, Eric Leblond wrote:
> As pointed out by Patrick McHardy the order in the inet switch
> in payload_gen_dependency was not consistent.

Applied, thanks.

--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/src/payload.c b/src/payload.c
index e67ef17..5f8c4fe 100644
--- a/src/payload.c
+++ b/src/payload.c
@@ -204,12 +204,12 @@  int payload_gen_dependency(struct eval_ctx *ctx, const struct expr *expr,
 		switch (ctx->pctx.family) {
 		case NFPROTO_INET:
 			switch (expr->payload.base) {
-			case PROTO_BASE_TRANSPORT_HDR:
-				desc = &proto_inet_service;
-				break;
 			case PROTO_BASE_LL_HDR:
 				desc = &proto_inet;
 				break;
+			case PROTO_BASE_TRANSPORT_HDR:
+				desc = &proto_inet_service;
+				break;
 			default:
 				break;
 			}