On 05/11/2010 03:37 AM, Martin Casado wrote:
> 
>>
>>
>> It defined the out_port as fsr.out_port = ntohs(OFPP_NONE);
>> so it did not take my value into account.
>>
>> I added
>> PyObject* out_port = PyDict_GetItemString(pyfsr, "out_port");
>> if (out_port) {
>> ~ fsr.out_port = ntohs(from_python<uint16_t>(out_port));
>> }
>> to read the out_port value from python.
>>
>> Now it works, I can filter by out_port!
>> Does anyone know why out_port is not read from python?
> Originally we modeled the python from the match object.  A patch would
> be happily accepted!
> .martin
Hi Martin!

A patch for pyglue.cc is attached.
Standing outside the nox-dir it is applied with
patch -p0 < patch.pyglue.cc.

Is that okay?

Kind regards
Martin
--- nox/src/nox/coreapps/pyrt/pyglue.cc	2010-05-11 14:02:48.000000000 +0200
+++ nox/src/nox/coreapps/pyrt/pyglue.cc.new	2010-05-11 14:04:29.000000000 +0200
@@ -250,6 +250,11 @@
         fsr.table_id = from_python<uint8_t>(table_id);
     }
 
+    PyObject* out_port = PyDict_GetItemString(pyfsr, "out_port");
+    if (out_port) {
+        fsr.out_port = ntohs(from_python<uint16_t>(out_port));
+    }
+
     return fsr;
 }
 

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
nox-dev mailing list
[email protected]
http://noxrepo.org/mailman/listinfo/nox-dev_noxrepo.org

Reply via email to