mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-31 16:57:10 +00:00
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
This commit is contained in:
parent
d84d38734f
commit
a52e28c7dd
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=188005
@ -2733,7 +2733,10 @@ ipfw_add(int ac, char *av[])
|
||||
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;
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user