Re: [PATCH 1/1] vpnc: add support to change interface name
Dan Williams d...@redhat.com on Fri, 2014/09/26 16:14: On Tue, 2014-09-23 at 16:51 +0200, Christian Hesse wrote: By default interface name is 'tun' with an incrementing number (tun0, tun1, ...). By specifying 'Interface name' in vpnc config you can change the name to something more descriptice. Mostly looks good. Perhaps one more round, see below... @@ -1343,6 +1366,21 @@ import (NMVpnPluginUiInterface *iface, const char *path, GError **error) s_ip4 = NM_SETTING_IP4_CONFIG (nm_setting_ip4_config_new ()); nm_connection_add_setting (connection, NM_SETTING (s_ip4)); + /* Interface Name */ + buf = key_file_get_string_helper (keyfile, main, InterfaceName, NULL); + if (buf) { + g_object_set (G_OBJECT (s_con), + NM_SETTING_CONNECTION_INTERFACE_NAME, buf, NULL); + g_free (buf); + } else { + g_set_error (error, +NM_VPNC_IMPORT_EXPORT_ERROR, +NM_VPNC_IMPORT_EXPORT_ERROR_NOT_VPNC, +does not look like a %s VPN connection (no interface name), +VPNC_PLUGIN_NAME); + goto error; This part will cause most imports to fail, because most connections don't specify an interface name. I think we should just kill the entire 'else' block here since it's not really a hard error if the name is missing. Agreed. In addition to this I made writing the configuration option to vpnc configuration optional. + } + value = nm_setting_vpn_get_data_item (s_vpn, NM_VPNC_KEY_GATEWAY); if (value strlen (value)) gateway = value; @@ -1729,6 +1779,7 @@ export (NMVpnPluginUiInterface *iface, fprintf (f, [main]\n Description=%s\n +InterfaceName=%s\n We won't always have the interface name though, so I think we have to conditionally export it like some of the other variables are. Sure. I will reply with a patch. -- Schoene Gruesse Chris O ascii ribbon campaign stop html mail - www.asciiribbon.org signature.asc Description: PGP signature ___ networkmanager-list mailing list networkmanager-list@gnome.org https://mail.gnome.org/mailman/listinfo/networkmanager-list
[PATCH 1/1] vpnc: add support to change interface name
By default interface name is 'tun' with an incrementing number (tun0, tun1, ...). By specifying 'Interface name' in vpnc config you can change the name to something more descriptice. --- properties/nm-vpnc-dialog.ui | 89 +--- properties/nm-vpnc.c | 43 - src/nm-vpnc-service.c| 13 ++- 3 files changed, 114 insertions(+), 31 deletions(-) diff --git a/properties/nm-vpnc-dialog.ui b/properties/nm-vpnc-dialog.ui index 168782e..6c46785 100644 --- a/properties/nm-vpnc-dialog.ui +++ b/properties/nm-vpnc-dialog.ui @@ -555,7 +555,7 @@ config: DPD idle timeout (our side) 0/property object class=GtkTable id=table2 property name=visibleTrue/property property name=can_focusFalse/property -property name=n_rows8/property +property name=n_rows9/property property name=n_columns3/property property name=column_spacing6/property property name=row_spacing6/property @@ -574,8 +574,8 @@ config: DPD idle timeout (our side) 0/property packing property name=left_attach2/property property name=right_attach3/property -property name=top_attach4/property -property name=bottom_attach5/property +property name=top_attach5/property +property name=bottom_attach6/property /packing /child child @@ -593,8 +593,8 @@ config: DPD idle timeout (our side) 0/property packing property name=left_attach2/property property name=right_attach3/property -property name=top_attach2/property -property name=bottom_attach3/property +property name=top_attach3/property +property name=bottom_attach4/property /packing /child child @@ -611,8 +611,8 @@ config: DPD idle timeout (our side) 0/property packing property name=left_attach1/property property name=right_attach2/property -property name=top_attach5/property -property name=bottom_attach6/property +property name=top_attach6/property +property name=bottom_attach7/property /packing /child child @@ -626,8 +626,8 @@ config: IPSec secret lt;group_passwordgt;/property packing property name=left_attach1/property property name=right_attach2/property -property name=top_attach4/property -property name=bottom_attach5/property +property name=top_attach5/property +property name=bottom_attach6/property property name=y_options/property /packing /child @@ -641,8 +641,8 @@ config: IPSec secret lt;group_passwordgt;/property property name=mnemonic_widgetgroup_password_entry/property /object packing -property name=top_attach4/property -property name=bottom_attach5/property +property name=top_attach5/property +property name=bottom_attach6/property property name=x_optionsGTK_FILL/property property name=y_options/property /packing @@ -657,6 +657,8 @@ config: IPSec secret lt;group_passwordgt;/property property name=mnemonic_widgetgateway_entry/property /object packing +property name=top_attach1/property +property name=bottom_attach2/property property name=x_optionsGTK_FILL/property property name=y_options/property /packing @@ -666,13 +668,27 @@ config: IPSec secret lt;group_passwordgt;/property property name=visibleTrue/property property name=can_focusFalse/property property name=xalign0/property +property name=label translatable=yes_Interface name:/property +property name=use_underlineTrue/property +property name=mnemonic_widgetinterface_name_entry/property + /object + packing +property name=x_optionsGTK_FILL/property +property name=y_options/property + /packing +/child +child + object class=GtkLabel id=label25 +property
RTL8188SU(rtl8192su) - unavailable
- lsusb 0bda:8171 Realtek Semiconductor Corp. RTL8188SU 802.11n WLAN Adapter - http://wireless.kernel.org/en/users/Drivers/rtl819x#staging_drivers ... r8712u is a USB driver for RTL8712U/RTL8192SU devices, it's going to be replaced by rtl8192su. - /etc/modprobe.d/blacklist-r8712u.conf blacklist r8712u - http://wireless.kernel.org/en/users/Drivers/rtl819x#rtlwifi ... rtl8192su is a USB driver for RTL8712U/RTL8192SU devices. (WIP : http://github.com/chunkeey/rtl8192su ) - modulecomb mac80211 - - rtl_usb - \ / \ - rtlwifi - - rtl8192su / \ / cfg80211 - - rtl8192s-common - ls /usr/lib/modules/3.17.0-0.rc6.git2.1.fc22.x86_64/updates rtl8192s-common.ko rtl8192su.ko rtl_usb.ko rtlwifi.ko - file /usr/lib/firmware/rtlwifi/rtl8192sufw.bin /usr/lib/firmware/rtlwifi/rtl8192sufw.bin: symbolic link to `rtl8712u.bin' - dmesg rtlwifi: module verification failed: signature and/or required key missing - tainting kernel rtl8192s_common: Chip version 0x3 rtl_usb: rx_max_size 9100, rx_urb_num 8, in_ep 3 rtl8192su: Power Save off (module option) rtl8192su: FW Power Save off (module option) rtl8192su: Driver for Realtek RTL8192SU/RTL8191SU Loading firmware rtlwifi/rtl8192sufw.bin usbcore: registered new interface driver rtl8192su ieee80211 phy0: Selected rate control algorithm 'rtl_rc' rtl8192su 2-1:1.0 wlp0s4f1u1: renamed from wlan0 systemd-udevd[391]: renamed network interface wlan0 to wlp0s4f1u1 - nmcli radio WIFI-HW WIFI WWAN-HW WWAN enabled enabled enabled enabled - journalctl NetworkManager(debug) [platform/nm-platform.c:2565] log_link(): signal: link added: 4: wlp0s4f1u1 DOWN mtu 1500 wifi driver 'rtl8192su' udi '/sys/devices/pci:00/:00:04.1/usb2/2-1/2-1:1.0/net/wlp0s4f1u1' [nm-device-wifi.c:228] constructor(): (wlp0s4f1u1): kernel ifindex 4 (wlp0s4f1u1): using nl80211 for WiFi device control (wlp0s4f1u1): driver supports Access Point (AP) mode [devices/nm-device.c:6983] nm_device_update_hw_address(): (wlp0s4f1u1): hardware address is 00:E0:4C:81:92:E4 [nm-device-wifi.c:2623] update_initial_hw_address(): (wlp0s4f1u1): read initial MAC address 00:E0:4C:81:92:E4 [platform/nm-linux-platform.c:2099] sysctl_get(): error reading /sys/class/net/wlp0s4f1u1/phys_port_id: Failed to read from file '/sys/class/net/wlp0s4f1u1/phys_port_id': Operation not supported [nm-manager.c:1372] manager_rfkill_update_one_type(): WiFi hw-enabled 1 sw-enabled 1 [nm-device-wifi.c:3230] set_enabled(): (wlp0s4f1u1): device now enabled [nm-device-wifi.c:3236] set_enabled(): (enable): wlp0s4f1u1 blocked by UNMANAGED state (wlp0s4f1u1): new 802.11 WiFi device (driver: 'rtl8192su' ifindex: 4) (wlp0s4f1u1): exported as /org/freedesktop/NetworkManager/Devices/1 [devices/nm-device.c:5089] nm_device_set_ip4_config(): (wlp0s4f1u1): set IP4Config instance (/org/freedesktop/NetworkManager/IP4Config/0) [devices/nm-device.c:5197] nm_device_set_ip6_config(): (wlp0s4f1u1): set IP6Config instance (/org/freedesktop/NetworkManager/IP6Config/0) (wlp0s4f1u1): device state change: unmanaged - unavailable (reason 'managed') [10 20 2] [platform/nm-linux-platform.c:2067] _log_dbg_sysctl_get_impl(): sysctl: reading '/proc/sys/net/ipv6/conf/wlp0s4f1u1/accept_ra': '1' [platform/nm-linux-platform.c:2067] _log_dbg_sysctl_get_impl(): sysctl: reading '/proc/sys/net/ipv6/conf/wlp0s4f1u1/accept_ra_defrtr': '1' [platform/nm-linux-platform.c:2067] _log_dbg_sysctl_get_impl(): sysctl: reading '/proc/sys/net/ipv6/conf/wlp0s4f1u1/accept_ra_pinfo': '1' [platform/nm-linux-platform.c:2067] _log_dbg_sysctl_get_impl(): sysctl: reading '/proc/sys/net/ipv6/conf/wlp0s4f1u1/accept_ra_rtr_pref': '1' [platform/nm-linux-platform.c:2067] _log_dbg_sysctl_get_impl(): sysctl: reading '/proc/sys/net/ipv6/conf/wlp0s4f1u1/disable_ipv6': '0' [platform/nm-linux-platform.c:2067] _log_dbg_sysctl_get_impl(): sysctl: reading '/proc/sys/net/ipv6/conf/wlp0s4f1u1/hop_limit': '64' [platform/nm-linux-platform.c:2067] _log_dbg_sysctl_get_impl(): sysctl: reading '/proc/sys/net/ipv6/conf/wlp0s4f1u1/use_tempaddr': '0' [platform/nm-linux-platform.c:1967] _log_dbg_sysctl_set_impl(): sysctl: setting '/proc/sys/net/ipv6/conf/wlp0s4f1u1/disable_ipv6' to '1' (current value is '0') [platform/nm-linux-platform.c:1967] _log_dbg_sysctl_set_impl(): sysctl: setting '/proc/sys/net/ipv6/conf/wlp0s4f1u1/accept_ra_defrtr' to '0' (current value is '1') [platform/nm-linux-platform.c:1967] _log_dbg_sysctl_set_impl(): sysctl: setting '/proc/sys/net/ipv6/conf/wlp0s4f1u1/accept_ra_pinfo' to '0' (current value is '1') [platform/nm-linux-platform.c:1967] _log_dbg_sysctl_set_impl(): sysctl: setting '/proc/sys/net/ipv6/conf/wlp0s4f1u1/accept_ra_rtr_pref' to '0' (current value is '1') [platform/nm-linux-platform.c:1965] _log_dbg_sysctl_set_impl(): sysctl: setting '/proc/sys/net/ipv6/conf/wlp0s4f1u1/use_tempaddr' to '0' (current value is identical)
[PATCH 1/1] openvpn: add support to change interface name
By default interface name is 'tun' or 'tap' with an incrementing number (tun0, tun1, ... or tap0, tap1, ...). By specifying 'Interface name' in vpnc config you can change the name to something more descriptice. --- properties/import-export.c | 12 ++-- properties/nm-openvpn-dialog.ui | 40 properties/nm-openvpn.c | 26 +- src/nm-openvpn-service.c| 11 +-- 4 files changed, 84 insertions(+), 5 deletions(-) diff --git a/properties/import-export.c b/properties/import-export.c index 6b1dad7..2ee9819 100644 --- a/properties/import-export.c +++ b/properties/import-export.c @@ -326,7 +326,8 @@ do_import (const char *path, char **lines, GError **error) if (!strncmp (*line, DEV_TAG, strlen (DEV_TAG))) { items = get_args (*line + strlen (DEV_TAG), nitems); if (nitems == 1) { - nm_setting_vpn_add_data_item (s_vpn, NM_OPENVPN_KEY_DEV, items[0]); + g_object_set (G_OBJECT (s_con), + NM_SETTING_CONNECTION_INTERFACE_NAME, items[0], NULL); } else g_warning (%s: invalid number of arguments in option '%s', __func__, *line); @@ -865,6 +866,8 @@ do_export (const char *path, NMConnection *connection, GError **error) if (value !strcmp (value, yes)) proto_udp = FALSE; + /* interface name is read from generic connection setting. Read this +* for backwards compatibility. */ value = nm_setting_vpn_get_data_item (s_vpn, NM_OPENVPN_KEY_DEV); if (value strlen (value)) device = value; @@ -980,7 +983,12 @@ do_export (const char *path, NMConnection *connection, GError **error) if (value strlen (value)) fprintf (f, FRAGMENT_TAG %d\n, (int) strtol (value, NULL, 10)); - fprintf (f, dev %s\n, device ? device : (device_type ? device_type : device_default)); + value = nm_setting_connection_get_interface_name (s_con); + if (value strlen (value)) + fprintf (f, dev %s\n, value); + else + fprintf (f, dev %s\n, device ? device : (device_type ? device_type : device_default)); + if (device_type) fprintf (f, dev-type %s\n, device_type); fprintf (f, proto %s\n, proto_udp ? udp : tcp); diff --git a/properties/nm-openvpn-dialog.ui b/properties/nm-openvpn-dialog.ui index 6dfda15..21c730d 100644 --- a/properties/nm-openvpn-dialog.ui +++ b/properties/nm-openvpn-dialog.ui @@ -1313,9 +1313,45 @@ config: http-proxy-retry or socks-proxy-retry/property property name=visibleTrue/property property name=can_focusFalse/property property name=n_columns2/property +property name=n_rows2/property property name=column_spacing6/property property name=row_spacing6/property child + object class=GtkLabel id=label36 +property name=visibleTrue/property +property name=can_focusFalse/property +property name=xalign0/property +property name=label translatable=yes_Interface name:/property +property name=use_underlineTrue/property +property name=mnemonic_widgetinterface_name_entry/property + /object + packing +property name=x_options/property +property name=y_options/property + /packing +/child +child + object class=GtkAlignment id=alignment30 +property name=visibleTrue/property +property name=can_focusFalse/property +property name=xalign1/property +property name=xscale0/property +child + object class=GtkEntry id=interface_name_entry +property name=visibleTrue/property +property name=can_focusTrue/property + property name=tooltip_text translatable=yesName of the tun/tap +network interface/property + /object +/child + /object + packing +property name=left_attach1/property +property name=right_attach2/property +property name=y_options/property + /packing +/child +child object class=GtkLabel id=label23 property name=visibleTrue/property property name=can_focusFalse/property @@ -1325,6 +1361,8 @@ config: http-proxy-retry or socks-proxy-retry/property
Re: RTL8188SU(rtl8192su) - unavailable
On Mon, 2014-09-29 at 11:29 +0200, poma wrote: [platform/nm-platform.c:806] nm_platform_link_set_up(): link: setting up 'wlp0s4f1u1' (4) [platform/nm-linux-platform.c:2356] link_change_flags(): link: change 4: flags set 'up' (1) [platform/nm-linux-platform.c:2250] link_change(): Netlink error changing link 4: UP mtu 0 (1) driver 'rtl8192su' udi '/sys/devices/pci:00/:00:04.1/usb2/2-1/2-1:1.0/net/wlp0s4f1u1': No such device (wlp0s4f1u1): preparing device This is likely the core problem, and it's also probably the cause of the wpa_supplicant failures too. You can test this out without NM running by simply doing: ifconfig wlp0s4f1u1 up and see if it returns an error or not. Does it? Does anything show up in 'dmesg'? If we can't get 'ifconfig up' working for the device, clearly NM won't work either... Dan [devices/nm-device.c:6396] nm_device_remove_pending_action(): (wlp0s4f1u1): remove_pending_action (0): 'autoconf6' not pending (expected) [platform/nm-linux-platform.c:1965] _log_dbg_sysctl_set_impl(): sysctl: setting '/proc/sys/net/ipv6/conf/wlp0s4f1u1/disable_ipv6' to '1' (current value is identical) [platform/nm-linux-platform.c:1967] _log_dbg_sysctl_set_impl(): sysctl: setting '/proc/sys/net/ipv6/conf/wlp0s4f1u1/accept_ra' to '0' (current value is '1') [platform/nm-linux-platform.c:1965] _log_dbg_sysctl_set_impl(): sysctl: setting '/proc/sys/net/ipv6/conf/wlp0s4f1u1/use_tempaddr' to '0' (current value is identical) [devices/nm-device.c:7024] nm_device_set_hw_addr(): (wlp0s4f1u1): no MAC address change needed [devices/nm-device.c:5095] nm_device_set_ip4_config(): (wlp0s4f1u1): clear IP4Config instance (/org/freedesktop/NetworkManager/IP4Config/0) [devices/nm-device.c:5203] nm_device_set_ip6_config(): (wlp0s4f1u1): clear IP6Config instance (/org/freedesktop/NetworkManager/IP6Config/0) [supplicant-manager/nm-supplicant-manager.c:90] nm_supplicant_manager_iface_get(): (wlp0s4f1u1): creating new supplicant interface [supplicant-manager/nm-supplicant-interface.c:881] interface_add(): (wlp0s4f1u1): adding interface to supplicant [devices/nm-device.c:6342] nm_device_add_pending_action(): (wlp0s4f1u1): add_pending_action (1): 'waiting for supplicant' [nm-manager.c:718] check_if_startup_complete(): check_if_startup_complete returns FALSE because of wlp0s4f1u1 [nm-device-wifi.c:1192] is_available(): (wlp0s4f1u1): not available because supplicant interface not ready [devices/nm-device.c:6705] _set_state_full(): (wlp0s4f1u1): device not yet available for transition to DISCONNECTED [nm-manager.c:718] check_if_startup_complete(): check_if_startup_complete returns FALSE because of wlp0s4f1u1 [devices/nm-device.c:6342] nm_device_add_pending_action(): (wlp0s4f1u1): add_pending_action (2): 'autoactivate' [devices/nm-device.c:6376] nm_device_remove_pending_action(): (wlp0s4f1u1): remove_pending_action (1): 'autoactivate' [nm-manager.c:718] check_if_startup_complete(): check_if_startup_complete returns FALSE because of wlp0s4f1u1 [supplicant-manager/nm-supplicant-interface.c:856] interface_add_cb(): (wlp0s4f1u1): error adding interface: wpa_supplicant couldn't grab this interface. (wlp0s4f1u1): supplicant interface state: starting - down [devices/nm-device.c:6376] nm_device_remove_pending_action(): (wlp0s4f1u1): remove_pending_action (0): 'waiting for supplicant' [supplicant-manager/nm-supplicant-manager.c:90] nm_supplicant_manager_iface_get(): (wlp0s4f1u1): creating new supplicant interface [supplicant-manager/nm-supplicant-interface.c:881] interface_add(): (wlp0s4f1u1): adding interface to supplicant [devices/nm-device.c:6342] nm_device_add_pending_action(): (wlp0s4f1u1): add_pending_action (1): 'waiting for supplicant' [supplicant-manager/nm-supplicant-manager.c:182] get_capabilities_cb(): AP mode is supported [supplicant-manager/nm-supplicant-manager.c:194] get_capabilities_cb(): EAP-FAST is supported [supplicant-manager/nm-supplicant-interface.c:856] interface_add_cb(): (wlp0s4f1u1): error adding interface: wpa_supplicant couldn't grab this interface. etc. etc.. etc... - nmcli device DEVICE TYPE STATECONNECTION wlp0s4f1u1 wifi unavailable -- poma -- To unsubscribe from this list: send the line unsubscribe linux-wireless in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html ___ networkmanager-list mailing list networkmanager-list@gnome.org https://mail.gnome.org/mailman/listinfo/networkmanager-list
[PATCH] Support building against libsystemd library
In systemd v209, the various libraries were merged into a single libsystemd library [1]. Add support for building against this new library and fall back to the old library names if not found. [1] http://lists.freedesktop.org/archives/systemd-devel/2014-February/017146.html -- Why is it that all of the instruments seeking intelligent life in the universe are pointed away from Earth? From 32b630692a319c14fc2cdba7e6f34404bf47957b Mon Sep 17 00:00:00 2001 From: Michael Biebl bi...@debian.org Date: Tue, 30 Sep 2014 05:38:25 +0200 Subject: [PATCH] Support building against libsystemd library In systemd v209, the various libraries were merged into a single libsystemd library [1]. Add support for building against this new library and fall back to the old library names if not found. [1] http://lists.freedesktop.org/archives/systemd-devel/2014-February/017146.html --- configure.ac | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac index e24ce73..af6efb5 100644 --- a/configure.ac +++ b/configure.ac @@ -331,7 +331,8 @@ AS_IF([! (echo $with_session_tracking | grep -q -E ^(systemd|consolekit|no)$ AM_CONDITIONAL(SESSION_TRACKING_CK, test $with_session_tracking = consolekit) AM_CONDITIONAL(SESSION_TRACKING_SYSTEMD, test $with_session_tracking = systemd) if test $with_session_tracking = systemd; then - PKG_CHECK_MODULES(SYSTEMD_LOGIN, [libsystemd-login]) + PKG_CHECK_MODULES(SYSTEMD_LOGIN, [libsystemd],, + [PKG_CHECK_MODULES(SYSTEMD_LOGIN, [libsystemd-login])]) AC_SUBST(SYSTEMD_LOGIN_CFLAGS) AC_SUBST(SYSTEMD_LOGIN_LIBS) fi @@ -342,7 +343,8 @@ AC_MSG_RESULT($with_session_tracking) AC_ARG_WITH(suspend-resume, AS_HELP_STRING([--with-suspend-resume=upower|systemd], [Build NetworkManager with specific suspend/resume support])) if test z$with_suspend_resume = z; then -PKG_CHECK_EXISTS([libsystemd-login = 183], [have_systemd_inhibit=yes], [have_systemd_inhibit=no]) +PKG_CHECK_EXISTS([libsystemd = 209], [have_systemd_inhibit=yes], + [PKG_CHECK_EXISTS([libsystemd-login = 183], [have_systemd_inhibit=yes], [have_systemd_inhibit=no])]) if test z${have_systemd_inhibit} = zyes; then # Use systemd if it's new enough with_suspend_resume=systemd @@ -355,7 +357,8 @@ fi case $with_suspend_resume in upower) ;; systemd) - PKG_CHECK_MODULES(SYSTEMD_INHIBIT, [libsystemd-login = 183]) + PKG_CHECK_MODULES(SYSTEMD_INHIBIT, [libsystemd = 209],, + [PKG_CHECK_MODULES(SYSTEMD_INHIBIT, [libsystemd-login = 183])]) ;; *) AC_MSG_ERROR(--with-suspend-resume must be one of [upower, systemd]) -- 2.1.1 signature.asc Description: OpenPGP digital signature ___ networkmanager-list mailing list networkmanager-list@gnome.org https://mail.gnome.org/mailman/listinfo/networkmanager-list