X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=ofproto%2Fconnmgr.c;h=a58e785a2d6fef7b44e59a0cae1fe6cfda420437;hb=f1c8a79c626f383926b70eb1885c40f8a427ba23;hp=b7c16d2b50d2e60d7554c61ec4056940c31bd3ec;hpb=feb8a80bb9621f17ed0a249c79b0d02e9543e64a;p=sliver-openvswitch.git diff --git a/ofproto/connmgr.c b/ofproto/connmgr.c index b7c16d2b5..a58e785a2 100644 --- a/ofproto/connmgr.c +++ b/ofproto/connmgr.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2010, 2011, 2012, 2013 Nicira, Inc. + * Copyright (c) 2009, 2010, 2011, 2012, 2013, 2014 Nicira, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -734,17 +734,13 @@ update_in_band_remotes(struct connmgr *mgr) /* Add all the remotes. */ HMAP_FOR_EACH (ofconn, hmap_node, &mgr->controllers) { - struct sockaddr_in *sin = &addrs[n_addrs]; const char *target = rconn_get_target(ofconn->rconn); + struct sockaddr_storage ss; - if (ofconn->band == OFPROTO_OUT_OF_BAND) { - continue; - } - - if (stream_parse_target_with_default_port(target, - OFP_OLD_PORT, - sin)) { - n_addrs++; + if (ofconn->band == OFPROTO_IN_BAND + && stream_parse_target_with_default_port(target, OFP_OLD_PORT, &ss) + && ss.ss_family == AF_INET) { + addrs[n_addrs++] = *(struct sockaddr_in *) &ss; } } for (i = 0; i < mgr->n_extra_remotes; i++) {