diff options
author | glebius <glebius@FreeBSD.org> | 2010-03-22 10:11:59 +0000 |
---|---|---|
committer | glebius <glebius@FreeBSD.org> | 2010-03-22 10:11:59 +0000 |
commit | f65342081dee75b9f14fe694115caf0b6379f2e3 (patch) | |
tree | 1a1d8fccb81d7fdfc8b62625130d63886cb560b5 /sbin | |
parent | 2cb34af975fc03f49063752ff18c71611e4d29f4 (diff) | |
download | FreeBSD-src-f65342081dee75b9f14fe694115caf0b6379f2e3.zip FreeBSD-src-f65342081dee75b9f14fe694115caf0b6379f2e3.tar.gz |
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
Diffstat (limited to 'sbin')
-rw-r--r-- | sbin/ipfw/ipfw2.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sbin/ipfw/ipfw2.c b/sbin/ipfw/ipfw2.c index 58094a1..7edfbd5 100644 --- a/sbin/ipfw/ipfw2.c +++ b/sbin/ipfw/ipfw2.c @@ -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 ',') |