• Aleksander Morgado's avatar
    platform: avoid storing unknown netlink object types (bgo #742928) · 6c1a6d2d
    Aleksander Morgado authored
    Testing WWAN connections through a Nokia Series 40 phone, addresses of family
    AF_PHONET end up triggering an assert() in object_has_ifindex(), just because
    object_type_from_nl_object() only handles AF_INET and AF_INET6 address.
    
    In order to avoid this kind of problems, we'll try to make sure that the object
    caches kept by NM only store known object types.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=742928
    
        Connect: ppp0 <--> /dev/ttyACM0
        nm-pppd-plugin-Message: nm-ppp-plugin: (nm_phasechange): status 5 / phase 'establish'
        NetworkManager[27434]: <info>  (ppp0): new Generic device (driver: 'unknown' ifindex: 12)
        NetworkManager[27434]: <info>  (ppp0): exported as /org/freedesktop/NetworkManager/Devices/4
        [Thread 0x7ffff1ecf700 (LWP 27439) exited]
        NetworkManager[27434]: <info>  (ttyACM0): device state change: ip-config -> deactivating (reason 'user-requested') [70 110 39]
        Terminating on signal 15
        nm-pppd-plugin-Message: nm-ppp-plugin: (nm_phasechange): status 10 / phase 'terminate'
        **
        NetworkManager:ERROR:platform/nm-linux-platform.c:1534:object_has_ifindex: code should not be reached
    
        Program received signal SIGABRT, Aborted.
        0x00007ffff4692a97 in raise () from /usr/lib/libc.so.6
        (gdb) bt
        #0  0x00007ffff4692a97 in raise () from /usr/lib/libc.so.6
        #1  0x00007ffff4693e6a in abort () from /usr/lib/libc.so.6
        #2  0x00007ffff4c8d7f5 in g_assertion_message () from /usr/lib/libglib-2.0.so.0
        #3  0x00007ffff4c8d88a in g_assertion_message_expr () from /usr/lib/libglib-2.0.so.0
        #4  0x0000000000472b91 in object_has_ifindex (object=0x8a8320, ifindex=12) at platform/nm-linux-platform.c:1534
        #5  0x0000000000472bec in check_cache_items (platform=0x7fe8a0, cache=0x7fda30, ifindex=12) at platform/nm-linux-platform.c:1549
        #6  0x0000000000472de3 in announce_object (platform=0x7fe8a0, object=0x8a8c30, change_type=NM_PLATFORM_SIGNAL_REMOVED, reason=NM_PLATFORM_REASON_EXTERNAL) at platform/nm-linux-platform.c:1617
        #7  0x0000000000473dd2 in event_notification (msg=0x8a7970, user_data=0x7fe8a0) at platform/nm-linux-platform.c:1992
        #8  0x00007ffff5ee14de in nl_recvmsgs_report () from /usr/lib/libnl-3.so.200
        #9  0x00007ffff5ee1849 in nl_recvmsgs () from /usr/lib/libnl-3.so.200
        #10 0x00000000004794df in event_handler (channel=0x7fc930, io_condition=G_IO_IN, user_data=0x7fe8a0) at platform/nm-linux-platform.c:4152
        #11 0x00007ffff4c6791d in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
        #12 0x00007ffff4c67cf8 in ?? () from /usr/lib/libglib-2.0.so.0
        #13 0x00007ffff4c68022 in g_main_loop_run () from /usr/lib/libglib-2.0.so.0
        #14 0x00000000004477ee in main (argc=1, argv=0x7fffffffeaa8) at main.c:447
        (gdb) fr 4
        #4  0x0000000000472b91 in object_has_ifindex (object=0x8a8320, ifindex=12) at platform/nm-linux-platform.c:1534
        1534                    g_assert_not_reached ();
    6c1a6d2d
Name
Last commit
Last update
..
devices Loading commit data...
dhcp-manager Loading commit data...
dns-manager Loading commit data...
dnsmasq-manager Loading commit data...
platform Loading commit data...
ppp-manager Loading commit data...
rdisc Loading commit data...
settings Loading commit data...
supplicant-manager Loading commit data...
tests Loading commit data...
vpn-manager Loading commit data...
Makefile.am Loading commit data...
NetworkManagerUtils.c Loading commit data...
NetworkManagerUtils.h Loading commit data...
main-utils.c Loading commit data...
main-utils.h Loading commit data...
main.c Loading commit data...
nm-activation-request.c Loading commit data...
nm-activation-request.h Loading commit data...
nm-active-connection.c Loading commit data...
nm-active-connection.h Loading commit data...
nm-auth-manager.c Loading commit data...
nm-auth-manager.h Loading commit data...
nm-auth-subject.c Loading commit data...
nm-auth-subject.h Loading commit data...
nm-auth-utils.c Loading commit data...
nm-auth-utils.h Loading commit data...
nm-config.c Loading commit data...
nm-config.h Loading commit data...
nm-connection-provider.c Loading commit data...
nm-connection-provider.h Loading commit data...
nm-connectivity.c Loading commit data...
nm-connectivity.h Loading commit data...
nm-dbus-manager.c Loading commit data...
nm-dbus-manager.h Loading commit data...
nm-dcb.c Loading commit data...
nm-dcb.h Loading commit data...
nm-default-route-manager.c Loading commit data...
nm-default-route-manager.h Loading commit data...
nm-dhcp4-config.c Loading commit data...
nm-dhcp4-config.h Loading commit data...
nm-dhcp6-config.c Loading commit data...
nm-dhcp6-config.h Loading commit data...
nm-dispatcher.c Loading commit data...
nm-dispatcher.h Loading commit data...
nm-firewall-manager.c Loading commit data...
nm-firewall-manager.h Loading commit data...
nm-iface-helper.c Loading commit data...
nm-ip4-config.c Loading commit data...
nm-ip4-config.h Loading commit data...
nm-ip6-config.c Loading commit data...
nm-ip6-config.h Loading commit data...
nm-logging.c Loading commit data...
nm-logging.h Loading commit data...
nm-manager.c Loading commit data...
nm-manager.h Loading commit data...
nm-policy.c Loading commit data...
nm-policy.h Loading commit data...
nm-posix-signals.c Loading commit data...
nm-posix-signals.h Loading commit data...
nm-properties-changed-signal.c Loading commit data...
nm-properties-changed-signal.h Loading commit data...
nm-rfkill-manager.c Loading commit data...
nm-rfkill-manager.h Loading commit data...
nm-session-monitor.c Loading commit data...
nm-session-monitor.h Loading commit data...
nm-sleep-monitor-systemd.c Loading commit data...
nm-sleep-monitor-upower.c Loading commit data...
nm-sleep-monitor.h Loading commit data...
nm-types.h Loading commit data...
org.freedesktop.NetworkManager.conf Loading commit data...