[ovs-dev] [PATCH 2/3] vswitch: Datapath IDs are now 16 hex digits.

Ben Pfaff blp at nicira.com
Wed Jun 16 23:14:23 UTC 2010


OpenFlow 1.0 datapath IDs are 64 bits long, so the "datapath_id" column
should have 16 hex digits.  The documentation had this right, but the
code didn't implement it correctly.

Reported-by: Arthur van Kleef <arthur.vankleef at os3.nl>
---
 vswitchd/bridge.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/vswitchd/bridge.c b/vswitchd/bridge.c
index 9097e6b..f607992 100644
--- a/vswitchd/bridge.c
+++ b/vswitchd/bridge.c
@@ -719,7 +719,7 @@ bridge_reconfigure(const struct ovsrec_open_vswitch *ovs_cfg)
         dpid = bridge_pick_datapath_id(br, ea, hw_addr_iface);
         ofproto_set_datapath_id(br->ofproto, dpid);
 
-        dpid_string = xasprintf("%012"PRIx64, dpid);
+        dpid_string = xasprintf("%016"PRIx64, dpid);
         ovsrec_bridge_set_datapath_id(br->cfg, dpid_string);
         free(dpid_string);
 
-- 
1.7.1





More information about the dev mailing list