* [LARTC] patch: avoid segfault when using PRIO qdisc
@ 2001-07-07 20:53 Nikolai Vladychevski
0 siblings, 0 replies; only message in thread
From: Nikolai Vladychevski @ 2001-07-07 20:53 UTC (permalink / raw)
To: lartc
[-- 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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2001-07-07 20:53 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-07-07 20:53 [LARTC] patch: avoid segfault when using PRIO qdisc Nikolai Vladychevski
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.