Date: Mon, 2 Feb 2009 11:02:19 +0000 (UTC) From: Luigi Rizzo <luigi@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r188005 - head/sbin/ipfw Message-ID: <200902021102.n12B2KVd095425@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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; /*
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200902021102.n12B2KVd095425>