From owner-freebsd-hackers Mon Apr 14 07:26:15 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id HAA17125 for hackers-outgoing; Mon, 14 Apr 1997 07:26:15 -0700 (PDT) Received: from oskar.nanoteq.co.za (oskar.nanoteq.co.za [163.195.220.170]) by freefall.freebsd.org (8.8.5/8.8.5) with ESMTP id HAA17114 for ; Mon, 14 Apr 1997 07:26:03 -0700 (PDT) Received: (from rbezuide@localhost) by oskar.nanoteq.co.za (8.8.5/8.8.5) id QAA23098 for hackers@freebsd.org; Mon, 14 Apr 1997 16:25:39 +0200 (SAT) From: Reinier Bezuidenhout Message-Id: <199704141425.QAA23098@oskar.nanoteq.co.za> Subject: route - core dump -mtu To: hackers@freebsd.org Date: Mon, 14 Apr 1997 16:25:39 +0200 (SAT) X-Mailer: ELM [version 2.4ME+ PL28 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk Hi there .... After having some mtu problems on a network and having had to play around with route mtu, I came across an argument bug in route.c This seems to be in 2.1.7.1 ass well as in 2.2.1 and my guess would be 3.0 too. route change default a.b.c.d -mtu without specifying an mtu value causes a segmentation fault. I added the following check to the source of 2.1.7.1 to check for the mtu value. I'm not sure if one should do bounds checking too, i.e. "-mtu -200" which is illegal :) I think :) Here follows the diff -c of the route.c file *** route.c Mon Apr 14 15:40:38 1997 --- route.c.old Mon Apr 14 15:40:30 1997 *************** *** 499,509 **** rt_metrics.rmx_locks |= flag; if (locking) locking = 0; - if (value == NULL) { - errno = EINVAL; - quit("must specify metric"); - } - *valp = atoi(value); } --- 499,504 ---- Greeting Reinier