netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Patrick McHardy <kaber@trash.net>
To: Stephen Hemminger <shemminger@osdl.org>
Cc: Thomas Graf <tgraf@suug.ch>, Linux Netdev List <netdev@vger.kernel.org>
Subject: [IPROUTE]: Fix meta ematch usage of 0 values
Date: Wed, 11 Jul 2007 14:48:12 +0200	[thread overview]
Message-ID: <4694D18C.1060400@trash.net> (raw)

[-- Attachment #1: Type: text/plain, Size: 0 bytes --]



[-- Attachment #2: x --]
[-- Type: text/plain, Size: 797 bytes --]

[IPROUTE]: Fix meta ematch usage of 0 values

em_meta doesn't send 0 values to the kernel. breaking matching on them and
resulting in "Missing value TLV" messages on dump.

Signed-off-by: Patrick McHardy <kaber@trash.net>
diff --git a/tc/em_meta.c b/tc/em_meta.c
index 5fc0c59..b727422 100644
--- a/tc/em_meta.c
+++ b/tc/em_meta.c
@@ -406,11 +406,8 @@ static int meta_parse_eopt(struct nlmsghdr *n, struct tcf_ematch_hdr *hdr,
 
 	addattr_l(n, MAX_MSG, TCA_EM_META_HDR, &meta_hdr, sizeof(meta_hdr));
 
-	if (lvalue)
-		dump_value(n, TCA_EM_META_LVALUE, lvalue, &meta_hdr.left);
-
-	if (rvalue)
-		dump_value(n, TCA_EM_META_RVALUE, rvalue, &meta_hdr.right);
+	dump_value(n, TCA_EM_META_LVALUE, lvalue, &meta_hdr.left);
+	dump_value(n, TCA_EM_META_RVALUE, rvalue, &meta_hdr.right);
 
 	return 0;
 }

                 reply	other threads:[~2007-07-11 12:48 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=4694D18C.1060400@trash.net \
    --to=kaber@trash.net \
    --cc=netdev@vger.kernel.org \
    --cc=shemminger@osdl.org \
    --cc=tgraf@suug.ch \
    /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).