diff options
author | luigi <luigi@FreeBSD.org> | 2009-02-02 11:02:19 +0000 |
---|---|---|
committer | luigi <luigi@FreeBSD.org> | 2009-02-02 11:02:19 +0000 |
commit | af5756126ea4abebdc1e1fedff024352d7afc9f1 (patch) | |
tree | ce04b7967fd9aaa5bb129ea14b4bc98e47797b8a /sbin/ipfw | |
parent | bec041358002d5be6a4ef5d8437a384139701152 (diff) | |
download | FreeBSD-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.c | 5 |
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; /* |