From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nikolai Vladychevski Date: Sat, 07 Jul 2001 20:53:48 +0000 Subject: [LARTC] patch: avoid segfault when using PRIO qdisc MIME-Version: 1 Content-Type: multipart/mixed; boundary="------------347EDF6E80CEBBA40A3CC868" Message-Id: List-Id: To: lartc@vger.kernel.org This is a multi-part message in MIME format. --------------347EDF6E80CEBBA40A3CC868 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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 --------------347EDF6E80CEBBA40A3CC868 Content-Type: text/plain; charset=us-ascii; name="antisegfault-patch-for-tc.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="antisegfault-patch-for-tc.diff" 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 --------------347EDF6E80CEBBA40A3CC868-- _______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://ds9a.nl/2.4Routing/