All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nikolai Vladychevski <niko@isl.net.mx>
To: lartc@vger.kernel.org
Subject: [LARTC] patch: avoid segfault when using PRIO qdisc
Date: Sat, 07 Jul 2001 20:53:48 +0000	[thread overview]
Message-ID: <marc-lartc-99453914427707@msgid-missing> (raw)

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

Hi,

I am attaching the patch for tc_class.c file in ./tc directory of
iproute2 lastest version. This patch is to avoid segfault when listing
classes. It happends only when using PRIO qdisc. I didn't look why
exactly it segfaults (guess becasue PRIO is classless), but this patch
at least prevents it, so you can run the command and look what is
happening to other classes.

cd to iproute2 directory:

# patch tc/tc_class.c antisegfault-patch-for-tc.diff
# make
# cp tc/tc /usr/bin

tc -s class show dev eth0
now works


Regards

Nikolai

[-- Attachment #2: antisegfault-patch-for-tc.diff --]
[-- Type: text/plain, Size: 299 bytes --]

233c233,235
< 	if ((q = get_qdisc_kind(RTA_DATA(tb[TCA_KIND]))) != NULL)
---
> 	if ((q = get_qdisc_kind(RTA_DATA(tb[TCA_KIND]))) != NULL) {
> 	    if (!q->print_copt) fprintf(fp, "[can't get Class options, no function defined, sorry the code is buggy!!]");
> 	    else
235c237
< 	else
---
> 	} else

                 reply	other threads:[~2001-07-07 20:53 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=marc-lartc-99453914427707@msgid-missing \
    --to=niko@isl.net.mx \
    --cc=lartc@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.