Date: Wed, 25 May 2016 15:54:21 +0000 (UTC) From: Michael Tuexen <tuexen@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r300687 - head/sys/netinet Message-ID: <201605251554.u4PFsL4t082156@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: tuexen Date: Wed May 25 15:54:21 2016 New Revision: 300687 URL: https://svnweb.freebsd.org/changeset/base/300687 Log: Send an ICMP packet indicating destination unreachable/protocol unreachable if we don't handle the packet in the kernel and not in userspace. MFC after: 1 week Modified: head/sys/netinet/raw_ip.c Modified: head/sys/netinet/raw_ip.c ============================================================================== --- head/sys/netinet/raw_ip.c Wed May 25 15:49:29 2016 (r300686) +++ head/sys/netinet/raw_ip.c Wed May 25 15:54:21 2016 (r300687) @@ -71,6 +71,7 @@ __FBSDID("$FreeBSD$"); #include <netinet/ip.h> #include <netinet/ip_var.h> #include <netinet/ip_mroute.h> +#include <netinet/ip_icmp.h> #ifdef IPSEC #include <netipsec/ipsec.h> @@ -416,8 +417,10 @@ rip_input(struct mbuf **mp, int *offp, i if (inetsw[ip_protox[ip->ip_p]].pr_input == rip_input) { IPSTAT_INC(ips_noproto); IPSTAT_DEC(ips_delivered); + icmp_error(m, ICMP_UNREACH, ICMP_UNREACH_PROTOCOL, 0, 0); + } else { + m_freem(m); } - m_freem(m); } return (IPPROTO_DONE); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201605251554.u4PFsL4t082156>