History log of /openbsd-current/usr.sbin/ripd/rde.c
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 1.25 08-Mar-2023 guenther

Delete obsolete /* ARGSUSED */ lint comments.

ok miod@ millert@


Revision tags: OPENBSD_6_9_BASE OPENBSD_7_0_BASE OPENBSD_7_1_BASE OPENBSD_7_2_BASE
# 1.24 19-Jan-2021 claudio

Make the struct imsgev structs static and with that ripd -fno-common clean.


# 1.23 19-Jan-2021 claudio

Remove the PROC_* enums and ripd_process, they are no longer needed.
Instead assign the process name directly to log_procname which was
the last user of ripd_process.


Revision tags: OPENBSD_6_5_BASE OPENBSD_6_6_BASE OPENBSD_6_7_BASE OPENBSD_6_8_BASE
# 1.22 04-Nov-2018 remi

Pledge ripe and rde.
Use unveil to remove file system access for the parent proc.

Also remove control_cleanup as discussed on tech@. It allows to fully remove
fs access (ripd does not support reload). It's not an issue for ripd and
ripctrl if an unused socket file is lying around.

reads OK for claudio@ and mestre@


Revision tags: OPENBSD_6_1_BASE OPENBSD_6_2_BASE OPENBSD_6_3_BASE OPENBSD_6_4_BASE
# 1.21 03-Sep-2016 renato

Simplify shutdown process.

On shutdown, there's no need to use kill(2) to kill the child
processes. Just closing the IPC sockets will make the children receive
an EOF, break out from the event loop and then exit.

Tha advantages of this "pipe teardown" are:
* simpler code;
* no need to pledge "proc" in the parent process;
* removal of a (hard to trigger) PID reuse race condition.

ok benno@ claudio@


# 1.20 02-Sep-2016 benno

work on making log.c similar in all daemons:

move daemon-local functions into new logmsg.c, and reduce
the (mostly whitespace) differences so that log.c's can be diffed easily.

ok claudio@, feedback from henning@, deraadt@, reyk@


Revision tags: OPENBSD_5_9_BASE OPENBSD_6_0_BASE
# 1.19 05-Dec-2015 claudio

EAGAIN handling for imsg_read. OK henning@ benno@


Revision tags: OPENBSD_5_7_BASE OPENBSD_5_8_BASE
# 1.18 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_6_BASE
# 1.17 12-Jul-2014 krw

Close connections when msgbuf_write() returns 0.

ok claudio@


Revision tags: OPENBSD_5_5_BASE
# 1.16 19-Nov-2013 benno

handle msgbuf_write() returning EAGAIN

"looks right" deraadt and sthen.


Revision tags: OPENBSD_4_9_BASE OPENBSD_5_0_BASE OPENBSD_5_1_BASE OPENBSD_5_2_BASE OPENBSD_5_3_BASE OPENBSD_5_4_BASE
# 1.15 31-Dec-2010 guenther

Change <sys/types.h> to <sys/param.h> instead of assuming that some
system header pulls the latter in

ok millert@


Revision tags: OPENBSD_4_7_BASE OPENBSD_4_8_BASE
# 1.14 02-Nov-2009 claudio

Another routing daemon that gets IMSG_CTL_LOG_VERBOSE to allow toggeling of
log_debug(). ok michele, henning, sthen


# 1.13 18-Sep-2009 michele

Make kroute code routing priority aware.

ok claudio@


Revision tags: OPENBSD_4_6_BASE
# 1.12 06-Jun-2009 eric

make ripctl/ripd imsg-in-a-lib ready too.

ok pyr@


# 1.11 31-May-2009 jacekm

Remove redundant imsg_event_add calls; ok claudio@


# 1.10 31-May-2009 claudio

Better EV_READ and EV_WRITE handling in the libevent callbacks. Again mostly
the same ospfd diff applied with some fuzz.


Revision tags: OPENBSD_4_3_BASE OPENBSD_4_4_BASE OPENBSD_4_5_BASE
# 1.9 24-Oct-2007 claudio

The metric is a 8bit value ranging from 1 to INFINITY (defined as a whopping
16). So use u_int8_t everywhere.


# 1.8 24-Oct-2007 claudio

Sync a bit more with ospfd. Do not fatal if one of the pipes is closed,
instead do a "nice" shutdown. Ignore SIGHUP in the childs even though we
have no reload support (yet). Remove some redundant code and clean up some
types.


# 1.7 18-Oct-2007 deraadt

spacing


Revision tags: OPENBSD_4_2_BASE
# 1.6 09-Apr-2007 michele

Improve the handling of "counting to infinity" mechanism and add an heuristic
higly recommended in the rfc.

tested by me and OK claudio@


# 1.5 31-Mar-2007 michele

Some code cleanups. Added one lint command, removed one unused function and
some other cosmetics.


Revision tags: OPENBSD_4_1_BASE
# 1.4 24-Jan-2007 claudio

Ingore SIGPIPE in the parent and rde as well. This is needed to correctly
report crashes. Discussed with norby@


# 1.3 08-Jan-2007 claudio

New redistribute code adapted from ospfd. It is now possible to do the same
redistribute setups as in ospfd (rtlables, per prefix, negation).
Tested, input and OK michele@


# 1.2 24-Oct-2006 david

spelling and typo fixes


# 1.1 18-Oct-2006 norby

Welcome ripd
started by Michele Marchetto some time ago by using the imsg/three process framework
of ospfd. He implemented most of the daemon with a little help and guidance from
Claudio and I.

Currently the daemon is more or less complete, with the exception of key lifetime
and rollover.

Not yet connected to the builds.
OK claudio@


# 1.24 19-Jan-2021 claudio

Make the struct imsgev structs static and with that ripd -fno-common clean.


# 1.23 19-Jan-2021 claudio

Remove the PROC_* enums and ripd_process, they are no longer needed.
Instead assign the process name directly to log_procname which was
the last user of ripd_process.


Revision tags: OPENBSD_6_5_BASE OPENBSD_6_6_BASE OPENBSD_6_7_BASE OPENBSD_6_8_BASE
# 1.22 04-Nov-2018 remi

Pledge ripe and rde.
Use unveil to remove file system access for the parent proc.

Also remove control_cleanup as discussed on tech@. It allows to fully remove
fs access (ripd does not support reload). It's not an issue for ripd and
ripctrl if an unused socket file is lying around.

reads OK for claudio@ and mestre@


Revision tags: OPENBSD_6_1_BASE OPENBSD_6_2_BASE OPENBSD_6_3_BASE OPENBSD_6_4_BASE
# 1.21 03-Sep-2016 renato

Simplify shutdown process.

On shutdown, there's no need to use kill(2) to kill the child
processes. Just closing the IPC sockets will make the children receive
an EOF, break out from the event loop and then exit.

Tha advantages of this "pipe teardown" are:
* simpler code;
* no need to pledge "proc" in the parent process;
* removal of a (hard to trigger) PID reuse race condition.

ok benno@ claudio@


# 1.20 02-Sep-2016 benno

work on making log.c similar in all daemons:

move daemon-local functions into new logmsg.c, and reduce
the (mostly whitespace) differences so that log.c's can be diffed easily.

ok claudio@, feedback from henning@, deraadt@, reyk@


Revision tags: OPENBSD_5_9_BASE OPENBSD_6_0_BASE
# 1.19 05-Dec-2015 claudio

EAGAIN handling for imsg_read. OK henning@ benno@


Revision tags: OPENBSD_5_7_BASE OPENBSD_5_8_BASE
# 1.18 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_6_BASE
# 1.17 12-Jul-2014 krw

Close connections when msgbuf_write() returns 0.

ok claudio@


Revision tags: OPENBSD_5_5_BASE
# 1.16 19-Nov-2013 benno

handle msgbuf_write() returning EAGAIN

"looks right" deraadt and sthen.


