summaryrefslogtreecommitdiff
path: root/usr.sbin
AgeCommit message (Collapse)Author
2016-09-03Remove the oh so funny "LOSS OF MIND" from the diclaimer that was notReyk Floeter
part of the original ISC license that we use in OpenBSD. Done for files were Henning is the original author. OK henning@ deraadt@
2016-09-03As vmm(4) can now exit to vmd at any time to process pending interrupts,Mike Larkin
don't kill the VM if we are presented with an exit type that is not something we directly need to handle. Instead, simply re-enter the guest, possibly injecting an interrupt along the way. Still exit the process if presented with a triple fault, until we implement reboot support. ok stefan@
2016-09-03fix some wrong interrupt code that doesn't fit with the new modelMike Larkin
ok stefan@
2016-09-03Adding a clean up block to vioblk_notifyq() and vionet_enq_rx()Nayden Markatchev
OK mlarkin@
2010-01-15NSD v3.2.4Jakob Schlyter
2016-09-03Simplify shutdown process.Renato Westphal
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@
2016-09-03Simplify shutdown process.Renato Westphal
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@
2016-09-03Simplify shutdown process.Renato Westphal
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@
2016-09-03Make error handling in config_getvm() more robustStefan Kempf
Open all fds first before sending messages to the vmm process. This prevents some intermediate state from being generated that will confuse vmm if it gets further messages. Also make sure that vmctl gets the right error reason later by saving errno upon a failure. ok reyk@ mlarkin@
2016-09-03Use DPRINTF instead of #ifdef DEBUG + log_debug().Reyk Floeter
Pointed out by benno@
2016-09-02work on making log.c similar in all daemons:Sebastian Benoit
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@
2016-09-02Fix small memleak on error path.Renato Westphal
2016-09-02Make tcpdump print details about association requests in verbose mode.Stefan Sperling
Refactor such that we can share some of the code for beacon printing. ok sthen@
2016-09-02lde() and ldpe() should return void.Renato Westphal
Remove these leftovers from the pre-fork+exec era. Spotted by and ok rzalamena@ ok claudio@
2016-09-02Process incoming com data asynchronously to running VCPUStefan Kempf
This registers a handler with libevent that is triggered on incoming data on the com port. ok mlarkin@
2016-09-02Process incoming host->guest packets asynchronously to running VCPUStefan Kempf
This registers a handler with libevent that is called on incoming packets for the guest. If they cannot be handled immediately (because the virtq is full), make sure they are handled on VCPU exits. ok mlarkin@
2016-09-02Improve logging of sent and received messages.Renato Westphal
* Standardize the logging format of sent and received messages: "msg-[in|out]: message type: lsr-id A.B.C.D [additional info]"; * Log sent label messages as well, not only the received ones; * Move the logging of sent notification messages from send_notification_nbr() to send_notification_full(), this way notification triggered by the lde process are logged as well; * Minor clean-up.
2016-09-02Reevaluate received mappings upon receipt of address message.Renato Westphal
If a neighbor was a nexthop for a given set of prefixes but it's not anymore, then we should uninstall the associated label mappings (if any) from the kernel. The same applies for the other way round (neighbor wasn't a nexthop for a given set of prefixes but now is). This issue is only evident when we have multiple links between a pair of LSRs. Generally, when a link is shut down, the whole LDP is torn down and all label mappings uninstalled automatically. ok claudio@
2016-09-02Simplify shutdown process.Renato Westphal
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 claudio@
2016-09-02Minor tweaksRenato Westphal
2016-09-02Make functions and variables static whenever possible.Renato Westphal
style(9) says: "Function prototypes for private functions (i.e., functions not used elsewhere) go at the top of the first source module. In userland, functions local to one source module should be declared 'static'". The benefits of doing so include: * clean up of the eigrpd global namespace; * improved readability; * more hints to the compiler/linker to generate more efficient code. Additional changes: * Declare all extern variables in header files; * Clean up the indentation of all function prototypes and global variables. ok claudio@ benno@
2016-09-02Use static local variables instead of global variables whenever possible.Renato Westphal
Also, there's no need to zero initialize global and static variables, that's done automatically by the compiler. ok claudio@ benno@
2016-09-02Merge the recv_packet_v[46] functions into one.Renato Westphal
This reduces some code duplication and makes it easier to see the difference between the IPv4 and IPv6 raw sockets API. tweak + ok claudio@, ok benno@
2016-09-02Simplify handling of multicast addresses.Renato Westphal
During the initialization of the eigrpe process, use inet_pton() to store the EIGRP multicast addresses in two global variables: * global.mcast_addr_v4 (in_addr); * global.mcast_addr_v6 (in6_addr). This way we don't need to create temporary in_addr/in6_addr variables everytime we need to use these multicast addresses for something. "I like this" claudio@ ok benno@
2016-09-02Pledge earlier on eigrpe.Renato Westphal
This is for consistency with the other routing daemons. ok claudio@ "earlier is better" benno@
2016-09-02Remove superfluous includes and follow style(9).Renato Westphal
ok claudio@ benno@
2016-09-02Fix broken pipe teardown.Renato Westphal
* Add missing close() calls to actually close the pipes, calling just msgbuf_clean() is not enough; * Bring back some NOTREACHED lint comments. style(9) says they can be removed but in some cases they are useful to humans too; * Add __dead to the shutdown functions; * Some other minor changes to make eigrpd(8) more similar to the other routing daemons.
2016-09-02Move event handling to separate threadStefan Kempf
That allows the main thread to handle the termination of a VM on reboot/shutdown or normal exit. The way it works is that VCPUs that terminate for some reason communicate this to a main thread that takes care of shutdown. ok mlarkin@
2016-09-02work on making log.c similar in all daemons:Sebastian Benoit
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@
2016-09-02Move snmp options into struct relayd_config and delay start of theReyk Floeter
snmp subsystem until the configuration is done. OK benno@ claudio@
2016-09-02Simplify shutdown process.Renato Westphal
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. "reads good" claudio@
2016-09-02Close connections when msgbuf_write() returns 0.Renato Westphal
Pulled from ospfd. Original author: claudio@ ok rzalamena@ benno@ claudio@
2016-09-02Don't fatal if the imsg pipe is closed, this is often triggered in theRenato Westphal
parent and hides the real cause of the termination. Pulled from ospfd. Original author: claudio@ ok rzalamena@ benno@ claudio@
2016-09-02Split "struct relayd" into two structs: "struct relayd" and "structReyk Floeter
relayd_config". This way we can send all the relevant global configuration to the children, not just the flags and the opts. With input from and OK claudio@ benno@
2016-09-02proc_id has been replaced by ps->ps_instance.Reyk Floeter
OK claudio@
2016-09-02work on making log.c similar in all daemons:Sebastian Benoit
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@
2016-09-02work on making log.c similar in all daemons:Sebastian Benoit
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@
2016-09-02work on making log.c similar in all daemons:Sebastian Benoit
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@
2016-09-02work on making log.c similar in all daemons:Sebastian Benoit
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@
2016-09-02work on making log.c similar in all daemons:Sebastian Benoit
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@
2016-09-02use imsg_read_nofd() implementation from bgpd.Eric Faurot
let the caller handle EAGAIN. ok gilles@
2016-09-02use imsg_read_nofd() implementation from bgpd.Eric Faurot
let the caller handle EAGAIN. ok reyk@ gilles@
2016-09-02As done in httpd, (re-)initialize ps_what in all processes. This isReyk Floeter
no functional change at this point.
2016-09-02move links from http to https://www.openbsd.org/Theo Buehler
ok beck
2016-09-02style nit as done in httpdReyk Floeter
2016-09-02As done in httpd, remove ps_ninstances and p_instance.Reyk Floeter
OK benno@ rzalamena@
2016-09-02Terminate relayd using the socket status instead of watching SIGCHLDReyk Floeter
or killing child processes. - Based on rzalamena@'s diff for httpd. OK deraadt@ rzalamena@
2016-09-02proc.c tweaks: Rename proc_listento() to proc_accept() as it is theReyk Floeter
receiving side of proc_connect(). Move some code from main into proc_init(), the function is now called by parent and children, not just the parent and it is less copy + paste for other daemons. OK florian@
2016-09-02turn server preference for ciphers on by defaultGilles Chehade
ok jsing@
2016-09-01normalize some function namesMike Larkin