summaryrefslogtreecommitdiffstats
path: root/sbin/ipfw
diff options
context:
space:
mode:
authorluigi <luigi@FreeBSD.org>2009-02-02 11:02:19 +0000
committerluigi <luigi@FreeBSD.org>2009-02-02 11:02:19 +0000
commitaf5756126ea4abebdc1e1fedff024352d7afc9f1 (patch)
treece04b7967fd9aaa5bb129ea14b4bc98e47797b8a /sbin/ipfw
parentbec041358002d5be6a4ef5d8437a384139701152 (diff)
downloadFreeBSD-src-af5756126ea4abebdc1e1fedff024352d7afc9f1.zip
FreeBSD-src-af5756126ea4abebdc1e1fedff024352d7afc9f1.tar.gz
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
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