Revision tags: OPENBSD_4_9_BASE OPENBSD_5_0_BASE OPENBSD_5_1_BASE OPENBSD_5_2_BASE OPENBSD_5_3_BASE OPENBSD_5_4_BASE
# 1.15 31-Dec-2010 guenther

Change <sys/types.h> to <sys/param.h> instead of assuming that some
system header pulls the latter in

ok millert@


Revision tags: OPENBSD_4_7_BASE OPENBSD_4_8_BASE
# 1.14 02-Nov-2009 claudio

Another routing daemon that gets IMSG_CTL_LOG_VERBOSE to allow toggeling of
log_debug(). ok michele, henning, sthen


# 1.13 18-Sep-2009 michele

Make kroute code routing priority aware.

ok claudio@


Revision tags: OPENBSD_4_6_BASE
# 1.12 06-Jun-2009 eric

make ripctl/ripd imsg-in-a-lib ready too.

ok pyr@


# 1.11 31-May-2009 jacekm

Remove redundant imsg_event_add calls; ok claudio@


# 1.10 31-May-2009 claudio

Better EV_READ and EV_WRITE handling in the libevent callbacks. Again mostly
the same ospfd diff applied with some fuzz.


Revision tags: OPENBSD_4_3_BASE OPENBSD_4_4_BASE OPENBSD_4_5_BASE
# 1.9 24-Oct-2007 claudio

The metric is a 8bit value ranging from 1 to INFINITY (defined as a whopping
16). So use u_int8_t everywhere.


# 1.8 24-Oct-2007 claudio

Sync a bit more with ospfd. Do not fatal if one of the pipes is closed,
instead do a "nice" shutdown. Ignore SIGHUP in the childs even though we
have no reload support (yet). Remove some redundant code and clean up some
types.


# 1.7 18-Oct-2007 deraadt

spacing


Revision tags: OPENBSD_4_2_BASE
# 1.6 09-Apr-2007 michele

Improve the handling of "counting to infinity" mechanism and add an heuristic
higly recommended in the rfc.

tested by me and OK claudio@


# 1.5 31-Mar-2007 michele

Some code cleanups. Added one lint command, removed one unused function and
some other cosmetics.


Revision tags: OPENBSD_4_1_BASE
# 1.4 24-Jan-2007 claudio

Ingore SIGPIPE in the parent and rde as well. This is needed to correctly
report crashes. Discussed with norby@


# 1.3 08-Jan-2007 claudio

New redistribute code adapted from ospfd. It is now possible to do the same
redistribute setups as in ospfd (rtlables, per prefix, negation).
Tested, input and OK michele@


# 1.2 24-Oct-2006 david

spelling and typo fixes


# 1.1 18-Oct-2006 norby

Welcome ripd
started by Michele Marchetto some time ago by using the imsg/three process framework
of ospfd. He implemented most of the daemon with a little help and guidance from
Claudio and I.

Currently the daemon is more or less complete, with the exception of key lifetime
and rollover.

Not yet connected to the builds.
OK claudio@


Revision tags: OPENBSD_6_5_BASE
# 1.22 04-Nov-2018 remi

Pledge ripe and rde.
Use unveil to remove file system access for the parent proc.

Also remove control_cleanup as discussed on tech@. It allows to fully remove
fs access (ripd does not support reload). It's not an issue for ripd and
ripctrl if an unused socket file is lying around.

reads OK for claudio@ and mestre@


Revision tags: OPENBSD_6_1_BASE OPENBSD_6_2_BASE OPENBSD_6_3_BASE OPENBSD_6_4_BASE
# 1.21 03-Sep-2016 renato

Simplify shutdown process.

On shutdown, there's no need to use kill(2) to kill the child
processes. Just closing the IPC sockets will make the children receive
an EOF, break out from the event loop and then exit.

Tha advantages of this "pipe teardown" are:
* simpler code;
* no need to pledge "proc" in the parent process;
* removal of a (hard to trigger) PID reuse race condition.

