Here is a patch for destiny to fix a bug where pyglue.cc was using ntohl
on ofp_flow_stat's cookie field instead of ntohll, which is required for
64-bit values.
-Derek
>From 05b659b0ba0840045b0223fb7f6843f7742c18ba Mon Sep 17 00:00:00 2001
From: Derek Cormier <[email protected]>
Date: Tue, 4 Jan 2011 13:55:51 +0900
Subject: [PATCH] Fix pyglue's cookie conversion for flow stats structure.
When pyglue.cc converted the cookie in an ofp_flow_stats structure from
network to host byte order, it used ntohl rather than ntohll. This gave
incorrect values since cookies 64-bit.
---
src/nox/coreapps/pyrt/pyglue.cc | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/nox/coreapps/pyrt/pyglue.cc b/src/nox/coreapps/pyrt/pyglue.cc
index 1a6f780..b9db96f 100644
--- a/src/nox/coreapps/pyrt/pyglue.cc
+++ b/src/nox/coreapps/pyrt/pyglue.cc
@@ -519,7 +519,7 @@ to_python(const ofp_flow_stats& fs)
}
pyglue_setdict_string(dict, "table_id", to_python(fs.table_id));
pyglue_setdict_string(dict, "match", to_python(fs.match));
- pyglue_setdict_string(dict, "cookie", to_python(ntohl(fs.cookie)));
+ pyglue_setdict_string(dict, "cookie", to_python(ntohll(fs.cookie)));
pyglue_setdict_string(dict, "duration_sec", to_python(ntohl(fs.duration_sec)));
pyglue_setdict_string(dict, "duration_nsec", to_python(ntohl(fs.duration_nsec)));
pyglue_setdict_string(dict, "priority", to_python(ntohs(fs.priority)));
--
1.7.0.4
_______________________________________________
nox-dev mailing list
[email protected]
http://noxrepo.org/mailman/listinfo/nox-dev_noxrepo.org