History log of /openbsd-current/usr.sbin/rbootd/bpf.c
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 1.27 28-Jun-2019 deraadt

When system calls indicate an error they return -1, not some arbitrary
value < 0. errno is only updated in this case. Change all (most?)
callers of syscalls to follow this better, and let's see if this strictness
helps us in the future.


Revision tags: OPENBSD_6_2_BASE OPENBSD_6_3_BASE OPENBSD_6_4_BASE OPENBSD_6_5_BASE
# 1.26 19-Apr-2017 natano

Switch base tools from /dev/bpf0 to /dev/bpf. Now that /dev/bpf has been
around for two releases, it should be safe to do so.

ok bluhm deraadt sthen tb yasuoka


Revision tags: OPENBSD_6_0_BASE OPENBSD_6_1_BASE
# 1.25 28-May-2016 natano

Replace the /dev/bpf* open loop with a plain open("/dev/bpf0", ...).
ok deraadt jca


# 1.24 16-Apr-2016 natano

Replace bcopy() from struct bpf_timeval to struct timeval; those
structures are not exchangeable. This should unbreak connection timeouts
in rbootd, although I can't verify due to lack of rboot-able hardware.
ok guenther millert


Revision tags: OPENBSD_5_9_BASE
# 1.23 20-Aug-2015 deraadt

stdlib.h is in scope; do not cast malloc/calloc/realloc*
ok millert krw


Revision tags: OPENBSD_5_8_BASE
# 1.22 18-Apr-2015 deraadt

Convert many atoi() calls to strtonum(), adding range checks and failure
handling along the way.
Reviews by Brendan MacDonell, Jeremy Devenport, florian, doug, millert


Revision tags: OPENBSD_5_7_BASE
# 1.21 16-Jan-2015 deraadt

Replace <sys/param.h> with <limits.h> and other less dirty headers where
possible. Annotate <sys/param.h> lines with their current reasons. Switch
to PATH_MAX, NGROUPS_MAX, HOST_NAME_MAX+1, LOGIN_NAME_MAX, etc. Change
MIN() and MAX() to local definitions of MINIMUM() and MAXIMUM() where
sensible to avoid pulling in the pollution. These are the files confirmed
through binary verification.
ok guenther, millert, doug (helped with the verification protocol)


# 1.20 02-Nov-2014 deraadt

remove bogus comment


Revision tags: OPENBSD_5_5_BASE OPENBSD_5_6_BASE
# 1.19 28-Nov-2013 deraadt

unsigned char for ctype
ok okan krw


Revision tags: OPENBSD_5_4_BASE
# 1.18 20-Apr-2013 miod

Use offsetof() instead of rolling our own; gets rid of truncation warnings
when building on 64-bit hosts.
"looks good" deraadt@


Revision tags: OPENBSD_4_7_BASE OPENBSD_4_8_BASE OPENBSD_4_9_BASE OPENBSD_5_0_BASE OPENBSD_5_1_BASE OPENBSD_5_2_BASE OPENBSD_5_3_BASE
# 1.17 27-Oct-2009 deraadt

rcsid[] and sccsid[] and copyright[] are essentially unmaintained (and
unmaintainable). these days, people use source. these id's do not provide
any benefit, and do hurt the small install media
(the 33,000 line diff is essentially mechanical)
ok with the idea millert, ok dms


Revision tags: OPENBSD_3_6_BASE OPENBSD_3_7_BASE OPENBSD_3_8_BASE OPENBSD_3_9_BASE OPENBSD_4_0_BASE OPENBSD_4_1_BASE OPENBSD_4_2_BASE OPENBSD_4_3_BASE OPENBSD_4_4_BASE OPENBSD_4_5_BASE OPENBSD_4_6_BASE
# 1.16 10-May-2004 canacar

write filter and lock bpf descriptor before dropping privileges,
with help from otto@, tested by mickey@ and jolan@, ok deraadt@


# 1.15 01-May-2004 deraadt

priv revoking; tested by millert


