Don't generate an ICMPv6 error message if packet was consumed by filter.

MFC after:	1 week
Sponsored by:	Yandex LLC
This commit is contained in:
Andrey V. Elsukov 2014-03-31 14:27:22 +00:00
parent f3c22563bd
commit 27aa751c90
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=263969

View File

@ -564,10 +564,8 @@ ip6_forward(struct mbuf *m, int srcrt)
odst = ip6->ip6_dst;
/* Run through list of hooks for output packets. */
error = pfil_run_hooks(&V_inet6_pfil_hook, &m, rt->rt_ifp, PFIL_OUT, NULL);
if (error != 0)
goto senderr;
if (m == NULL)
goto freecopy;
if (error != 0 || m == NULL)
goto freecopy; /* consumed by filter */
ip6 = mtod(m, struct ip6_hdr *);
/* See if destination IP address was changed by packet filter. */