If no controllers are specified on the command-line, ovs-openflowd adds
a couple of its own. The code that accounts for the controllers
correctly allocated space for them, but used the command-line count to
determine how many to set. This led to a segfault when later code tried
to dereference them.
Reported-by: Derek Cormier <derek.cormier@lab.ntt.co.jp>
Brandon Heller brandonh@stanford.edu
Bryan Fulton bryan@nicira.com
Cedric Hobbs cedric@nicira.com
+Derek Cormier derek.cormier@lab.ntt.co.jp
Ghanem Bahri bahri.ghanem@gmail.com
Henrik Amren henrik@nicira.com
Jad Naous jnaous@gmail.com
/* Set up controllers. */
s->n_controllers = controllers.n;
s->controllers = xmalloc(s->n_controllers * sizeof *s->controllers);
- if (argc > 1) {
- for (i = 0; i < s->n_controllers; i++) {
- s->controllers[i] = controller_opts;
- s->controllers[i].target = controllers.names[i];
- }
+ for (i = 0; i < s->n_controllers; i++) {
+ s->controllers[i] = controller_opts;
+ s->controllers[i].target = controllers.names[i];
}
/* Sanity check. */