about summary refs log tree commit diff
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rwxr-xr-xtools/create-exports-NetworkManager.sh2
-rwxr-xr-xtools/test-networkmanager-service.py18
2 files changed, 11 insertions, 9 deletions
diff --git a/tools/create-exports-NetworkManager.sh b/tools/create-exports-NetworkManager.sh
index 68752c54..3c2494e1 100755
--- a/tools/create-exports-NetworkManager.sh
+++ b/tools/create-exports-NetworkManager.sh
@@ -51,7 +51,7 @@ get_symbols_missing() {
               ./src/devices/*/.libs/ \
               ./src/ppp/.libs/ -name '*.so'); do
         call_nm "$f" |
-            sed -n 's/^\([U]\) \(\(nm_\|nmp_\|_nm\|NM\|_NM\).*\)$/\2/p'
+            sed -n 's/^\([U]\) \(\(nm_\|nmp_\|_nm\|NM\|_NM\|c_siphash_\).*\)$/\2/p'
     done) |
         _sort |
         grep -Fx -f <(get_symbols_explict) -v |
diff --git a/tools/test-networkmanager-service.py b/tools/test-networkmanager-service.py
index 7fbed7ec..9dd75bea 100755
--- a/tools/test-networkmanager-service.py
+++ b/tools/test-networkmanager-service.py
@@ -108,7 +108,9 @@ class Util:
         return (Util.ip_addr_ntop(a, family), family)
 
     @staticmethod
-    def ip4_addr_ne32(addr):
+    def ip4_addr_be32(addr):
+        # return the IPv4 address as 32 bit integer in network byte order
+        # (big endian).
         a, family = Util.ip_addr_pton(addr, socket.AF_INET)
         n = 0
         for i in range(4):
@@ -645,7 +647,7 @@ class ExportedObj(dbus.service.Object):
         # compatibility reasons. Note that this stub server implementation gets this wrong,
         # for example, it emits PropertiesChanged signal on org.freedesktop.NetworkManager.Device,
         # which NetworkManager never did.
-        # See https://cgit.freedesktop.org/NetworkManager/NetworkManager/tree/src/nm-dbus-manager.c?id=db80d5f62a1edf39c5970887ef7b9ec62dd4163f#n1274
+        # See https://gitlab.freedesktop.org/NetworkManager/NetworkManager/blob/db80d5f62a1edf39c5970887ef7b9ec62dd4163f/src/nm-dbus-manager.c#L1274
         if dbus_interface.legacy_prop_changed_func is not None:
             dbus_interface.legacy_prop_changed_func(self, prop)
 
@@ -1852,9 +1854,9 @@ class IP4Config(ExportedObj):
 
         return {
             PRP_IP4_CONFIG_ADDRESSES:   dbus.Array([
-                                                [ Util.ip4_addr_ne32(a['addr']),
+                                                [ Util.ip4_addr_be32(a['addr']),
                                                   a['prefix'],
-                                                  Util.ip4_addr_ne32(a['gateway']) if a['gateway'] else 0
+                                                  Util.ip4_addr_be32(a['gateway']) if a['gateway'] else 0
                                                 ] for a in addrs
                                             ],
                                             'au'),
@@ -1868,9 +1870,9 @@ class IP4Config(ExportedObj):
                                             'a{sv}'),
             PRP_IP4_CONFIG_GATEWAY:     dbus.String(gateway) if gateway else "",
             PRP_IP4_CONFIG_ROUTES:      dbus.Array([
-                                                [ Util.ip4_addr_ne32(a['dest']),
+                                                [ Util.ip4_addr_be32(a['dest']),
                                                   a['prefix'],
-                                                  Util.ip4_addr_ne32(a['next-hop'] or '0.0.0.0'),
+                                                  Util.ip4_addr_be32(a['next-hop'] or '0.0.0.0'),
                                                   max(a['metric'], 0)
                                                 ] for a in routes
                                             ],
@@ -1884,12 +1886,12 @@ class IP4Config(ExportedObj):
                                                 for a in routes
                                             ],
                                             'a{sv}'),
-            PRP_IP4_CONFIG_NAMESERVERS: dbus.Array([dbus.UInt32(Util.ip4_addr_ne32(n)) for n in nameservers], 'u'),
+            PRP_IP4_CONFIG_NAMESERVERS: dbus.Array([dbus.UInt32(Util.ip4_addr_be32(n)) for n in nameservers], 'u'),
             PRP_IP4_CONFIG_DOMAINS:     dbus.Array(domains, 's'),
             PRP_IP4_CONFIG_SEARCHES:    dbus.Array(searches, 's'),
             PRP_IP4_CONFIG_DNSOPTIONS:  dbus.Array(dnsoptions, 's'),
             PRP_IP4_CONFIG_DNSPRIORITY: dbus.Int32(dnspriority),
-            PRP_IP4_CONFIG_WINSSERVERS: dbus.Array([dbus.UInt32(Util.ip4_addr_ne32(n)) for n in winsservers], 'u'),
+            PRP_IP4_CONFIG_WINSSERVERS: dbus.Array([dbus.UInt32(Util.ip4_addr_be32(n)) for n in winsservers], 'u'),
         }
 
     def props_regenerate(self, generate_seed):