changeset 10838:0a1397be8bf1

6859479 IPF dup-to prevents packets to be forwarded to destination
author Alexandr Nedvedicky <Alexandr.Nedvedicky@Sun.COM>
date Thu, 22 Oct 2009 10:04:06 +0200
parents 440639357e43
children cf83b553a2ab
files usr/src/uts/common/inet/ipf/fil.c usr/src/uts/common/inet/ipf/netinet/ip_compat.h
diffstat 2 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/usr/src/uts/common/inet/ipf/fil.c	Thu Oct 22 11:32:42 2009 +0800
+++ b/usr/src/uts/common/inet/ipf/fil.c	Thu Oct 22 10:04:06 2009 +0200
@@ -2616,6 +2616,9 @@
 	 */
 	if ((fr != NULL) && (pass & FR_DUP)) {
 		mc = M_DUPLICATE(fin->fin_m);
+#ifdef _KERNEL
+		mc->b_rptr += fin->fin_ipoff;
+#endif
 	}
 
 	if (pass & (FR_RETRST|FR_RETICMP)) {
--- a/usr/src/uts/common/inet/ipf/netinet/ip_compat.h	Thu Oct 22 11:32:42 2009 +0800
+++ b/usr/src/uts/common/inet/ipf/netinet/ip_compat.h	Thu Oct 22 10:04:06 2009 +0200
@@ -301,7 +301,7 @@
 #  define	GETKTIME(x)	uniqtime((struct timeval *)x)
 #  define	MSGDSIZE(x)	msgdsize(x)
 #  define	M_LEN(x)	((x)->b_wptr - (x)->b_rptr)
-#  define	M_DUPLICATE(x)	dupmsg((x))
+#  define	M_DUPLICATE(x)	copymsg((x))
 #  define	MTOD(m,t)	((t)((m)->b_rptr))
 #  define	MTYPE(m)	((m)->b_datap->db_type)
 #  define	FREE_MB_T(m)	freemsg(m)