Date: Mon, 14 Apr 1997 16:25:39 +0200 (SAT) From: Reinier Bezuidenhout <rbezuide@oskar.nanoteq.co.za> To: hackers@freebsd.org Subject: route - core dump -mtu Message-ID: <199704141425.QAA23098@oskar.nanoteq.co.za>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199704141425.QAA23098>