diff mbox

libxtables: Print meaninful error message for an invalid MAC address string

Message ID 52EE90C5.3040407@chello.at
State Accepted
Headers show

Commit Message

Mart Frauenlob Feb. 2, 2014, 6:39 p.m. UTC
Hello,

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

Best regards,

Mart
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(-)

Comments

Pablo Neira Ayuso Feb. 2, 2014, 8:09 p.m. UTC | #1
On Sun, Feb 02, 2014 at 07:39:01PM +0100, Mart Frauenlob wrote:
> Hello,
> 
> on usage of a malformed MAC address the error message was not descriptive.

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/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 *) = {