svn commit: r188005 - head/sbin/ipfw

Luigi Rizzo luigi at FreeBSD.org
Mon Feb 2 03:02:20 PST 2009


Author: luigi
Date: Mon Feb  2 11:02:19 2009
New Revision: 188005
URL: http://svn.freebsd.org/changeset/base/188005

Log:
  Explain that we assume AF_INET and only use the addr and port field
  from a struct sockaddr_in, so there is no need to initialize sin_len

Modified:
  head/sbin/ipfw/ipfw2.c

Modified: head/sbin/ipfw/ipfw2.c
==============================================================================
--- head/sbin/ipfw/ipfw2.c	Mon Feb  2 10:58:05 2009	(r188004)
+++ head/sbin/ipfw/ipfw2.c	Mon Feb  2 11:02:19 2009	(r188005)
@@ -2733,7 +2733,10 @@ chkarg:	
 		action->opcode = O_FORWARD_IP;
 		action->len = F_INSN_SIZE(ipfw_insn_sa);
 
-		p->sa.sin_len = sizeof(struct sockaddr_in);
+		/*
+		 * In the kernel we assume AF_INET and use only
+		 * sin_port and sin_addr.
+		 */
 		p->sa.sin_family = AF_INET;
 		p->sa.sin_port = 0;
 		/*


More information about the svn-src-head mailing list