summaryrefslogtreecommitdiffstats
path: root/sbin/ipfw
diff options
context:
space:
mode:
Diffstat (limited to 'sbin/ipfw')
-rw-r--r--sbin/ipfw/ipfw2.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sbin/ipfw/ipfw2.c b/sbin/ipfw/ipfw2.c
index 0a2790b..c0dfac3 100644
--- a/sbin/ipfw/ipfw2.c
+++ b/sbin/ipfw/ipfw2.c
@@ -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;
/*
OpenPOWER on IntegriCloud