ovs-dpctl crashed due to uninitialized router classifier. To fix this issue move ovs router initialization to route table module.
Reported-by: Madhu Challa <cha...@noironetworks.com> Signed-off-by: Pravin B Shelar <pshe...@nicira.com> --- lib/ovs-router.c | 2 +- lib/ovs-router.h | 2 +- lib/route-table.c | 1 + ofproto/ofproto-dpif.c | 1 - 4 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/ovs-router.c b/lib/ovs-router.c index ba51614..5f02107 100644 --- a/lib/ovs-router.c +++ b/lib/ovs-router.c @@ -268,7 +268,7 @@ ovs_router_flush(void) /* May not be called more than once. */ void -ovs_router_unixctl_register(void) +ovs_router_init(void) { classifier_init(&cls, NULL); unixctl_command_register("ovs/route/add", "ipv4_addr/prefix_len out_br_name gw", 2, 3, diff --git a/lib/ovs-router.h b/lib/ovs-router.h index 92d15c6..b0042cc 100644 --- a/lib/ovs-router.h +++ b/lib/ovs-router.h @@ -24,7 +24,7 @@ extern "C" { #endif bool ovs_router_lookup(ovs_be32 ip_dst, char out_dev[], ovs_be32 *gw); -void ovs_router_unixctl_register(void); +void ovs_router_init(void); #ifdef __cplusplus } #endif diff --git a/lib/route-table.c b/lib/route-table.c index 6261954..63a9bd3 100644 --- a/lib/route-table.c +++ b/lib/route-table.c @@ -96,6 +96,7 @@ route_table_register(void) ovs_assert(!nln); ovs_assert(!route_notifier); + ovs_router_init(); nln = nln_create(NETLINK_ROUTE, RTNLGRP_IPV4_ROUTE, (nln_parse_func *) route_table_parse, &rtmsg); diff --git a/ofproto/ofproto-dpif.c b/ofproto/ofproto-dpif.c index a056a63..f438a83 100644 --- a/ofproto/ofproto-dpif.c +++ b/ofproto/ofproto-dpif.c @@ -1251,7 +1251,6 @@ construct(struct ofproto *ofproto_) guarded_list_init(&ofproto->pins); ofproto_unixctl_init(); - ovs_router_unixctl_register(); hmap_init(&ofproto->vlandev_map); hmap_init(&ofproto->realdev_vid_map); -- 1.7.1 _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev