Version in base suite: 3.0.1-2 Base version: python-os-ken_3.0.1-2 Target version: python-os-ken_3.0.1-2+deb13u1 Base file: /srv/ftp-master.debian.org/ftp/pool/main/p/python-os-ken/python-os-ken_3.0.1-2.dsc Target file: /srv/ftp-master.debian.org/policy/pool/main/p/python-os-ken/python-os-ken_3.0.1-2+deb13u1.dsc changelog | 6 +++ patches/Accept_empty_OXM_fields.patch | 68 ++++++++++++++++++++++++++++++++++ patches/series | 1 3 files changed, 75 insertions(+) dpkg-source: warning: cannot verify inline signature for /srv/release.debian.org/tmp/tmp21zjdxn4/python-os-ken_3.0.1-2.dsc: no acceptable signature found dpkg-source: warning: cannot verify inline signature for /srv/release.debian.org/tmp/tmp21zjdxn4/python-os-ken_3.0.1-2+deb13u1.dsc: no acceptable signature found diff -Nru python-os-ken-3.0.1/debian/changelog python-os-ken-3.0.1/debian/changelog --- python-os-ken-3.0.1/debian/changelog 2025-03-28 08:34:42.000000000 +0000 +++ python-os-ken-3.0.1/debian/changelog 2026-01-06 13:20:12.000000000 +0000 @@ -1,3 +1,9 @@ +python-os-ken (3.0.1-2+deb13u1) trixie; urgency=medium + + * Add Accept_empty_OXM_fields.patch. + + -- Thomas Goirand Tue, 06 Jan 2026 14:20:12 +0100 + python-os-ken (3.0.1-2) unstable; urgency=medium * Uploading to unstable. diff -Nru python-os-ken-3.0.1/debian/patches/Accept_empty_OXM_fields.patch python-os-ken-3.0.1/debian/patches/Accept_empty_OXM_fields.patch --- python-os-ken-3.0.1/debian/patches/Accept_empty_OXM_fields.patch 1970-01-01 00:00:00.000000000 +0000 +++ python-os-ken-3.0.1/debian/patches/Accept_empty_OXM_fields.patch 2026-01-06 13:20:12.000000000 +0000 @@ -0,0 +1,68 @@ +Description: Accept empty "OXM" fields (tuple, list) + When decoding an "OXM" field, now it is possible to accept + and empty tuple or list. The value and the mask are considered as + "None". +Author: lajoskatona +Date: Wed, 10 Dec 2025 10:23:17 +0100 +Bug: https://launchpad.net/bugs/2133487 +Signed-off-by: lajoskatona +Co-Authored-By: Rodolfo Alonso Hernandez +Change-Id: I9069337270cc261974c524a5ab284b055177ab3e +Origin: upstream, https://review.opendev.org/c/openstack/os-ken/+/972086 +Last-Update: 2026-01-06 + +diff --git a/os_ken/ofproto/oxx_fields.py b/os_ken/ofproto/oxx_fields.py +index c37557f..84facd5 100644 +--- a/os_ken/ofproto/oxx_fields.py ++++ b/os_ken/ofproto/oxx_fields.py +@@ -59,7 +59,10 @@ + # the 'list' case below is a bit hack; json.dumps silently maps + # python tuples into json lists. + if oxx == 'oxm' and isinstance(user_value, (tuple, list)): +- (value, mask) = user_value ++ if not user_value: ++ value, mask = None, None ++ else: ++ (value, mask) = user_value + else: + value = user_value + mask = None +diff --git a/os_ken/tests/unit/ofproto/test_oxm.py b/os_ken/tests/unit/ofproto/test_oxm.py +index 3a58ac9..1b00142 100644 +--- a/os_ken/tests/unit/ofproto/test_oxm.py ++++ b/os_ken/tests/unit/ofproto/test_oxm.py +@@ -24,6 +24,8 @@ + (f, uv) = user + (n, v, m) = ofp.oxm_from_user(f, uv) + buf = bytearray() ++ m = b'' if m is None else m ++ v = b'' if v is None else v + ofp.oxm_serialize(n, v, m, buf, 0) + self.assertEqual(on_wire, buf) + +@@ -46,9 +48,10 @@ + f = ofp.oxm_to_user_header(n) + self.assertEqual(user, f) + +- def _test(self, user, on_wire, header_bytes): ++ def _test(self, user, on_wire, header_bytes, test_decode=True): + self._test_encode(user, on_wire) +- self._test_decode(user, on_wire) ++ if test_decode: ++ self._test_decode(user, on_wire) + if isinstance(user[1], tuple): # has mask? + return + user_header = user[0] +@@ -186,3 +189,12 @@ + b'fugafuga' + ) + self._test(user, on_wire, 4) ++ ++ def test_empty_values(self): ++ # This test is a corner case that rarely happens. The decoded ++ # information is empty. ++ user = ('ipv4_src', ()) ++ on_wire = ( ++ b'\x80\x00\x16\x00' ++ ) ++ self._test(user, on_wire, 4, test_decode=False) diff -Nru python-os-ken-3.0.1/debian/patches/series python-os-ken-3.0.1/debian/patches/series --- python-os-ken-3.0.1/debian/patches/series 1970-01-01 00:00:00.000000000 +0000 +++ python-os-ken-3.0.1/debian/patches/series 2026-01-06 13:20:12.000000000 +0000 @@ -0,0 +1 @@ +Accept_empty_OXM_fields.patch