netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Patrick McHardy <kaber@trash.net>
To: Denys <denys@visp.net.lb>
Cc: Stephen Hemminger <shemminger@linux-foundation.org>,
	netdev@vger.kernel.org
Subject: Re: more iproute2 issues (not critical)
Date: Sat, 31 Mar 2007 16:16:56 +0200	[thread overview]
Message-ID: <460E6D58.8090701@trash.net> (raw)
In-Reply-To: <20070331023011.M8101@visp.net.lb>

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

Denys wrote:
> Ooops, sorry, it seems my fault, no library exist on this system.
> But i guess it must not coredump in this case? Is it possible to check if 
> library not exist and just print some nice message?
> It is trivial i guess.


The problem is that lib_dir is NULL when calling get_target_names.
This patch fixes it.


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

[IPROUTE]: m_ipt: fix crash when dumping rules

lib_dir is NULL when calling get_target_name, causing a NULL pointer
dereference in the strlen call.

Signed-off-by: Patrick McHardy <kaber@trash.net>

---
commit 5093ef7504b7f3d76ec421c5193d11d0e9791a8d
tree 4dfa97ecd6aa01f33334f605f152a0d7da2ccde9
parent ab4c2f14fb93700c9aefeb02ed9918565ba332a1
author Patrick McHardy <kaber@trash.net> Sat, 31 Mar 2007 16:14:38 +0200
committer Patrick McHardy <kaber@trash.net> Sat, 31 Mar 2007 16:14:38 +0200

 tc/m_ipt.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/tc/m_ipt.c b/tc/m_ipt.c
index 38d2311..76fa768 100644
--- a/tc/m_ipt.c
+++ b/tc/m_ipt.c
@@ -506,6 +506,10 @@ print_ipt(struct action_util *au,FILE * f, struct rtattr *arg)
 	if (arg == NULL)
 		return -1;
 
+	lib_dir = getenv("IPTABLES_LIB_DIR");
+	if (!lib_dir)
+		lib_dir = IPT_LIB_DIR;
+
 	parse_rtattr_nested(tb, TCA_IPT_MAX, arg);
 
 	if (tb[TCA_IPT_TABLE] == NULL) {

  reply	other threads:[~2007-03-31 14:17 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-21 18:00 iproute2-2.6.20-070313 bug ? Denys
2007-03-22 11:23 ` Patrick McHardy
2007-03-22 12:46   ` Denys
2007-03-22 13:09     ` Patrick McHardy
     [not found]       ` <20070322131245.M85528@visp.net.lb>
2007-03-22 13:23         ` Patrick McHardy
2007-03-22 13:35           ` Denys
     [not found]           ` <20070322132637.M88445@visp.net.lb>
2007-03-22 13:43             ` Patrick McHardy
2007-03-22 13:47               ` Denys
2007-03-22 13:26       ` Denys
2007-03-22 17:12       ` Stephen Hemminger
2007-03-22 17:14         ` Patrick McHardy
2007-03-26 18:49           ` more... iproute2/htb/whatever critical " Denys
2007-03-27 15:10             ` Patrick McHardy
2007-03-27 15:18               ` Denys
2007-03-27 16:00               ` Denys
2007-03-27 16:21                 ` Patrick McHardy
2007-03-28 17:38                   ` another " Denys
2007-03-28 23:55                   ` Denys
2007-03-29 10:58                     ` Patrick McHardy
2007-03-31  2:26         ` more iproute2 issues (not critical) Denys
2007-03-31  2:31           ` Denys
2007-03-31 14:16             ` Patrick McHardy [this message]
2007-04-04  0:03         ` one more... iproute commands lockup whole system Denys
2007-04-04  1:10           ` jamal
2007-04-04  1:39             ` Patrick McHardy
2007-04-04  2:09               ` jamal
2007-04-04  2:11               ` Denys
2007-04-04 10:55                 ` jamal
2007-04-04 12:56                   ` Denys
2007-04-04 14:10                     ` jamal
2007-04-04 14:35                       ` Denys
2007-04-04 14:13                     ` HTB/act_mirred problem [was: one more... iproute commands lockup whole system] Patrick McHardy
2007-04-04 14:33                       ` jamal
2007-04-04 14:50                         ` Patrick McHardy
2007-04-05  1:33                           ` jamal
2007-04-04 13:36                   ` one more... iproute commands lockup whole system Patrick McHardy
2007-04-04 13:58                     ` jamal
2007-04-04 14:07                       ` Patrick McHardy
2007-04-04 14:30                         ` jamal
2007-04-04 14:39                           ` Patrick McHardy
2007-04-05  2:14                             ` jamal

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=460E6D58.8090701@trash.net \
    --to=kaber@trash.net \
    --cc=denys@visp.net.lb \
    --cc=netdev@vger.kernel.org \
    --cc=shemminger@linux-foundation.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 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).