PERFORCE change 38840 for review
Sam Leffler
sam at FreeBSD.org
Mon Sep 29 21:31:23 PDT 2003
http://perforce.freebsd.org/chv.cgi?CH=38840
Change 38840 by sam at 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 */
More information about the p4-projects
mailing list