File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -342,7 +342,7 @@ def addrconf_to_dbus(addrconf):
342342 addr , netmask , gateway = addrconf
343343 return [
344344 fixups .addr_to_dbus (addr ),
345- netmask ,
345+ fixups . mask_to_dbus ( netmask ) ,
346346 fixups .addr_to_dbus (gateway )
347347 ]
348348
@@ -352,7 +352,11 @@ def addr_to_python(addr):
352352
353353 @staticmethod
354354 def addr_to_dbus (addr ):
355- return struct .unpack ('I' , socket .inet_aton (addr ))
355+ return dbus .UInt32 (struct .unpack ('I' , socket .inet_aton (addr ))[0 ])
356+
357+ @staticmethod
358+ def mask_to_dbus (mask ):
359+ return dbus .UInt32 (mask )
356360
357361 @staticmethod
358362 def route_to_python (route ):
@@ -369,7 +373,7 @@ def route_to_dbus(route):
369373 addr , netmask , gateway , metric = route
370374 return [
371375 fixups .addr_to_dbus (addr ),
372- netmask ,
376+ fixups . mask_to_dbus ( netmask ) ,
373377 fixups .addr_to_dbus (gateway ),
374378 socket .htonl (metric )
375379 ]
You can’t perform that action at this time.
0 commit comments