summaryrefslogtreecommitdiff
path: root/usr.sbin/ospfd
AgeCommit message (Collapse)Author
2009-06-08revert this change by eric@:David Gwynne
Make the imsg protocol network-safe. it might be network safe, but half the imsg based daemons on my firewalls dont run anymore.
2009-06-07Change the way fds passed over a socket are retreived on the receiving side.Eric Faurot
Currently the receiver fetches an imsg via imsg_get() and if he expects an fd, he then calls imsg_get_fd() to fetch the next fd queued on the imsgbuf from which the imsg came. This changes hides the fd queueing mechanism to the API user. When closing an imsg with an fd, the message is flagged so that the receiving end knows it must dequeue the fd in imsg_get() and return it with the imsg structure. This way there is no (less) possible screw up from imsg_get_fd() not being called directly after imsg_get() by the user. The retreived imsg is self-contained. ok pyr@, "I like that" henning@
2009-06-07Make the imsg protocol network-safe.Eric Faurot
ok pyr@
2009-06-06change the imsg header fields a bit to prepare for upcoming changes.Eric Faurot
add a flag field, use u_int32_t for pid_t and extend type to 32 bits for padding. ok pyr@
2009-06-06Get ready for including imsg.h from a lib, when it comes along.Pierre-Yves Ritschard
2009-06-06sync ospfctl/ospfd with the common imsg code, making it lib ready as well.Eric Faurot
"looks ok" claudio@
2009-06-06remove unnecessary and scary pid check in imsg_init.Pierre-Yves Ritschard
ok eric@, claudio@
2009-06-05rtm->rtm_hdrlen conversionChris Cappuccio
ok claudio@, henning@
2009-06-05bring buf_write here as well.Pierre-Yves Ritschard
2009-06-05Add an unused data field, to allow smtpd and ypldap to work, all libPierre-Yves Ritschard
ready daemons have NULL diffs now for the imsg files. This field should eventually die a honorable death as it was a design screwup.
2009-06-05bump MAX_IMSGSIZE to 16384, this will make smtpd happy later on.Pierre-Yves Ritschard
2009-06-05make ospfd's imsg lib ready as well.Pierre-Yves Ritschard
ok claudio@
2009-06-05Preliminary rdomain support, all hacked up by reyk@Claudio Jeker
2009-06-05treat buf->wpos as the size to send out on the wire, not buf->size,Pierre-Yves Ritschard
this plays better with dynamic buffers which are now the norm. ok by a slightly annoyed claudio@, ok eric@
2009-06-05don't mess with buffer internals,Pierre-Yves Ritschard
ok claudio@
2009-06-02Track reject and blackhole routes and allow them to be redistributed evenClaudio Jeker
though they point to the loopback. Mainly used for redistribute default since on default free routers we need to have a fake route now. After discussion with Tonnerre Lombard, idea OK henning@
2009-05-31Remove redundant imsg_event_add calls; ok claudio@Jacek Masiulaniec
2009-05-31The libevent callback function may be called with EV_READ and EV_WRITEClaudio Jeker
set at the same time so using a switch to do read or write is a bad idea. Problem noticed by Eygene Ryabinkin on FreeBSD for some reasons it is not triggered on OpenBSD. Fix aggreed by a most other libevent hackers
2009-05-15Do not ignore the route metric for "redistribute default".Marco Pfatschbacher
Got broken in -r 1.62. Pointed out by bluhm@ OK bluhm@, claudio@
2009-04-26comment typos; no binary changeStuart Henderson
2009-04-07allow to specify an alternate control socket instead of /var/run/ospfd.sock.Reyk Floeter
this is required to run multiple instances of ospfd. ok claudio@
2009-03-31Fixed memory leaks which would occur if the second of two memoryTobias Stoeckmann
allocations fails. looks right deraadt, krw ok henning
2009-03-29Key-Id 0 is not only not available on Cisco devices but also on other devices.Claudio Jeker
Make this a more general concern about using 0 as key id. After discussion with Tamas TEVESZ
2009-03-27Allow the announcement of default route also via redistribute 0.0.0.0/0Michele Marchetto
and route labels. ok claudio@
2009-03-24Change the behaviour of redistribute default.Michele Marchetto
Now a default route have to be present in the fib to be correctly advertised. Spotted and tested by Steven Surdok on ripd. ok claudio@
2009-03-13When commiting the buf_left() change adding len to the check was dropped andClaudio Jeker
so a warning later on could be hit in some cases. Found by dlg@ OK dlg@
2009-03-04Introduce and use buf_size(buf) instead of buf->wpos -- at least in the nonClaudio Jeker
buf/imsg specific code. buf_close() will no force a truncation of the buffer to the wpos but actually add code in imsg.c to detect and report such silly behaviour. Makes the buf API a bit more sane.
2009-03-01Print the correct function name in log_debug().Michele Marchetto
OK claudio@ stsp@
2009-02-25Fix an invalid pointer dereference in control_close(). If control_connbyfd()Claudio Jeker
fails -- which should never happen -- the function does not return and is accession the NULL set control pointer later on. Found by Matthew Haub. OK deraadt@
2009-01-31write point-to-point in a consistent way.Igor Sobrado
jmc@ has provided a complete list of manual pages to be fixed, and suggested using uppercase (i.e., Point-to-Point) when discussing the protocol, and lowercase (point-to-point) otherwise. ok jmc@
2009-01-31Implement buf_left() to make some some more buffer handling easier.Claudio Jeker
buf_left() returns the bytes left in a buffer. This makes the check to keep MD5_DIGEST_LENGTH bytes unallocated in some messages easier. From the buf cleanup diff that was OK norby@ and henning@
2009-01-31Pass the buffer to send_packet() instead of spliting it up. This removesClaudio Jeker
some direct access to struct buf internals in the rest of ospfe. Based on a larger buffer cleanup diff that was OK norby@ henning@
2009-01-27No need to check if neighbor exists before adding itMichele Marchetto
as it is already done in rde_nbr_new(). ok claudio@ stsp@
2009-01-26We acutally use the lowest IP configured as router-id if none is specified.Claudio Jeker
2009-01-26First convert IP addresses to host-byte-order before checking which one isClaudio Jeker
smaller. Additionally fix the check to find the lowest configured IP as suggested by the RFC. Found with stsp@
2009-01-16fix last updateJoerg Goltermann
OK claudio@ henning@
2009-01-08Fix use after free of kr. Happend when the first loop removed the headClaudio Jeker
element without updating the kr pointer which was later on used again. Found by david@. OK norby@
2009-01-08Include the neighbor ID in a debug output so that it is clear which routerClaudio Jeker
is sendingf the duplicate entries. OK norby@
2009-01-08tweak previous; feedback/ok claudioJason McIntyre
2009-01-07Full stub area support. This allows ABRs to announce a default networkClaudio Jeker
summary LSA into stub areas so that these routers are able to reach the outside of the area. OK norby@
2009-01-06Remove workaround added in rev 1.63. The real issue has been found andClaudio Jeker
fixed and the bandaid is no longer needed. See rev. 1.26 of sys/net/radix.c
2009-01-01Remove some other useless debug messages that just add unneeded noise.Claudio Jeker
2009-01-01Call kr_shutdown() before exit even in config test mode and config parseClaudio Jeker
error case.
2009-01-01Move initialisation of krt into kif_init so that it is possible to callClaudio Jeker
kr_shutdown() after kif_init().
2008-12-17Add a workaround for some crazyness that happens if a cloning route has aClaudio Jeker
low priority gateway route below itself plus a carp interface on the same network. The result is that some arp entries can't be added. This is a bandaid that will give me time to figure out the real bug.
2008-12-12Make the kroute code routing priority aware. This solves a few issues andClaudio Jeker
makes to code simpler. While the routing table is somewhat simpler the redistribution code does not allow a much more radical approach. With some additional help of Mr. Kernel and his rtsock it should be possible to rip even more code out of kroute.c. Tested and OK sthen@, gollo@
2008-11-24Initial support for stub areas. The bit still missing is the redistributionClaudio Jeker
of the default summary net lsa on ABRs but that is comming. OK norby@
2008-11-21Kill some old debug messages that are no longer needed.Claudio Jeker
2008-11-21imsg_* returns ssize_tClaudio Jeker
2008-10-17bring in the findeol() fix from pfctl. list of affected parsers by sthenHenning Brauer