History log of /openbsd-current/usr.sbin/mtrace/mtrace.c
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 1.41 30-Dec-2020 benno

getifaddrs() can return entries where ifa_addr is NULL. Check for this
before accessing anything in ifa_addr.
ok claudio@


Revision tags: OPENBSD_6_6_BASE OPENBSD_6_7_BASE OPENBSD_6_8_BASE
# 1.40 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.39 31-Aug-2017 otto

assorted warning fixes; ok millert@


Revision tags: OPENBSD_6_1_BASE
# 1.38 21-Jan-2017 krw

Nuke whitespace foolish enough to expose itself during the great
"warning:" rectification.


# 1.37 03-Aug-2016 krw

Apply a warning fix from lukem@NetBSD circa 1997 (more '()'), and
one from he@NetBSD circa 1998 (more '{}').

Makes gcc happier.


# 1.36 03-Aug-2016 krw

Apply fix from David Binderman via NetBSD. "Use all 3 of b, p, n
to determine if route changed".

Spotted by the Echelon team with AppChecker static analyzer.

NetBSD fix pointed out by millert@


Revision tags: OPENBSD_6_0_BASE
# 1.35 07-Mar-2016 mmcc

(type *)0 -> NULL

ok sha256@


Revision tags: OPENBSD_5_9_BASE
# 1.34 18-Nov-2015 mmcc

Remove memory.h include.

ok deraadt@


Revision tags: OPENBSD_5_7_BASE OPENBSD_5_8_BASE
# 1.33 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)


Revision tags: OPENBSD_5_5_BASE OPENBSD_5_6_BASE
# 1.32 24-Nov-2013 deraadt

fairly obvious ctype cleanup dealing with argv
ok jca


Revision tags: OPENBSD_5_4_BASE
# 1.31 24-Apr-2013 deraadt

kill srandom(); ok claudio


# 1.30 20-Apr-2013 deraadt

remove one of the last stupid (unsigned) casts in the tree


Revision tags: OPENBSD_5_1_BASE OPENBSD_5_2_BASE OPENBSD_5_3_BASE
# 1.29 21-Sep-2011 jsg

fix missing err.h includes


Revision tags: OPENBSD_4_7_BASE OPENBSD_4_8_BASE OPENBSD_4_9_BASE OPENBSD_5_0_BASE
# 1.28 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_4_6_BASE
# 1.27 16-Apr-2009 sobrado

fix a few more typos found by spell(1); rectify a double "with" pointed out
by jmc@ while looking at this diff.

ok jmc@, reyk@ (for the hostapd part)


Revision tags: OPENBSD_4_1_BASE OPENBSD_4_2_BASE OPENBSD_4_3_BASE OPENBSD_4_4_BASE OPENBSD_4_5_BASE
# 1.26 18-Feb-2007 jmc

tidy up synopsis and usage; from Igor Sobrado


Revision tags: OPENBSD_3_8_BASE OPENBSD_3_9_BASE OPENBSD_4_0_BASE
# 1.25 03-May-2005 djm

setresuid; ok deraadt@


Revision tags: OPENBSD_3_6_BASE OPENBSD_3_7_BASE
# 1.24 01-Aug-2004 deraadt

ansi cleanup; khalek@linuxgamers.net


Revision tags: OPENBSD_3_5_BASE
# 1.23 16-Mar-2004 tedu

errno is not specified to be int, but something from errno.h. ok millert@


# 1.22 26-Feb-2004 tedu

fix datalen, from Esben Norby. ok deraadt itojun


# 1.21 26-Nov-2003 millert

Replace log() with logit() since ISO C reserves log() for the math
library and gcc 3.x will complain. Replacement name taken from NetBSD.
espie@ OK.


# 1.20 23-Sep-2003 matthieu

ignore address families other than AF_INET in get_netmask().
ok cedric@


Revision tags: OPENBSD_3_4_BASE
# 1.19 19-Aug-2003 itojun

rewrite SIOCGIFCONF into getifaddrs. deraadt ok


# 1.18 19-Aug-2003 deraadt

convert to poll; ok dhartmei


# 1.17 26-Jun-2003 deraadt

strict proto cleanups


Revision tags: OPENBSD_3_3_BASE
# 1.16 13-Mar-2003 deraadt

lots of sprintf -> snprintf and strcpy -> strlcpy; checked by tedu


Revision tags: OPENBSD_3_2_BASE
# 1.15 09-Aug-2002 itojun

avoid dynamically-generated string to printf. die if fd_set overruns.
from xs@kittenz.org


# 1.14 14-Jun-2002 todd

spelling; from Brian Poole <raj@cerias.purdue.edu>


