Skip to contentSkip to conversation

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

PATCH Applied Mart Frauenlob 2 participants 2 messages Feb 2, 2014 netfilter

lore
Share & tools
lore
#0 lore raw

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

Hello,

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

Best regards,

Mart

Quoted 1 line

From e2b3628a66db473d230e83a6eb98389849e20de1 Mon Sep 17 00:00:00 2001

From: Mart Frauenlob <[email protected]>
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.

---
 libxtables/xtoptions.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
libxtables/xtoptions.c +1 -1
index 78e9abd..9b4c5aa 100644
@@ -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 *) = {
Signature · 1 line
1.7.2.5
maintainer Applied
#1 lore raw
Quoted 3 lines · Mart Frauenlob

Hello,

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

Applied, thanks.