Branch :
| Author | Commit | Date | CI | Message |
|---|---|---|---|---|
| 54f7e61b | 2011-08-29 23:39:26 | clear read watermark on underlying bufferevent when creating filtering bev to fix potentially failing fragmented ssl handshakes | ||
| e6af35d7 | 2011-08-24 21:39:28 | Correctly terminate IO on an async bufferevent on bufferevent_free | ||
| 4a343943 | 2011-07-26 10:31:18 | Propagate errors on the underlying bufferevent to the user. | ||
| e050703d | 2011-07-04 11:36:14 | Fix bug in SSL bufferevents backed by a bev with a write high-watermarks Original mail: the logic that handles write watermarks in "bio_bufferevent_write" is not working. It currently doesn't write any data if the high watermark is *above* the amount of data to write (i.e. when there is actually enough room available). | ||
| 65707d7c | 2011-04-11 17:40:14 | add some (void) casts for unused variables All these places already have an XXX marker, so we know we need to fix them later. Let's not clutter the static analysis results with them. | ||
| 29f7623c | 2010-11-29 22:14:54 | Possible crash fix when freeing an underlying bufferevent of an openssl bufferevent | ||
| 4f228a1f | 2010-11-14 19:52:18 | Fix bug in bufferevent_connect on an openssl bufferevent that already had an fd The problem was that we were using openssl's BIO code's shutdown flag whenever BEV_OPT_CLOSE_ON_FREE was set. This made the BIO close the socket when it was freed... but it would be freed whenever we did a setfd on the bufferevent_openssl, even the no-op setfd in bufferevent_connect. So instead, we just set the shutdown flag to 0, and handle closing the fd ourselves. Spotted by Linus Nordberg | ||
| 1ac5b230 | 2010-11-09 15:18:59 | Only clear underlying callbacks when the user hasn't reset them. | ||
| fc7b1b00 | 2010-11-09 11:43:47 | When closing a filtering bufferevent, clear callbacks on the underlying bufferevent Previously, if BEV_OPT_CLOSE_ON_FREE wasn't set on a bufferevent_filter or a filtering bufferevent_openssl, when we went to free the filtering bufferevent, we'd leave the underlying bufferevent unchanged. That's not so good, since the callbacks are set to activate stuff in the filtering bufferevent that we're about to free. Instead, set all the callbacks to NULL. | ||
| 1213d3dd | 2010-10-20 13:41:02 | Fix a 100%-CPU bug where an SSL connection would sometimes never stop trying to write If an SSL connection becamse disabled or suspended before became open, it could (under the right circumstances) wind up without ever getting its write callback disabled. The most correct fix is probably more subtle, and involves checking all caseswhen a write callback is enabled or disabled. This fix is more blunt, and explicitly checks whether the callback should have been disabled at the end of the callback to prevent infinite looping. Diagnosed with help from Sebastian Hahn | ||
| 93bb7d8e | 2010-10-14 11:41:10 | Fix a case where an ssl bufferevent with CLOSE_ON_FREE didn't close its fd This could happen when we got an SSL with a BIO already set on it. | ||
| 223ee40f | 2010-10-14 10:53:26 | Avoid spurious reads from just-created open openssl bufferevents When handshaking, we listen for reads or writes from the transport. But when we're connected, we start out with writes enabled and reads disabled, which means we should not have the transport read for us. | ||
| ac27eb82 | 2010-10-08 00:59:02 | Correct logic on disabling underlying bufferevents when disabling a filter Previously, whenever writing was disabled on a bufferevent_filter (or a filtering SSL bufferevent), we would stop writing on the underlying bufferevent. This would make for trouble, though, since if you implemented common patterns like "stop writing once data X has been flushed", your bufferevent filter would disable the underlying bufferevent after the data was flushed to the underlying bufferevent, but before actually having it written to the network. Now, we have filters leave their underlying bufferevents enabled for reading and writing for reading and writing immediately. They are not disabled, unless the user wants to disable them, which is now allowed. To handle the case where we want to choke reading on the underlying bufferevent because the filter no longer wants to read, we use bufferevent_suspend_read(). This is analogous to the way that we use bufferevent_suspend_write() to suspend writing on a filtering bufferevent when the underlying bufferevent's output buffer has hit its high watermark. | ||
| 819b1715 | 2010-10-12 12:59:13 | Handle rate-limiting for reading on OpenSSL bufferevents correctly. We were looking at the number of bytes read on the wbio, not in the rbio. But these are usually different BIOs, and the reading is supposed to happen on the rbio. | ||
| 743f8665 | 2010-08-23 11:48:46 | Honor NDEBUG; build without warnings with NDEBUG; make NDEBUG always-off in unit test code | ||
| ec347b92 | 2010-07-07 16:45:03 | Move event-config.h to include/event2 This change means that all required include files are in event2, and all files not in event2/* are optional. | ||
| 009f3005 | 2010-08-04 14:54:38 | Fix rate-limit calculation on openssl bufferevents. When you're doing rate limiting on an openssl connection, you nearly always want to limit the number of bytes sent and received over the wire, not the number of bytes read or written over the secure transport. | ||
| c9913174 | 2010-07-19 15:31:19 | Change bufferevent_openssl::do_write so it doesn't call SSL_write with a 0 length buffer I was running into a problem when using bufferevent_openssl with a very simple echo server. My server simply bufferevent_read_buffer 'd data into an evbuffer and then passed that evbuffer straight to bufferevent_write_buffer. The problem was every now and again the write would fail for no apparent reason. I tracked it down to SSL_write being called with the amount of data to send being 0. This patch alters do_write in bufferevent_openssl so that it skips io_vecs with 0 length. | ||
| 657d1b6d | 2010-03-13 01:06:57 | Set mem_offset for every bufferevent type | ||
| 75018951 | 2010-03-13 00:23:06 | Fix a possible double-free bug in SSL bufferevents with CLOSE_ON_FREE With CLOSE_ON_FREE set, we were telling the BIO to free the bufferevent when it was closed, and also freeing it ourselves. | ||
| f1bc125e | 2010-03-12 23:00:49 | Improve robustness for refcounting Document that we do intend to double-decref underlying bufferevents under some circumstances. Check to make sure that we don't decref past 0. | ||
| 17efc1cd | 2010-03-04 01:25:51 | Update all our copyright notices to say "2010" | ||
| d3288293 | 2010-02-20 18:44:35 | Provide consistent, tested semantics for bufferevent timeouts The different bufferevent implementations had different behavior for their timeouts. Some of them kept re-triggering the timeouts indefinitely; some disabled the event immediately the first time a timeout triggered. Some of them made the timeouts only count when the bufferevent was actively trying to read or write; some did not. The new behavior is modeled after old socket bufferevents, since they were here first and their behavior is relatively sane. Basically, each timeout disables the bufferevent's corresponding read or write operation when it fires. Timeouts are stopped whenever we suspend writing or reading, and reset whenever we unsuspend writing or reading. Calling bufferevent_enable resets a timeout, as does changing the timeout value. | ||
| e5bbd40a | 2010-02-18 17:41:15 | Clean up formatting: use tabs, not 8-spaces, to indent. | ||
| ff3f6cd4 | 2010-01-22 16:14:49 | Check more internal event_add() calls for failure Most of these should be unable to fail, since adding a timeout generally always works. Still, it's better not to try to be "too smart for our own good here." There are some remaining event_add() calls that I didn't add checks for; I've marked those with "XXXX" comments. | ||
| ba2945f9 | 2010-01-06 17:59:44 | Merge branch 'ratelimit' Conflicts: bufferevent_async.c | ||
| 2e8eeea3 | 2009-12-29 19:50:03 | Fix crash bugs when a bufferevent's eventcb is not set. In many places throughout the code, we called _bufferevent_run_eventcb without checking whether the eventcb was actually set. This would work fine when the bufferevent's callbacks were deferred, but otherwise the code would segfault. Strangely, we always remembered to check before calling the _bufferevent_run_{read,write}cb functions. To prevent similar errors in the future, all of _buferevent_run_{read,write,event}cb now check to make sure the callback is actually set before invoking or deferring the callback. This patch also removes the now-redundant checks for {read,write}cb. | ||
| 82743794 | 2009-12-24 17:47:14 | Do not make bufferevent_setfd implicitly disable EV_READ and EV_WRITE. This obviates the need for BEV_SUSPEND_CONNECTING, and good riddance. | ||
| 737c9cd8 | 2009-11-27 13:16:54 | Rate-limiting for bufferevents; group and individual limits are supported. The fairness algorithms are not the best, not every bufferevent type is supported, and some of the locking tricks here are simply absurd. Still, this code should be a good first step. | ||
| a773df54 | 2009-12-18 16:24:41 | Fix a segfault when freeing SSL bufferevents in an unusual order Have container bufferevents hold a reference to their underlying bufferevents. (Commit message and minor revisions by nickm.) | ||
| a6adeca7 | 2009-12-17 12:38:46 | Fix a segfault when writing a very fragmented evbuffer onto an SSL Fixes bug 2916328. | ||
| 26573d3d | 2009-11-09 19:37:15 | Change an err to a warn in bufferevent_openssl svn:r1523 | ||
| 784b8773 | 2009-11-06 21:46:57 | We do not work any more without an event-config.h; stop pretending that it is meaningful to check for HAVE_CONFIG_H svn:r1516 | ||
| 34f28e08 | 2009-11-05 15:57:22 | Fix a few types to use compatible versions svn:r1501 | ||
| 516452b7 | 2009-10-30 21:08:29 | Keep openssl errors associated with the right bufferevent object. OpenSSL has a per-thread error stack, and really doesn't like you leaving errors on the stack. Rather than discard the errors or force the user to handle them, this patch pulls them off the openssl stack and puts them on a stack associated with the bufferevent_openssl. If the user leaves them on the stack then, it won't affect any other connections. This bug was found by Roman Puls. Thanks! svn:r1481 | ||
| 2e36dbe1 | 2009-10-26 20:00:43 | Use EVUTIL_ASSERT() consistently instead of assert. svn:r1464 | ||
| b73ad7bc | 2009-10-21 18:48:22 | Treat the bitwise OR of two enum values as an int. This makes our interfaces usable from C++, which doesn't believe you can say "bufferevent_socket_nase(base, -1, BEV_OPT_CLOSE_ON_FREE|BEV_OPT_DEFER_CALLBACKS)" but which instead would demand "static_cast<bufferevent_options>(BEV_OPT_CLOSE_ON_FREE| BEV_OPT_DEFER_CALLBACKS))" for the last argument. Diagnosis and patch from Chris Davis. svn:r1456 | ||
| e3fd294a | 2009-10-16 13:19:57 | Spelling fixes in comments and strings. svn:r1445 | ||
| f2282398 | 2009-08-14 20:07:35 | New function to put an SSL bufferevent into a renegotiating state. svn:r1418 | ||
| 46a61869 | 2009-08-14 20:07:17 | Disable whichever struct event we don't want during ssl handshaking. svn:r1417 | ||
| 58b0708e | 2009-08-14 20:07:09 | Only send a connected event _after_ we've adjusted the SSL state. This is important if the callback adjusts it to something else. svn:r1416 | ||
| cf54d74a | 2009-07-30 20:41:41 | More unit tests for Openssl, including initializing with no socket. Up to 75% coverage. svn:r1399 | ||
| 7a2a51a3 | 2009-07-30 20:41:21 | Add unit tests for SSL session renegotiation. This tickles the write-blocked-on-read code, and in this case turned up a bug in it. svn:r1397 | ||
| 595f7e38 | 2009-07-30 20:41:12 | Always retry SSL_write() with the same number you told it last time. svn:r1396 | ||
| eecefc50 | 2009-07-30 20:41:00 | Add a function to extract the SSL object from a bufferevent_openssl. svn:r1395 | ||
| d5a3f1f1 | 2009-07-30 20:40:50 | Set the SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER flag, and explain why. svn:r1394 | ||
| 44715517 | 2009-07-30 20:40:40 | Use SSL_do_handshake in place of SSL_connect/SSL_accept svn:r1393 | ||
| 709c21c4 | 2009-07-28 04:03:57 | Bufferevent support for openssl. This code adds a new Bufferevent type that is only compiled when the openssl library is present. It supports using an SSL object and an event alert mechanism, which can either be an fd or an underlying bufferevent. There is still more work to do: the unit tests are incomplete, and we need to support flush and shutdown much better. Sometimes events are generated needlessly: this will hose performance. There's a new encrypting proxy in sample/le-proxy.c. This code has only been tested on OSX, and nowhere else. svn:r1382 |