Date: Tue, 07 Jul 1998 08:19:23 -0700 From: David Greenman <dg@root.com> To: Samuel S Thomas <sthomas@lart.net> Cc: Poul-Henning Kamp <phk@critter.freebsd.dk>, freebsd-bugs@FreeBSD.ORG Subject: Re: kern/7191: FreeBSD 2.2.6 generates Source-route prohibited when not routing Message-ID: <199807071519.IAA25300@implode.root.com> In-Reply-To: Your message of "Tue, 07 Jul 1998 14:58:02 -0000." <19980707145802.D1918@lart.net>
index | next in thread | previous in thread | raw e-mail
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
help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199807071519.IAA25300>