ok benno@ claudio@


# 1.20 02-Sep-2016 benno

work on making log.c similar in all daemons:

move daemon-local functions into new logmsg.c, and reduce
the (mostly whitespace) differences so that log.c's can be diffed easily.

ok claudio@, feedback from henning@, deraadt@, reyk@


Revision tags: OPENBSD_5_9_BASE OPENBSD_6_0_BASE
# 1.19 05-Dec-2015 claudio

EAGAIN handling for imsg_read. OK henning@ benno@


Revision tags: OPENBSD_5_7_BASE OPENBSD_5_8_BASE
# 1.18 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_6_BASE
# 1.17 12-Jul-2014 krw

Close connections when msgbuf_write() returns 0.

ok claudio@


Revision tags: OPENBSD_5_5_BASE
# 1.16 19-Nov-2013 benno

handle msgbuf_write() returning EAGAIN

"looks right" deraadt and sthen.


Revision tags: OPENBSD_4_9_BASE OPENBSD_5_0_BASE OPENBSD_5_1_BASE OPENBSD_5_2_BASE OPENBSD_5_3_BASE OPENBSD_5_4_BASE
# 1.15 31-Dec-2010 guenther

Change <sys/types.h> to <sys/param.h> instead of assuming that some
system header pulls the latter in

ok millert@


Revision tags: OPENBSD_4_7_BASE OPENBSD_4_8_BASE
# 1.14 02-Nov-2009 claudio

Another routing daemon that gets IMSG_CTL_LOG_VERBOSE to allow toggeling of
log_debug(). ok michele, henning, sthen


# 1.13 18-Sep-2009 michele

Make kroute code routing priority aware.

ok claudio@


Revision tags: OPENBSD_4_6_BASE
# 1.12 06-Jun-2009 eric

make ripctl/ripd imsg-in-a-lib ready too.

ok pyr@


# 1.11 31-May-2009 jacekm

Remove redundant imsg_event_add calls; ok claudio@


# 1.10 31-May-2009 claudio

Better EV_READ and EV_WRITE handling in the libevent callbacks. Again mostly
the same ospfd diff applied with some fuzz.


Revision tags: OPENBSD_4_3_BASE OPENBSD_4_4_BASE OPENBSD_4_5_BASE
# 1.9 24-Oct-2007 claudio

The metric is a 8bit value ranging from 1 to INFINITY (defined as a whopping
16). So use u_int8_t everywhere.


# 1.8 24-Oct-2007 claudio

Sync a bit more with ospfd. Do not fatal if one of the pipes is closed,
instead do a "nice" shutdown. Ignore SIGHUP in the childs even though we
have no reload support (yet). Remove some redundant code and clean up some
types.


# 1.7 18-Oct-2007 deraadt

spacing


Revision tags: OPENBSD_4_2_BASE
# 1.6 09-Apr-2007 michele

Improve the handling of "counting to infinity" mechanism and add an heuristic
higly recommended in the rfc.

tested by me and OK claudio@


# 1.5 31-Mar-2007 michele

Some code cleanups. Added one lint command, removed one unused function and
some other cosmetics.


Revision tags: OPENBSD_4_1_BASE
# 1.4 24-Jan-2007 claudio

Ingore SIGPIPE in the parent and rde as well. This is needed to correctly
report crashes. Discussed with norby@


# 1.3 08-Jan-2007 claudio

New redistribute code adapted from ospfd. It is now possible to do the same
redistribute setups as in ospfd (rtlables, per prefix, negation).
Tested, input and OK michele@


# 1.2 24-Oct-2006 david

spelling and typo fixes


# 1.1 18-Oct-2006 norby

Welcome ripd
started by Michele Marchetto some time ago by using the imsg/three process framework
of ospfd. He implemented most of the daemon with a little help and guidance from
Claudio and I.

Currently the daemon is more or less complete, with the exception of key lifetime
and rollover.

Not yet connected to the builds.
OK claudio@