Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 29 Sep 2003 21:31:21 -0700 (PDT)
From:      Sam Leffler <sam@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 38840 for review
Message-ID:  <200309300431.h8U4VLMa042982@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=38840

Change 38840 by sam@sam_ebb on 2003/09/29 21:30:26

	correct pfil_run_hooks handling

Affected files ...

.. //depot/projects/netperf/sys/netinet6/ip6_forward.c#4 edit
.. //depot/projects/netperf/sys/netinet6/ip6_output.c#6 edit

Differences ...

==== //depot/projects/netperf/sys/netinet6/ip6_forward.c#4 (text+ko) ====

@@ -522,10 +522,9 @@
 	/*
 	 * Run through list of hooks for output packets.
 	 */
-	if (pfil_run_hooks(&inet6_pfil_hook, &m, rt->rt_ifp, PFIL_OUT) != 0) {
-		error = EHOSTUNREACH;
-		goto freecopy;
-	}
+	error = pfil_run_hooks(&inet6_pfil_hook, &m, rt->rt_ifp, PFIL_OUT);
+	if (error != 0)
+		goto senderr;
 	if (m == NULL)
 		goto freecopy;
 	ip6 = mtod(m, struct ip6_hdr *);
@@ -545,6 +544,9 @@
 				goto freecopy;
 		}
 	}
+#ifdef PFIL_HOOKS
+senderr:
+#endif
 	if (mcopy == NULL)
 		return;
 	switch (error) {

==== //depot/projects/netperf/sys/netinet6/ip6_output.c#6 (text+ko) ====

@@ -927,11 +927,8 @@
 	/*
 	 * Run through list of hooks for output packets.
 	 */
-	if (pfil_run_hooks(&inet6_pfil_hook, &m, ifp, PFIL_OUT) != 0) {
-		error = EHOSTUNREACH;
-		goto done;
-	}
-	if (m == NULL)
+	error = pfil_run_hooks(&inet6_pfil_hook, &m, ifp, PFIL_OUT);
+	if (error != 0 || m == NULL)
 		goto done;
 	ip6 = mtod(m, struct ip6_hdr *);
 #endif /* PFIL_HOOKS */



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200309300431.h8U4VLMa042982>