networkd bus activation and exit on idle
>From systemd 219 release notes: [1] > * networkd now exits when idle. It will be automatically > restarted as soon as interfaces show up, are removed or > change state. networkd will stay around as long as there is > at least one DHCP state machine or similar around, that keep > it non-idle. [1] http://lists.freedesktop.org/archives/systemd-devel/2015-February/028447.html Anyone knows details? How do they find out about an interface showing up? Could we do the same thing too? At least for servers where only devices are platform devices; no Bluetooth or Modems? Lubo ___ networkmanager-list mailing list networkmanager-list@gnome.org https://mail.gnome.org/mailman/listinfo/networkmanager-list
Re: networkd bus activation and exit on idle
On Tue, 2015-02-17 at 11:15 +0100, Lubomir Rintel wrote: > From systemd 219 release notes: [1] > > > * networkd now exits when idle. It will be automatically > > restarted as soon as interfaces show up, are removed or > > change state. networkd will stay around as long as there is > > at least one DHCP state machine or similar around, that keep > > it non-idle. > > [1] > http://lists.freedesktop.org/archives/systemd-devel/2015-February/028447.html > > Anyone knows details? How do they find out about an interface showing > up? Could we do the same thing too? At least for servers where only > devices are platform devices; no Bluetooth or Modems? socket activation? http://www.freedesktop.org/software/systemd/man/systemd.socket.html units/systemd-networkd.socket: [Socket] ReceiveBuffer=8M ListenNetlink=route 273 PassCredentials=yes Thomas signature.asc Description: This is a digitally signed message part ___ networkmanager-list mailing list networkmanager-list@gnome.org https://mail.gnome.org/mailman/listinfo/networkmanager-list
Re: Add WPS information parsing in foreach_property_cb
On Fri, 2015-02-06 at 10:47 +0800, Sheng-Jhih Jiang wrote: > hi, sorry for the late reply. > >WPS should be added to NetworkManager (core daemon) first. It's not > >really necessary to add anything to nm-applet (client) at that point. > > Without the help of nm-applet to test the WPS flow, how can I confirm > the WPS functionality in NM is correct? you *can* implement support in nm-applet. But nm-applet merely uses the DBus interface of NetworkManager. So, the functionality must first be present in the DBus interface of NetworkManager core service. For testing and developing, it might be quicker to use DBus utilities such as d-feet, or write a test-client in python. -- e.g. http://cgit.freedesktop.org/NetworkManager/NetworkManager/tree/examples/python/dbus > >these are linker errors. Apparently you try to link against an older > >version of libnm-util. Make sure, you link to the same version as the > >include headers. > > Thanks. I will check this. > > BTW, could you give me some instructions for problems belows > > In my plan, I will try to add the easiest scenario first: > i. press the pbc on AP > ii. NM trigger scan to know the AP is ready for WPS via PBC method NM/wpa_supplicant already scans repeatedly, but yes, you can trigger a new scan using the DBus method RequestScan() > iii. NM trigger the wpa_supplicant to start the PBC action > vi. the connection between STA(NM) and AP is constructed > > With the WPS patch in the first email, I believe that if the user > trigger a scan in > NM after the pbc of an AP is pressed, NM will know there is an AP ready for > WPS. > > But in iii), I don't know when the user select an AP to connect on the > nm-applet, where is the corresponding function call > in NM. I am trying to figure out the flow of triggering the > wpa_supplicant to connect to the selected AP from NM. I guess, you would have to add a DBus method like "NMDeviceWifi:WpsConnect()"? all the DBus invocation (server-side) are implemented named "impl_". Try: $ git grep '^impl_' > On Fri, Feb 6, 2015 at 5:56 AM, Thomas Haller wrote: > > On Thu, 2015-02-05 at 22:36 +0800, Sheng-Jhih Jiang wrote: > > > > hi, > > > > > >> BTW, I think I must modify network-manager-applet for testing WPS, but > >> I also met some problems while building network-manager-applet. > > > > WPS should be added to NetworkManager (core daemon) first. It's not > > really necessary to add anything to nm-applet (client) at that point. > > > > > >> I already built and installed NetworkManage 1.1.0 obtained from git > >> master branch. > >> When I want to build network-manager-applet, some errors shows as below. > >> I found that these function prototypes in NetworkManager were > >> controlled by "NM_AVAILABLE_IN_0_9_10" > >> But the version of NM I installed was 1.1.0, it's even newer than > >> 0.9.10, I don't know why these errors occurred. > > > > "NM_AVAILABLE_IN_0_9_10" affects compilation (not linking). So, > > compilation works for you correctly. > > > > > >> " > >> make[4]: Entering directory > >> `/home/awkjiang/temp/network-manager-applet/src' > >> CCLD nm-applet > >> nm_applet-applet.o: In function `get_device_class': > >> /home/awkjiang/temp/network-manager-applet/src/applet.c:280: undefined > >> reference to `nm_device_team_get_type' > >> nm_applet-applet.o: In function `applet_find_active_connection_for_device': > >> /home/awkjiang/temp/network-manage > > > > these are linker errors. Apparently you try to link against an older > > version of libnm-util. Make sure, you link to the same version as the > > include headers. > > > > For example, try setting the search path for pkgconfig > > > > export PKG_CONFIG_PATH="$PREFIX/lib/pkgconfig" > > > > > > > > Thomas signature.asc Description: This is a digitally signed message part ___ networkmanager-list mailing list networkmanager-list@gnome.org https://mail.gnome.org/mailman/listinfo/networkmanager-list
[PATCH] wwan: don't assume DNS info is always available
Fixes segfault with e.g. Ericsson modems that reply just with IP+gateway, without DNS info. [mm-port-serial-at.c:440] debug_log(): (ttyACM8): --> 'AT*E2IPCFG?' [mm-port-serial-at.c:440] debug_log(): (ttyACM8): <-- '*E2IPCFG: (1,"10.191.64.12")(2,"10.191.64.10")' [mm-port-serial-at.c:440] debug_log(): (ttyACM8): <-- 'OK' [mm-port-serial.c:1296] mm_port_serial_close(): (ttyACM8) device open count is 1 (close) [mm-port.c:95] mm_port_set_connected(): (wwan0): port now connected [mm-base-bearer.c:488] connect_ready(): Connected bearer '/org/freedesktop/ModemManager1/Bearer/0' [mm-iface-modem.c:1392] __iface_modem_update_state_internal(): Modem /org/freedesktop/ModemManager1/Modem/0: state changed (connecting -> connected) Activation (ttyACM8) Stage 3 of 5 (IP Configure Start) started... (ttyACM8): device state change: config -> ip-config (reason 'none') [50 70 0] Activation (ttyACM8) Stage 4 of 5 (IPv6 Configure Timeout) scheduled... Activation (ttyACM8) Stage 3 of 5 (IP Configure Start) complete. (ttyACM8): IPv4 static configuration: address 10.191.64.12/28 gateway 10.191.64.10 Errore di segmentazione http://lists.freedesktop.org/archives/modemmanager-devel/2015-February/001758.html --- src/devices/wwan/nm-modem-broadband.c | 12 +++- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/devices/wwan/nm-modem-broadband.c b/src/devices/wwan/nm-modem-broadband.c index 97d05ee..696c43a 100644 --- a/src/devices/wwan/nm-modem-broadband.c +++ b/src/devices/wwan/nm-modem-broadband.c @@ -708,11 +708,13 @@ static_stage3_ip4_done (NMModemBroadband *self) /* DNS servers */ dns = mm_bearer_ip_config_get_dns (self->priv->ipv4_config); - for (i = 0; dns[i]; i++) { - if ( ip4_string_to_num (dns[i], &address_network) - && address_network > 0) { - nm_ip4_config_add_nameserver (config, address_network); - nm_log_info (LOGD_MB, " DNS %s", dns[i]); + if (dns) { + for (i = 0; dns[i]; i++) { + if ( ip4_string_to_num (dns[i], &address_network) + && address_network > 0) { + nm_ip4_config_add_nameserver (config, address_network); + nm_log_info (LOGD_MB, " DNS %s", dns[i]); + } } } -- 2.3.0 ___ networkmanager-list mailing list networkmanager-list@gnome.org https://mail.gnome.org/mailman/listinfo/networkmanager-list
Re: [PATCH] wwan: don't assume DNS info is always available
On Tue, 2015-02-17 at 17:20 +0100, Aleksander Morgado wrote: > Fixes segfault with e.g. Ericsson modems that reply just with IP+gateway, > without DNS info. Thanks, made a small change (reduced the patch to "for (i = 0; dns && dns[i]...") and pushed to 0.9.10, 1.0, and git master. Dan > [mm-port-serial-at.c:440] debug_log(): (ttyACM8): --> 'AT*E2IPCFG?' > [mm-port-serial-at.c:440] debug_log(): (ttyACM8): <-- '*E2IPCFG: > (1,"10.191.64.12")(2,"10.191.64.10")' > [mm-port-serial-at.c:440] debug_log(): (ttyACM8): <-- 'OK' > [mm-port-serial.c:1296] mm_port_serial_close(): (ttyACM8) device open count > is 1 (close) > [mm-port.c:95] mm_port_set_connected(): (wwan0): port now connected > [mm-base-bearer.c:488] connect_ready(): Connected bearer > '/org/freedesktop/ModemManager1/Bearer/0' > [mm-iface-modem.c:1392] __iface_modem_update_state_internal(): Modem > /org/freedesktop/ModemManager1/Modem/0: state changed (connecting -> > connected) > > Activation (ttyACM8) Stage 3 of 5 (IP Configure Start) started... > (ttyACM8): device state change: config -> ip-config (reason 'none') > [50 70 0] > Activation (ttyACM8) Stage 4 of 5 (IPv6 Configure Timeout) > scheduled... > Activation (ttyACM8) Stage 3 of 5 (IP Configure Start) complete. > (ttyACM8): IPv4 static configuration: > address 10.191.64.12/28 > gateway 10.191.64.10 > Errore di segmentazione > > http://lists.freedesktop.org/archives/modemmanager-devel/2015-February/001758.html > --- > src/devices/wwan/nm-modem-broadband.c | 12 +++- > 1 file changed, 7 insertions(+), 5 deletions(-) > > diff --git a/src/devices/wwan/nm-modem-broadband.c > b/src/devices/wwan/nm-modem-broadband.c > index 97d05ee..696c43a 100644 > --- a/src/devices/wwan/nm-modem-broadband.c > +++ b/src/devices/wwan/nm-modem-broadband.c > @@ -708,11 +708,13 @@ static_stage3_ip4_done (NMModemBroadband *self) > > /* DNS servers */ > dns = mm_bearer_ip_config_get_dns (self->priv->ipv4_config); > - for (i = 0; dns[i]; i++) { > - if ( ip4_string_to_num (dns[i], &address_network) > - && address_network > 0) { > - nm_ip4_config_add_nameserver (config, address_network); > - nm_log_info (LOGD_MB, " DNS %s", dns[i]); > + if (dns) { > + for (i = 0; dns[i]; i++) { > + if ( ip4_string_to_num (dns[i], &address_network) > + && address_network > 0) { > + nm_ip4_config_add_nameserver (config, > address_network); > + nm_log_info (LOGD_MB, " DNS %s", dns[i]); > + } > } > } > ___ networkmanager-list mailing list networkmanager-list@gnome.org https://mail.gnome.org/mailman/listinfo/networkmanager-list