ofproto_flush_flows() deletes all the flows from the flow table, even the
ones added by in-band control. If that happens we need to add them back
in.
This should be the only place that the in-band control rules can get
deleted, since their priorities are such that the controller cannot see
or modify them.
}
}
+void
+in_band_flushed(struct in_band *in_band)
+{
+ int i;
+
+ for (i = 0; i < N_IB_RULES; i++) {
+ in_band->rules[i].installed = false;
+ }
+}
+
int
in_band_create(struct ofproto *ofproto,
struct dpif *dpif, struct switch_status *ss,
void in_band_destroy(struct in_band *);
void in_band_run(struct in_band *);
void in_band_wait(struct in_band *);
+void in_band_flushed(struct in_band *);
#endif /* in-band.h */
{
classifier_for_each(&ofproto->cls, CLS_INC_ALL, destroy_rule, ofproto);
dpif_flow_flush(&ofproto->dpif);
+ if (ofproto->in_band) {
+ in_band_flushed(ofproto->in_band);
+ }
}
\f
static void