svn commit: r205439 - stable/8/sbin/ipfw

Gleb Smirnoff glebius at FreeBSD.org
Mon Mar 22 10:12:00 UTC 2010


Author: glebius
Date: Mon Mar 22 10:11:59 2010
New Revision: 205439
URL: http://svn.freebsd.org/changeset/base/205439

Log:
  MFC r200183 by luigi:
  
    restore setting of sin_len (was removed in 1.146 last february) as
    it seems that now it is necessary for 'forward' to work outside lo0.
  
  Approved by:	luigi

Modified:
  stable/8/sbin/ipfw/ipfw2.c
Directory Properties:
  stable/8/sbin/ipfw/   (props changed)

Modified: stable/8/sbin/ipfw/ipfw2.c
==============================================================================
--- stable/8/sbin/ipfw/ipfw2.c	Mon Mar 22 09:29:56 2010	(r205438)
+++ stable/8/sbin/ipfw/ipfw2.c	Mon Mar 22 10:11:59 2010	(r205439)
@@ -2740,9 +2740,11 @@ chkarg:	
 
 		/*
 		 * In the kernel we assume AF_INET and use only
-		 * sin_port and sin_addr.
+		 * sin_port and sin_addr. Remember to set sin_len as
+		 * the routing code seems to use it too.
 		 */
 		p->sa.sin_family = AF_INET;
+		p->sa.sin_len = sizeof(struct sockaddr_in);
 		p->sa.sin_port = 0;
 		/*
 		 * locate the address-port separator (':' or ',')


More information about the svn-src-all mailing list