From 27aa751c905bf99d1b748e62b46a3ee2563e7d0f Mon Sep 17 00:00:00 2001 From: "Andrey V. Elsukov" Date: Mon, 31 Mar 2014 14:27:22 +0000 Subject: [PATCH] Don't generate an ICMPv6 error message if packet was consumed by filter. MFC after: 1 week Sponsored by: Yandex LLC --- sys/netinet6/ip6_forward.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sys/netinet6/ip6_forward.c b/sys/netinet6/ip6_forward.c index 05d96e753641..2da084bb700e 100644 --- a/sys/netinet6/ip6_forward.c +++ b/sys/netinet6/ip6_forward.c @@ -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. */