# 1.13 02-Jun-2002 deraadt

missing sockaddr inits; ok itojun


Revision tags: OPENBSD_3_1_BASE
# 1.12 19-Feb-2002 millert

We live in an ANSI C world. Remove lots of gratuitous #ifdef __STDC__ cruft.


# 1.11 17-Feb-2002 millert

Manual cleanup of remaining userland __P use (excluding packages maintained outside the tree)


# 1.10 16-Feb-2002 millert

Part one of userland __P removal. Done with a simple regexp with some minor hand editing to make comments line up correctly. Another pass is forthcoming that handles the cases that could not be done automatically.


# 1.9 10-Dec-2001 deraadt

follow post-2.1 ip_off & ip_len byte orders


Revision tags: OPENBSD_3_0_BASE
# 1.8 05-Sep-2001 deraadt

make sure that va_start() has matching va_end()


# 1.7 27-Jul-2001 pvalchev

Wall cleanup


# 1.6 25-Jun-2001 deraadt

Pavlin Ivanov Radoslavov <pavlin@catarina.usc.edu> writes:
> I received an email that the USC's General Counsel's Office
> has approved that the software license to pimd can be changed to the
> 3-clause BSD-like license!
> [...]
This is various other bits of software that is also covered by this.


Revision tags: OPENBSD_2_9_BASE
# 1.5 09-Mar-2001 deraadt

