All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mart Frauenlob <mart.frauenlob@chello.at>
To: netfilter-devel@vger.kernel.org
Subject: [PATCH] libxtables: Print meaninful error message for an invalid MAC address string
Date: Sun, 02 Feb 2014 19:39:01 +0100	[thread overview]
Message-ID: <52EE90C5.3040407@chello.at> (raw)

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

Hello,

on usage of a malformed MAC address the error message was not descriptive.

Best regards,

Mart

[-- Attachment #2: libxtables-Print-meaningful-error-message-for-an-invalid.patch --]
[-- Type: text/plain, Size: 1016 bytes --]

>From e2b3628a66db473d230e83a6eb98389849e20de1 Mon Sep 17 00:00:00 2001
From: Mart Frauenlob <mart.frauenlob@chello.at>
Date: Sun, 2 Feb 2014 14:24:25 +0100
Subject: [PATCH] libxtables: Print meaningful error message for an invalid MAC address string

If an invalid MAC address is used on the commmand line, the error message
`ether' was not really describing the problem.

Signed-off-by: Mart Frauenlob <mart.frauenlob@chello.at>
---
 libxtables/xtoptions.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/libxtables/xtoptions.c b/libxtables/xtoptions.c
index 78e9abd..9b4c5aa 100644
--- a/libxtables/xtoptions.c
+++ b/libxtables/xtoptions.c
@@ -802,7 +802,7 @@ static void xtopt_parse_ethermac(struct xt_option_call *cb)
 		       sizeof(cb->val.ethermac));
 	return;
  out:
-	xt_params->exit_err(PARAMETER_PROBLEM, "ether");
+	xt_params->exit_err(PARAMETER_PROBLEM, "Invalid MAC address specified.");
 }
 
 static void (*const xtopt_subparse[])(struct xt_option_call *) = {
-- 
1.7.2.5


             reply	other threads:[~2014-02-02 18:38 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-02 18:39 Mart Frauenlob [this message]
2014-02-02 20:09 ` [PATCH] libxtables: Print meaninful error message for an invalid MAC address string Pablo Neira Ayuso

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=52EE90C5.3040407@chello.at \
    --to=mart.frauenlob@chello.at \
    --cc=netfilter-devel@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.