Revision tags: OPENBSD_3_4_BASE OPENBSD_3_5_BASE
# 1.14 19-Aug-2003 itojun

one missing freeifaddrs


# 1.13 19-Aug-2003 itojun

rewrite SIOCGIFCONF into getifaddrs. deraadt ok


# 1.12 02-Jun-2003 millert

Remove the advertising clause in the UCB license which Berkeley
rescinded 22 July 1999. Proofed by myself and Theo.


Revision tags: OPENBSD_3_3_BASE
# 1.11 13-Dec-2002 deraadt

ansi & knf


Revision tags: OPENBSD_3_2_BASE
# 1.10 29-May-2002 deraadt

more strlcat and strlcpy


# 1.9 29-May-2002 deraadt

more sprintf


# 1.8 27-May-2002 deraadt

unsigned to unsigned int


Revision tags: OPENBSD_3_1_BASE
# 1.7 14-Mar-2002 mpech

kill more registers.

millert@ ok


# 1.6 19-Feb-2002 miod

Fix the signal races in rbootd.
Credit to millert@ and deraadt@ for pointing out some of my braindamage.


Revision tags: OPENBSD_2_9_BASE OPENBSD_3_0_BASE
# 1.5 17-Jan-2001 pjanzen

OpenBSD-ify.


Revision tags: OPENBSD_2_8_BASE
# 1.4 28-Sep-2000 mickey

according to the strlcpy man page the order of arguments
is: destination, source, size.
it seems in the commit of version 1.3 a couple of maxwell daemons
of the second kind exchanged second and third arguments in every
call to the stlcpy, thanks gcc.
at this late hour we hope they are up to their eternity-spanning
poker game for hot molecules and the diff will finally get in untampered.


# 1.3 28-Jun-2000 deraadt

buf oflow safe


Revision tags: OPENBSD_2_0_BASE OPENBSD_2_1_BASE OPENBSD_2_2_BASE OPENBSD_2_3_BASE OPENBSD_2_4_BASE OPENBSD_2_5_BASE OPENBSD_2_6_BASE OPENBSD_2_7_BASE
# 1.2 16-Nov-1995 deraadt

repair byte order botches; from scottr@plexus.com via netbsd


# 1.1 18-Oct-1995 deraadt

branches: 1.1.1;
Initial revision


Revision tags: OPENBSD_6_2_BASE
# 1.26 19-Apr-2017 natano

Switch base tools from /dev/bpf0 to /dev/bpf. Now that /dev/bpf has been
around for two releases, it should be safe to do so.

ok bluhm deraadt sthen tb yasuoka


Revision tags: OPENBSD_6_0_BASE OPENBSD_6_1_BASE
# 1.25 28-May-2016 natano

Replace the /dev/bpf* open loop with a plain open("/dev/bpf0", ...).
ok deraadt jca


# 1.24 16-Apr-2016 natano

Replace bcopy() from struct bpf_timeval to struct timeval; those
structures are not exchangeable. This should unbreak connection timeouts
in rbootd, although I can't verify due to lack of rboot-able hardware.
ok guenther millert


Revision tags: OPENBSD_5_9_BASE
# 1.23 20-Aug-2015 deraadt

stdlib.h is in scope; do not cast malloc/calloc/realloc*
ok millert krw


Revision tags: OPENBSD_5_8_BASE
# 1.22 18-Apr-2015 deraadt

Convert many atoi() calls to strtonum(), adding range checks and failure
handling along the way.
Reviews by Brendan MacDonell, Jeremy Devenport, florian, doug, millert


Revision tags: OPENBSD_5_7_BASE
# 1.21 16-Jan-2015 deraadt

Replace <sys/param.h> with <limits.h> and other less dirty headers where
possible. Annotate <sys/param.h> lines with their current reasons. Switch
to PATH_MAX, NGROUPS_MAX, HOST_NAME_MAX+1, LOGIN_NAME_MAX, etc. Change
MIN() and MAX() to local definitions of MINIMUM() and MAXIMUM() where
sensible to avoid pulling in the pollution. These are the files confirmed
through binary verification.
ok guenther, millert, doug (helped with the verification protocol)


