From owner-freebsd-bugs Tue Jul 7 08:24:45 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id IAA13262 for freebsd-bugs-outgoing; Tue, 7 Jul 1998 08:24:45 -0700 (PDT) (envelope-from owner-freebsd-bugs@FreeBSD.ORG) Received: from implode.root.com (implode.root.com [198.145.90.17]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id IAA13251 for ; Tue, 7 Jul 1998 08:24:29 -0700 (PDT) (envelope-from root@implode.root.com) Received: from implode.root.com (localhost [127.0.0.1]) by implode.root.com (8.8.5/8.8.5) with ESMTP id IAA25300; Tue, 7 Jul 1998 08:19:23 -0700 (PDT) Message-Id: <199807071519.IAA25300@implode.root.com> To: Samuel S Thomas cc: Poul-Henning Kamp , freebsd-bugs@FreeBSD.ORG Subject: Re: kern/7191: FreeBSD 2.2.6 generates Source-route prohibited when not routing In-reply-to: Your message of "Tue, 07 Jul 1998 14:58:02 -0000." <19980707145802.D1918@lart.net> From: David Greenman Reply-To: dg@root.com Date: Tue, 07 Jul 1998 08:19:23 -0700 Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org This should supress the console message and bogus ICMP response when IP forwarding isn't enabled. Please test. -DG David Greenman Co-founder/Principal Architect, The FreeBSD Project Index: ip_input.c =================================================================== RCS file: /home/ncvs/src/sys/netinet/ip_input.c,v retrieving revision 1.50.2.13 diff -c -r1.50.2.13 ip_input.c *** ip_input.c 1998/02/26 17:17:09 1.50.2.13 --- ip_input.c 1998/07/07 15:17:48 *************** *** 953,968 **** } if (!ip_dosourceroute) { ! char buf[4*sizeof "123"]; nosourcerouting: ! strcpy(buf, inet_ntoa(ip->ip_dst)); ! log(LOG_WARNING, ! "attempted source route from %s to %s\n", ! inet_ntoa(ip->ip_src), buf); ! type = ICMP_UNREACH; ! code = ICMP_UNREACH_SRCFAIL; ! goto bad; } /* --- 953,971 ---- } if (!ip_dosourceroute) { ! if (ipforwarding) { ! char buf[16]; /* aaa.bbb.ccc.ddd\0 */ nosourcerouting: ! strcpy(buf, inet_ntoa(ip->ip_dst)); ! log(LOG_WARNING, ! "attempted source route from %s to %s\n", ! inet_ntoa(ip->ip_src), buf); ! type = ICMP_UNREACH; ! code = ICMP_UNREACH_SRCFAIL; ! goto bad; ! } ! break; } /* To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message