exit(-#) is wrong


# 1.4 21-Dec-2000 deraadt

more careful euid killing


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 OPENBSD_2_8_BASE
# 1.3 11-Sep-1996 deraadt

revoke privs at start; tested by fenner@parc.xerox.com


# 1.2 14-Dec-1995 deraadt

from netbsd; update to mrouted 3.8


# 1.1 18-Oct-1995 deraadt

branches: 1.1.1;
Initial revision


# 1.40 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.39 31-Aug-2017 otto

assorted warning fixes; ok millert@


Revision tags: OPENBSD_6_1_BASE
# 1.38 21-Jan-2017 krw

Nuke whitespace foolish enough to expose itself during the great
"warning:" rectification.


# 1.37 03-Aug-2016 krw

Apply a warning fix from lukem@NetBSD circa 1997 (more '()'), and
one from he@NetBSD circa 1998 (more '{}').

Makes gcc happier.


# 1.36 03-Aug-2016 krw

Apply fix from David Binderman via NetBSD. "Use all 3 of b, p, n
to determine if route changed".

Spotted by the Echelon team with AppChecker static analyzer.

NetBSD fix pointed out by millert@


Revision tags: OPENBSD_6_0_BASE
# 1.35 07-Mar-2016 mmcc

(type *)0 -> NULL

ok sha256@


Revision tags: OPENBSD_5_9_BASE
# 1.34 18-Nov-2015 mmcc

Remove memory.h include.

ok deraadt@


Revision tags: OPENBSD_5_7_BASE OPENBSD_5_8_BASE
# 1.33 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)


Revision tags: OPENBSD_5_5_BASE OPENBSD_5_6_BASE
# 1.32 24-Nov-2013 deraadt

fairly obvious ctype cleanup dealing with argv
ok jca


Revision tags: OPENBSD_5_4_BASE
# 1.31 24-Apr-2013 deraadt

kill srandom(); ok claudio


# 1.30 20-Apr-2013 deraadt

remove one of the last stupid (unsigned) casts in the tree


Revision tags: OPENBSD_5_1_BASE OPENBSD_5_2_BASE OPENBSD_5_3_BASE
# 1.29 21-Sep-2011 jsg

fix missing err.h includes


Revision tags: OPENBSD_4_7_BASE OPENBSD_4_8_BASE OPENBSD_4_9_BASE OPENBSD_5_0_BASE
# 1.28 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_4_6_BASE
# 1.27 16-Apr-2009 sobrado

fix a few more typos found by spell(1); rectify a double "with" pointed out
by jmc@ while looking at this diff.

ok jmc@, reyk@ (for the hostapd part)


Revision tags: OPENBSD_4_1_BASE OPENBSD_4_2_BASE OPENBSD_4_3_BASE OPENBSD_4_4_BASE OPENBSD_4_5_BASE
# 1.26 18-Feb-2007 jmc

tidy up synopsis and usage; from Igor Sobrado


Revision tags: OPENBSD_3_8_BASE OPENBSD_3_9_BASE OPENBSD_4_0_BASE
# 1.25 03-May-2005 djm

setresuid; ok deraadt@


Revision tags: OPENBSD_3_6_BASE OPENBSD_3_7_BASE
# 1.24 01-Aug-2004 deraadt

ansi cleanup; khalek@linuxgamers.net


Revision tags: OPENBSD_3_5_BASE
# 1.23 16-Mar-2004 tedu

errno is not specified to be int, but something from errno.h. ok millert@


# 1.22 26-Feb-2004 tedu

fix datalen, from Esben Norby. ok deraadt itojun


# 1.21 26-Nov-2003 millert

Replace log() with logit() since ISO C reserves log() for the math
library and gcc 3.x will complain. Replacement name taken from NetBSD.
espie@ OK.


# 1.20 23-Sep-2003 matthieu

ignore address families other than AF_INET in get_netmask().
ok cedric@


Revision tags: OPENBSD_3_4_BASE
# 1.19 19-Aug-2003 itojun

rewrite SIOCGIFCONF into getifaddrs. deraadt ok


# 1.18 19-Aug-2003 deraadt

convert to poll; ok dhartmei


# 1.17 26-Jun-2003 deraadt

strict proto cleanups


Revision tags: OPENBSD_3_3_BASE
# 1.16 13-Mar-2003 deraadt

lots of sprintf -> snprintf and strcpy -> strlcpy; checked by tedu


Revision tags: OPENBSD_3_2_BASE
# 1.15 09-Aug-2002 itojun

avoid dynamically-generated string to printf. die if fd_set overruns.
from xs@kittenz.org


# 1.14 14-Jun-2002 todd

spelling; from Brian Poole <raj@cerias.purdue.edu>


# 1.13 02-Jun-2002 deraadt

missing sockaddr inits; ok itojun


Revision tags: OPENBSD_3_1_BASE
# 1.12 19-Feb-2002 millert

We live in an ANSI C world. Remove lots of gratuitous #ifdef __STDC__ cruft.


# 1.11 17-Feb-2002 millert

Manual cleanup of remaining userland __P use (excluding packages maintained outside the tree)


# 1.10 16-Feb-2002 millert

Part one of userland __P removal. Done with a simple regexp with some minor hand editing to make comments line up correctly. Another pass is forthcoming that handles the cases that could not be done automatically.


# 1.9 10-Dec-2001 deraadt

follow post-2.1 ip_off & ip_len byte orders


Revision tags: OPENBSD_3_0_BASE
# 1.8 05-Sep-2001 deraadt

make sure that va_start() has matching va_end()


# 1.7 27-Jul-2001 pvalchev

Wall cleanup


# 1.6 25-Jun-2001 deraadt

Pavlin Ivanov Radoslavov <pavlin@catarina.usc.edu> writes:
> I received an email that the USC's General Counsel's Office
> has approved that the software license to pimd can be changed to the
> 3-clause BSD-like license!
> [...]
This is various other bits of software that is also covered by this.


Revision tags: OPENBSD_2_9_BASE
# 1.5 09-Mar-2001 deraadt

exit(-#) is wrong


# 1.4 21-Dec-2000 deraadt

more careful euid killing


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 OPENBSD_2_8_BASE
# 1.3 11-Sep-1996 deraadt

revoke privs at start; tested by fenner@parc.xerox.com


# 1.2 14-Dec-1995 deraadt

from netbsd; update to mrouted 3.8


# 1.1 18-Oct-1995 deraadt

branches: 1.1.1;
Initial revision


Revision tags: OPENBSD_6_2_BASE
# 1.39 31-Aug-2017 otto

assorted warning fixes; ok millert@


Revision tags: OPENBSD_6_1_BASE
# 1.38 21-Jan-2017 krw

Nuke whitespace foolish enough to expose itself during the great
"warning:" rectification.


# 1.37 03-Aug-2016 krw

Apply a warning fix from lukem@NetBSD circa 1997 (more '()'), and
one from he@NetBSD circa 1998 (more '{}').

Makes gcc happier.


# 1.36 03-Aug-2016 krw

Apply fix from David Binderman via NetBSD. "Use all 3 of b, p, n
to determine if route changed".

Spotted by the Echelon team with AppChecker static analyzer.

NetBSD fix pointed out by millert@


Revision tags: OPENBSD_6_0_BASE
# 1.35 07-Mar-2016 mmcc

(type *)0 -> NULL

ok sha256@


Revision tags: OPENBSD_5_9_BASE
# 1.34 18-Nov-2015 mmcc

Remove memory.h include.

ok deraadt@


Revision tags: OPENBSD_5_7_BASE OPENBSD_5_8_BASE
# 1.33 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)


Revision tags: OPENBSD_5_5_BASE OPENBSD_5_6_BASE
# 1.32 24-Nov-2013 deraadt

fairly obvious ctype cleanup dealing with argv
ok jca


Revision tags: OPENBSD_5_4_BASE
# 1.31 24-Apr-2013 deraadt

kill srandom(); ok claudio


# 1.30 20-Apr-2013 deraadt

remove one of the last stupid (unsigned) casts in the tree


Revision tags: OPENBSD_5_1_BASE OPENBSD_5_2_BASE OPENBSD_5_3_BASE
# 1.29 21-Sep-2011 jsg

fix missing err.h includes


Revision tags: OPENBSD_4_7_BASE OPENBSD_4_8_BASE OPENBSD_4_9_BASE OPENBSD_5_0_BASE
# 1.28 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_4_6_BASE
# 1.27 16-Apr-2009 sobrado

fix a few more typos found by spell(1); rectify a double "with" pointed out
by jmc@ while looking at this diff.

ok jmc@, reyk@ (for the hostapd part)


Revision tags: OPENBSD_4_1_BASE OPENBSD_4_2_BASE OPENBSD_4_3_BASE OPENBSD_4_4_BASE OPENBSD_4_5_BASE
# 1.26 18-Feb-2007 jmc

tidy up synopsis and usage; from Igor Sobrado


Revision tags: OPENBSD_3_8_BASE OPENBSD_3_9_BASE OPENBSD_4_0_BASE
# 1.25 03-May-2005 djm

setresuid; ok deraadt@


Revision tags: OPENBSD_3_6_BASE OPENBSD_3_7_BASE
# 1.24 01-Aug-2004 deraadt

ansi cleanup; khalek@linuxgamers.net


Revision tags: OPENBSD_3_5_BASE
# 1.23 16-Mar-2004 tedu

errno is not specified to be int, but something from errno.h. ok millert@


# 1.22 26-Feb-2004 tedu

fix datalen, from Esben Norby. ok deraadt itojun


# 1.21 26-Nov-2003 millert

Replace log() with logit() since ISO C reserves log() for the math
library and gcc 3.x will complain. Replacement name taken from NetBSD.
espie@ OK.


# 1.20 23-Sep-2003 matthieu

ignore address families other than AF_INET in get_netmask().
ok cedric@


Revision tags: OPENBSD_3_4_BASE
# 1.19 19-Aug-2003 itojun

rewrite SIOCGIFCONF into getifaddrs. deraadt ok


# 1.18 19-Aug-2003 deraadt

convert to poll; ok dhartmei


# 1.17 26-Jun-2003 deraadt

strict proto cleanups


Revision tags: OPENBSD_3_3_BASE
# 1.16 13-Mar-2003 deraadt

lots of sprintf -> snprintf and strcpy -> strlcpy; checked by tedu


Revision tags: OPENBSD_3_2_BASE
# 1.15 09-Aug-2002 itojun

avoid dynamically-generated string to printf. die if fd_set overruns.
from xs@kittenz.org


# 1.14 14-Jun-2002 todd

spelling; from Brian Poole <raj@cerias.purdue.edu>


# 1.13 02-Jun-2002 deraadt

missing sockaddr inits; ok itojun


Revision tags: OPENBSD_3_1_BASE
# 1.12 19-Feb-2002 millert

We live in an ANSI C world. Remove lots of gratuitous #ifdef __STDC__ cruft.


# 1.11 17-Feb-2002 millert

Manual cleanup of remaining userland __P use (excluding packages maintained outside the tree)


# 1.10 16-Feb-2002 millert

Part one of userland __P removal. Done with a simple regexp with some minor hand editing to make comments line up correctly. Another pass is forthcoming that handles the cases that could not be done automatically.


# 1.9 10-Dec-2001 deraadt

follow post-2.1 ip_off & ip_len byte orders


Revision tags: OPENBSD_3_0_BASE
# 1.8 05-Sep-2001 deraadt

make sure that va_start() has matching va_end()


# 1.7 27-Jul-2001 pvalchev

Wall cleanup


# 1.6 25-Jun-2001 deraadt

Pavlin Ivanov Radoslavov <pavlin@catarina.usc.edu> writes:
> I received an email that the USC's General Counsel's Office
> has approved that the software license to pimd can be changed to the
> 3-clause BSD-like license!
> [...]
This is various other bits of software that is also covered by this.


Revision tags: OPENBSD_2_9_BASE
# 1.5 09-Mar-2001 deraadt

exit(-#) is wrong


# 1.4 21-Dec-2000 deraadt

more careful euid killing


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 OPENBSD_2_8_BASE
# 1.3 11-Sep-1996 deraadt

revoke privs at start; tested by fenner@parc.xerox.com


# 1.2 14-Dec-1995 deraadt

from netbsd; update to mrouted 3.8


# 1.1 18-Oct-1995 deraadt

branches: 1.1.1;
Initial revision