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.
The bug (and fix) was reported on 8.0. This patch probably applies
to RELENG_7 as well.
It seems that 'pf' has a similar bug.

Submitted by:	Lytochkin Boris
MFC after:	3 days
This commit is contained in:
Luigi Rizzo 2009-12-06 18:04:26 +00:00
parent edbb090444
commit 6e47ca1bc5
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=200183

View File

@ -2740,9 +2740,11 @@ ipfw_add(int ac, char *av[])
/*
* 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 ',')