# 1.20 02-Nov-2014 deraadt

remove bogus comment


Revision tags: OPENBSD_5_5_BASE OPENBSD_5_6_BASE
# 1.19 28-Nov-2013 deraadt

unsigned char for ctype
ok okan krw


Revision tags: OPENBSD_5_4_BASE
# 1.18 20-Apr-2013 miod

Use offsetof() instead of rolling our own; gets rid of truncation warnings
when building on 64-bit hosts.
"looks good" deraadt@


Revision tags: OPENBSD_4_7_BASE OPENBSD_4_8_BASE OPENBSD_4_9_BASE OPENBSD_5_0_BASE OPENBSD_5_1_BASE OPENBSD_5_2_BASE OPENBSD_5_3_BASE
# 1.17 27-Oct-2009 deraadt

rcsid[] and sccsid[] and copyright[] are essentially unmaintained (and
unmaintainable). these days, people use source. these id's do not provide
any benefit, and do hurt the small install media
(the 33,000 line diff is essentially mechanical)
ok with the idea millert, ok dms


Revision tags: OPENBSD_3_6_BASE OPENBSD_3_7_BASE OPENBSD_3_8_BASE OPENBSD_3_9_BASE OPENBSD_4_0_BASE OPENBSD_4_1_BASE OPENBSD_4_2_BASE OPENBSD_4_3_BASE OPENBSD_4_4_BASE OPENBSD_4_5_BASE OPENBSD_4_6_BASE
# 1.16 10-May-2004 canacar

write filter and lock bpf descriptor before dropping privileges,
with help from otto@, tested by mickey@ and jolan@, ok deraadt@


# 1.15 01-May-2004 deraadt

priv revoking; tested by millert


Revision tags: OPENBSD_3_4_BASE OPENBSD_3_5_BASE
# 1.14 19-Aug-2003 itojun

one missing freeifaddrs


# 1.13 19-Aug-2003 itojun

rewrite SIOCGIFCONF into getifaddrs. deraadt ok


# 1.12 02-Jun-2003 millert

Remove the advertising clause in the UCB license which Berkeley
rescinded 22 July 1999. Proofed by myself and Theo.


Revision tags: OPENBSD_3_3_BASE
# 1.11 13-Dec-2002 deraadt

ansi & knf


Revision tags: OPENBSD_3_2_BASE
# 1.10 29-May-2002 deraadt

more strlcat and strlcpy


# 1.9 29-May-2002 deraadt

more sprintf


# 1.8 27-May-2002 deraadt

unsigned to unsigned int


Revision tags: OPENBSD_3_1_BASE
# 1.7 14-Mar-2002 mpech

kill more registers.

millert@ ok


# 1.6 19-Feb-2002 miod

Fix the signal races in rbootd.
Credit to millert@ and deraadt@ for pointing out some of my braindamage.


Revision tags: OPENBSD_2_9_BASE OPENBSD_3_0_BASE
# 1.5 17-Jan-2001 pjanzen

OpenBSD-ify.


Revision tags: OPENBSD_2_8_BASE
# 1.4 28-Sep-2000 mickey

according to the strlcpy man page the order of arguments
is: destination, source, size.
it seems in the commit of version 1.3 a couple of maxwell daemons
of the second kind exchanged second and third arguments in every
call to the stlcpy, thanks gcc.
at this late hour we hope they are up to their eternity-spanning
poker game for hot molecules and the diff will finally get in untampered.


# 1.3 28-Jun-2000 deraadt

buf oflow safe


Revision tags: OPENBSD_2_0_BASE OPENBSD_2_1_BASE OPENBSD_2_2_BASE OPENBSD_2_3_BASE OPENBSD_2_4_BASE OPENBSD_2_5_BASE OPENBSD_2_6_BASE OPENBSD_2_7_BASE
# 1.2 16-Nov-1995 deraadt

repair byte order botches; from scottr@plexus.com via netbsd


# 1.1 18-Oct-1995 deraadt

branches: 1.1.1;
Initial revision