#
b57001d2 |
| 18-Mar-2019 |
dlg <dlg@openbsd.org> |
explicitly use BPF_FILDROP_CAPTURE when configuring BIOCSFILDROP
BIOCSFILDROP used to just be a flag, ie, any non-zero value was treated the same, but i'm changing it so different values do differen
explicitly use BPF_FILDROP_CAPTURE when configuring BIOCSFILDROP
BIOCSFILDROP used to just be a flag, ie, any non-zero value was treated the same, but i'm changing it so different values do different things. this way the programs should keep working even if i decide to change the values for these macros.
show more ...
|
#
200415a0 |
| 05-Jan-2019 |
krw <krw@openbsd.org> |
Simplify and clarify (i.e. shrink) code processing the bpf captures.
|
#
a0bd5231 |
| 27-Dec-2018 |
krw <krw@openbsd.org> |
Rename ufdesc to udpfd to make the code slightly more intuitive.
|
#
991c0c97 |
| 27-Dec-2018 |
krw <krw@openbsd.org> |
Rename bfdesc to bpffd and packethandler() to bpffd_handler() to make the code slightly more intuitive.
|
#
712955bd |
| 08-Dec-2018 |
krw <krw@openbsd.org> |
ssize_t and unsigned int may be different sizes. Use ssize_t instead of unsigned int for value being compared to the results of writev() and sendmsg() calls.
Noticed by naddy@ on i386 compile.
|
#
32fb2ac9 |
| 04-Jul-2018 |
mpi <mpi@openbsd.org> |
Print the amount of bytes written, as intended, instead of -1 when an error occurs.
ok krw@
|
#
5cfa73ec |
| 20-Sep-2017 |
krw <krw@openbsd.org> |
Make log messages more informative by using the name of the function that failed and the significant parameters. Distinguish between poll() errors and problematic revents values.
|
#
57cbec93 |
| 20-Sep-2017 |
krw <krw@openbsd.org> |
Make send_packet() log entries more informative by providing the name of the packet type that causes an error.
|
#
218b4846 |
| 20-Sep-2017 |
krw <krw@openbsd.org> |
Nuke a few extraneous blanks.
|
#
6c5bfcb1 |
| 19-Sep-2017 |
krw <krw@openbsd.org> |
Make send_packet() usage consistent. i.e. don't exit if send_packet(DISCOVER) fails.
Distinguish between writev() and sendmsg() errors in send_packet() log messages.
Check for short writes no matte
Make send_packet() usage consistent. i.e. don't exit if send_packet(DISCOVER) fails.
Distinguish between writev() and sendmsg() errors in send_packet() log messages.
Check for short writes no matter how the packet is output. Return failure in this occurs. Check results of all send_packet() calls.
If send_packet() fails, don't log that the DHCP message was sent.
show more ...
|
#
b53f3a4d |
| 17-Sep-2017 |
krw <krw@openbsd.org> |
Create global 'log_procname' and set it to '<ifname>' or '<ifname> [priv]' as appropriate for the process doing the setting. Use it as the prefix in all log_*() output. Makes tracking messages for an
Create global 'log_procname' and set it to '<ifname>' or '<ifname> [priv]' as appropriate for the process doing the setting. Use it as the prefix in all log_*() output. Makes tracking messages for an interface or a process much easier.
show more ...
|
#
40c65bfb |
| 14-Sep-2017 |
krw <krw@openbsd.org> |
Strive to rationalize fatal[x]() usage and verbiage.
|
#
ad7cd28f |
| 24-Jul-2017 |
krw <krw@openbsd.org> |
Tweak some comments
|
#
e0eb97d7 |
| 14-Jul-2017 |
krw <krw@openbsd.org> |
"ioctl() < 0" ==> "ioctl() == -1" as god and guenther@ intended.
|
#
6fe46e93 |
| 14-Jul-2017 |
krw <krw@openbsd.org> |
Replace remaining "!var" expressions with "<var> == 0", "!(<var> & FLAG)" with "(<var> & FLAG) == 0", "!<func()>" with "<func()> == 0" and "!<define>" with "<define> == 0". And the positive cases as
Replace remaining "!var" expressions with "<var> == 0", "!(<var> & FLAG)" with "(<var> & FLAG) == 0", "!<func()>" with "<func()> == 0" and "!<define>" with "<define> == 0". And the positive cases as well.
A few stray == NULL and != NULL as well.
show more ...
|
#
9e1c2583 |
| 10-Jul-2017 |
krw <krw@openbsd.org> |
Take some of the mystery out of who does what by renaming "if_register_bpf()" to "get_bpf_sock()", "if_register_send()" to "get_udp_sock()" and "if_register_receive()" to "configure_bpf_sock()".
Pul
Take some of the mystery out of who does what by renaming "if_register_bpf()" to "get_bpf_sock()", "if_register_send()" to "get_udp_sock()" and "if_register_receive()" to "configure_bpf_sock()".
Pull back interface_info knowledge and just pass the interface name, rdomain and bpf socket fd as required.
show more ...
|
#
5d0bc970 |
| 10-Jul-2017 |
krw <krw@openbsd.org> |
Use a modern spacious idiom on all function local variable declarations.
|
#
51a35423 |
| 09-Jul-2017 |
krw <krw@openbsd.org> |
Be consistent. "return (e);" -> "return e;"
|
#
024801d2 |
| 08-Jul-2017 |
krw <krw@openbsd.org> |
Always use uintNN_t instead of sometimes u_intNN_t and sometimes uintNN_t.
|
#
f050b4cb |
| 07-Jul-2017 |
krw <krw@openbsd.org> |
assemble_eh_header() needs only to know about hw_addr.
No more struct interface_info knowledge in packet.c
|
#
f596e0fc |
| 03-Jul-2017 |
krw <krw@openbsd.org> |
sizeof(struct sockaddr_in) != sizeof(struct in_addr).
Fix construction of the unicast UDP packets being sent out via sendmsg(). Accidentally broken in r1.32 (5.6) when types were juggled.
ok bluhm@
|
#
21d10df0 |
| 27-Jun-2017 |
krw <krw@openbsd.org> |
Make if_register_bpf() the same as the other if_register_*() functions by directly assigning the socket fd to ifi->bfdesc rather than returning it and having the caller do the assignment.
|
#
6bde396b |
| 19-Jun-2017 |
krw <krw@openbsd.org> |
Various KNF nits.
|
#
eea1c0a9 |
| 14-Jun-2017 |
krw <krw@openbsd.org> |
Start consolidating client_state into interface_info. First fields to move: recv_packet, sent_packet and sent_packet_length.
No intentional functional change.
|
#
64c16fa3 |
| 13-Jun-2017 |
krw <krw@openbsd.org> |
Rename 'packet' field to 'recv_packet' and 'bootrequest_packet' field to 'sent_packet'. Also 'bootrequest_packet_length' to 'sent_packet_length'.
Adopt consistent idiom of a local variable 'packet'
Rename 'packet' field to 'recv_packet' and 'bootrequest_packet' field to 'sent_packet'. Also 'bootrequest_packet_length' to 'sent_packet_length'.
Adopt consistent idiom of a local variable 'packet' to point at packet being manipulated.
No intentional functional change.
show more ...
|