void
ofproto_set_probe_interval(struct ofproto *p, int probe_interval)
{
- if (probe_interval) {
- rconn_set_probe_interval(p->controller->rconn, probe_interval);
- if (p->fail_open) {
- fail_open_set_trigger_duration(p->fail_open, probe_interval * 3);
- }
+ probe_interval = probe_interval ? MAX(probe_interval, 5) : 0;
+ rconn_set_probe_interval(p->controller->rconn, probe_interval);
+ if (p->fail_open) {
+ int trigger_duration = probe_interval ? probe_interval * 3 : 15;
+ fail_open_set_trigger_duration(p->fail_open, trigger_duration);
}
}
void
ofproto_set_max_backoff(struct ofproto *p, int max_backoff)
{
- if (max_backoff) {
- rconn_set_max_backoff(p->controller->rconn, max_backoff);
- }
+ rconn_set_max_backoff(p->controller->rconn, max_backoff);
}
void