Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 22 Mar 2010 10:12:00 +0000 (UTC)
From:      Gleb Smirnoff <glebius@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
Subject:   svn commit: r205439 - stable/8/sbin/ipfw
Message-ID:  <201003221012.o2MAC0ZR088793@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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 ',')



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