From f65342081dee75b9f14fe694115caf0b6379f2e3 Mon Sep 17 00:00:00 2001 From: glebius Date: Mon, 22 Mar 2010 10:11:59 +0000 Subject: 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 --- sbin/ipfw/ipfw2.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'sbin') 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 ',') -- cgit v1.1