#include <arpa/inet.h>
#include <stdlib.h>
#include "ofpbuf.h"
-#include "openflow.h"
+#include "openflow/openflow.h"
#include "poll-loop.h"
#include "queue.h"
#include "rconn.h"
return false;
}
+ if (opi->reason == OFPR_ACTION) {
+ /* Don't rate-limit 'ofp-packet_in's generated by flows that the
+ * controller set up. XXX we should really just rate-limit them
+ * *separately* so that no one can flood the controller this way. */
+ return false;
+ }
+
if (!rl->n_queued && get_token(rl)) {
/* In the common case where we are not constrained by the rate limit,
* let the packet take the normal path. */
void
rate_limit_start(struct secchan *secchan, const struct settings *s,
- struct switch_status *ss,
- struct rconn *local, struct rconn *remote)
+ struct switch_status *ss, struct rconn *remote)
{
struct rate_limiter *rl;
size_t i;