diff options
102 files changed, 2099 insertions, 777 deletions
diff --git a/Makefile.am b/Makefile.am index a452caca..a92443a7 100644 --- a/Makefile.am +++ b/Makefile.am @@ -3285,9 +3285,13 @@ src_core_ppp_nm_pppd_plugin_la_CPPFLAGS = \ -I$(builddir)/src \ -I$(builddir)/src/libnm-core-public \ -I$(srcdir)/src/libnm-core-public \ - $(GLIB_CFLAGS) + $(GLIB_CFLAGS) \ + $(PPPD_CFLAGS) \ + $(NULL) src_core_ppp_nm_pppd_plugin_la_SOURCES = \ + src/core/ppp/nm-pppd-compat.c \ + src/core/ppp/nm-pppd-compat.h \ src/core/ppp/nm-pppd-plugin.c \ src/core/ppp/nm-pppd-plugin.h \ src/core/ppp/nm-ppp-status.h @@ -3327,6 +3331,12 @@ src_core_ppp_libnm_ppp_plugin_la_LIBADD = \ $(src_core_ppp_libnm_ppp_plugin_la_OBJECTS): $(src_libnm_core_public_mkenums_h) +check-local-ppp-plugin: src/core/NetworkManager src/core/ppp/libnm-ppp-plugin.la + $(srcdir)/tools/check-exports.sh $(builddir)/src/core/ppp/.libs/libnm-ppp-plugin.so "$(srcdir)/src/core/ppp/nm-ppp-plugin.ver" + $(call check_so_symbols,$(builddir)/src/core/ppp/.libs/libnm-ppp-plugin.so) + +check_local += check-local-ppp-plugin + endif EXTRA_DIST += \ @@ -3561,7 +3571,9 @@ EXTRA_DIST += \ src/core/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-fcoe-fabric \ src/core/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-fcoe-vn2vn \ src/core/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-ibft \ - src/core/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-infiniband \ + src/core/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-infiniband0 \ + src/core/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-infiniband1 \ + src/core/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-infiniband2 \ src/core/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-ip6-disabled.cexpected \ src/core/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-ipoib \ src/core/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-link_local \ diff --git a/Makefile.in b/Makefile.in index 945847b2..943fbbbf 100644 --- a/Makefile.in +++ b/Makefile.in @@ -195,75 +195,76 @@ TESTS = $(am__EXEEXT_11) ############################################################################### @WITH_PPP_TRUE@am__append_21 = src/core/ppp/libnm-ppp-plugin.la @WITH_PPP_TRUE@am__append_22 = src/core/ppp/nm-pppd-plugin.la +@WITH_PPP_TRUE@am__append_23 = check-local-ppp-plugin ############################################################################### # src/core/settings/plugins/ifcfg-rh ############################################################################### -@CONFIG_PLUGIN_IFCFG_RH_TRUE@am__append_23 = src/core/settings/plugins/ifcfg-rh/libnm-settings-plugin-ifcfg-rh.la -@CONFIG_PLUGIN_IFCFG_RH_TRUE@am__append_24 = \ +@CONFIG_PLUGIN_IFCFG_RH_TRUE@am__append_24 = src/core/settings/plugins/ifcfg-rh/libnm-settings-plugin-ifcfg-rh.la +@CONFIG_PLUGIN_IFCFG_RH_TRUE@am__append_25 = \ @CONFIG_PLUGIN_IFCFG_RH_TRUE@ src/core/settings/plugins/ifcfg-rh/libnmdbus-ifcfg-rh.la \ @CONFIG_PLUGIN_IFCFG_RH_TRUE@ src/core/settings/plugins/ifcfg-rh/libnms-ifcfg-rh-core.la -@CONFIG_PLUGIN_IFCFG_RH_TRUE@am__append_25 = $(nodist_src_core_settings_plugins_ifcfg_rh_libnmdbus_ifcfg_rh_la_SOURCES) -@CONFIG_PLUGIN_IFCFG_RH_TRUE@am__append_26 = check-local-symbols-settings-ifcfg-rh +@CONFIG_PLUGIN_IFCFG_RH_TRUE@am__append_26 = $(nodist_src_core_settings_plugins_ifcfg_rh_libnmdbus_ifcfg_rh_la_SOURCES) +@CONFIG_PLUGIN_IFCFG_RH_TRUE@am__append_27 = check-local-symbols-settings-ifcfg-rh ############################################################################### # src/core/settings/plugins/ifcfg-rh/tests ############################################################################### -@CONFIG_PLUGIN_IFCFG_RH_TRUE@am__append_27 = src/core/settings/plugins/ifcfg-rh/tests/test-ifcfg-rh -@CONFIG_PLUGIN_IFCFG_RH_TRUE@am__append_28 = \ +@CONFIG_PLUGIN_IFCFG_RH_TRUE@am__append_28 = src/core/settings/plugins/ifcfg-rh/tests/test-ifcfg-rh +@CONFIG_PLUGIN_IFCFG_RH_TRUE@am__append_29 = \ @CONFIG_PLUGIN_IFCFG_RH_TRUE@ src/core/settings/plugins/ifcfg-rh/nm-ifup \ @CONFIG_PLUGIN_IFCFG_RH_TRUE@ src/core/settings/plugins/ifcfg-rh/nm-ifdown -@CONFIG_PLUGIN_IFCFG_RH_TRUE@am__append_29 = install-data-hook-ifcfg-rh +@CONFIG_PLUGIN_IFCFG_RH_TRUE@am__append_30 = install-data-hook-ifcfg-rh ############################################################################### -@CONFIG_PLUGIN_IFCFG_RH_TRUE@am__append_30 = src/core/settings/plugins/ifcfg-rh/nm-ifcfg-rh.conf +@CONFIG_PLUGIN_IFCFG_RH_TRUE@am__append_31 = src/core/settings/plugins/ifcfg-rh/nm-ifcfg-rh.conf ############################################################################### # src/core/settings/plugins/ifupdown ############################################################################### -@CONFIG_PLUGIN_IFUPDOWN_TRUE@am__append_31 = src/core/settings/plugins/ifupdown/libnm-settings-plugin-ifupdown.la -@CONFIG_PLUGIN_IFUPDOWN_TRUE@am__append_32 = src/core/settings/plugins/ifupdown/libnms-ifupdown-core.la -@CONFIG_PLUGIN_IFUPDOWN_TRUE@am__append_33 = check-local-symbols-settings-ifupdown +@CONFIG_PLUGIN_IFUPDOWN_TRUE@am__append_32 = src/core/settings/plugins/ifupdown/libnm-settings-plugin-ifupdown.la +@CONFIG_PLUGIN_IFUPDOWN_TRUE@am__append_33 = src/core/settings/plugins/ifupdown/libnms-ifupdown-core.la +@CONFIG_PLUGIN_IFUPDOWN_TRUE@am__append_34 = check-local-symbols-settings-ifupdown ############################################################################### -@CONFIG_PLUGIN_IFUPDOWN_TRUE@am__append_34 = src/core/settings/plugins/ifupdown/tests/test-ifupdown +@CONFIG_PLUGIN_IFUPDOWN_TRUE@am__append_35 = src/core/settings/plugins/ifupdown/tests/test-ifupdown ############################################################################### -@WITH_MODEM_MANAGER_1_TRUE@am__append_35 = src/core/devices/wwan/libnm-wwan.la \ +@WITH_MODEM_MANAGER_1_TRUE@am__append_36 = src/core/devices/wwan/libnm-wwan.la \ @WITH_MODEM_MANAGER_1_TRUE@ src/core/devices/wwan/libnm-device-plugin-wwan.la \ @WITH_MODEM_MANAGER_1_TRUE@ src/core/devices/bluetooth/libnm-device-plugin-bluetooth.la -@WITH_MODEM_MANAGER_1_TRUE@@WITH_OFONO_TRUE@am__append_36 = \ +@WITH_MODEM_MANAGER_1_TRUE@@WITH_OFONO_TRUE@am__append_37 = \ @WITH_MODEM_MANAGER_1_TRUE@@WITH_OFONO_TRUE@ src/core/devices/wwan/nm-modem-ofono.c \ @WITH_MODEM_MANAGER_1_TRUE@@WITH_OFONO_TRUE@ src/core/devices/wwan/nm-modem-ofono.h -@WITH_MODEM_MANAGER_1_TRUE@am__append_37 = check-local-devices-wwan \ +@WITH_MODEM_MANAGER_1_TRUE@am__append_38 = check-local-devices-wwan \ @WITH_MODEM_MANAGER_1_TRUE@ check-local-devices-bluetooth -@WITH_MODEM_MANAGER_1_TRUE@am__append_38 = src/core/devices/wwan/tests/test-service-providers +@WITH_MODEM_MANAGER_1_TRUE@am__append_39 = src/core/devices/wwan/tests/test-service-providers ############################################################################### # src/core/devices/bluetooth ############################################################################### -@WITH_MODEM_MANAGER_1_TRUE@am__append_39 = src/core/devices/bluetooth/libnm-bluetooth-utils.la -@WITH_BLUEZ5_DUN_TRUE@@WITH_MODEM_MANAGER_1_TRUE@am__append_40 = \ +@WITH_MODEM_MANAGER_1_TRUE@am__append_40 = src/core/devices/bluetooth/libnm-bluetooth-utils.la +@WITH_BLUEZ5_DUN_TRUE@@WITH_MODEM_MANAGER_1_TRUE@am__append_41 = \ @WITH_BLUEZ5_DUN_TRUE@@WITH_MODEM_MANAGER_1_TRUE@ src/core/devices/bluetooth/nm-bluez5-dun.c \ @WITH_BLUEZ5_DUN_TRUE@@WITH_MODEM_MANAGER_1_TRUE@ src/core/devices/bluetooth/nm-bluez5-dun.h \ @WITH_BLUEZ5_DUN_TRUE@@WITH_MODEM_MANAGER_1_TRUE@ $(NULL) -@WITH_BLUEZ5_DUN_TRUE@@WITH_MODEM_MANAGER_1_TRUE@am__append_41 = $(BLUEZ5_CFLAGS) -@WITH_BLUEZ5_DUN_TRUE@@WITH_MODEM_MANAGER_1_TRUE@am__append_42 = $(BLUEZ5_LIBS) +@WITH_BLUEZ5_DUN_TRUE@@WITH_MODEM_MANAGER_1_TRUE@am__append_42 = $(BLUEZ5_CFLAGS) +@WITH_BLUEZ5_DUN_TRUE@@WITH_MODEM_MANAGER_1_TRUE@am__append_43 = $(BLUEZ5_LIBS) ############################################################################### -@WITH_MODEM_MANAGER_1_TRUE@am__append_43 = \ +@WITH_MODEM_MANAGER_1_TRUE@am__append_44 = \ @WITH_MODEM_MANAGER_1_TRUE@ src/core/devices/bluetooth/tests/nm-bt-test ############################################################################### # src/core/devices/wifi ############################################################################### -@WITH_WIFI_TRUE@am__append_44 = src/core/devices/wifi/libnm-wifi-base.la -@WITH_IWD_TRUE@@WITH_WIFI_TRUE@am__append_45 = \ +@WITH_WIFI_TRUE@am__append_45 = src/core/devices/wifi/libnm-wifi-base.la +@WITH_IWD_TRUE@@WITH_WIFI_TRUE@am__append_46 = \ @WITH_IWD_TRUE@@WITH_WIFI_TRUE@ src/core/devices/wifi/nm-device-iwd.c \ @WITH_IWD_TRUE@@WITH_WIFI_TRUE@ src/core/devices/wifi/nm-device-iwd.h \ @WITH_IWD_TRUE@@WITH_WIFI_TRUE@ src/core/devices/wifi/nm-device-iwd-p2p.c \ @@ -272,51 +273,51 @@ TESTS = $(am__EXEEXT_11) @WITH_IWD_TRUE@@WITH_WIFI_TRUE@ src/core/devices/wifi/nm-iwd-manager.h \ @WITH_IWD_TRUE@@WITH_WIFI_TRUE@ $(NULL) -@WITH_WIFI_TRUE@am__append_46 = src/core/devices/wifi/libnm-device-plugin-wifi.la -@WITH_WIFI_TRUE@am__append_47 = check-local-devices-wifi -@WITH_WIFI_TRUE@am__append_48 = src/core/devices/wifi/tests/test-devices-wifi +@WITH_WIFI_TRUE@am__append_47 = src/core/devices/wifi/libnm-device-plugin-wifi.la +@WITH_WIFI_TRUE@am__append_48 = check-local-devices-wifi +@WITH_WIFI_TRUE@am__append_49 = src/core/devices/wifi/tests/test-devices-wifi ############################################################################### # src/core/devices/team ############################################################################### -@WITH_TEAMDCTL_TRUE@am__append_49 = src/core/devices/team/libnm-device-plugin-team.la -@WITH_TEAMDCTL_TRUE@am__append_50 = check-local-devices-team -@WITH_OPENVSWITCH_TRUE@am__append_51 = src/core/devices/ovs/libnm-device-plugin-ovs.la -@WITH_OPENVSWITCH_TRUE@am__append_52 = check-local-devices-ovs -@BUILD_DOCS_TRUE@am__append_53 = check-local-settings-docs +@WITH_TEAMDCTL_TRUE@am__append_50 = src/core/devices/team/libnm-device-plugin-team.la +@WITH_TEAMDCTL_TRUE@am__append_51 = check-local-devices-team +@WITH_OPENVSWITCH_TRUE@am__append_52 = src/core/devices/ovs/libnm-device-plugin-ovs.la +@WITH_OPENVSWITCH_TRUE@am__append_53 = check-local-devices-ovs +@BUILD_DOCS_TRUE@am__append_54 = check-local-settings-docs ############################################################################### # src/nmcli ############################################################################### -@BUILD_NMCLI_TRUE@am__append_54 = src/nmcli/nmcli -@BUILD_NMCLI_TRUE@am__append_55 = install-data-hook-nmcli -@BUILD_NMCLI_TRUE@am__append_56 = uninstall-hook-nmcli +@BUILD_NMCLI_TRUE@am__append_55 = src/nmcli/nmcli +@BUILD_NMCLI_TRUE@am__append_56 = install-data-hook-nmcli +@BUILD_NMCLI_TRUE@am__append_57 = uninstall-hook-nmcli ############################################################################### # src/libnmt-newt ############################################################################### -@BUILD_NMTUI_TRUE@am__append_57 = src/libnmt-newt/libnmt-newt.a +@BUILD_NMTUI_TRUE@am__append_58 = src/libnmt-newt/libnmt-newt.a ############################################################################### # src/nmtui ############################################################################### -@BUILD_NMTUI_TRUE@am__append_58 = src/nmtui/nmtui -@BUILD_NMTUI_TRUE@am__append_59 = install-exec-hook-nmtui -@BUILD_NMTUI_TRUE@am__append_60 = uninstall-hook-nmtui +@BUILD_NMTUI_TRUE@am__append_59 = src/nmtui/nmtui +@BUILD_NMTUI_TRUE@am__append_60 = install-exec-hook-nmtui +@BUILD_NMTUI_TRUE@am__append_61 = uninstall-hook-nmtui ############################################################################### # src/nm-cloud-setup ############################################################################### -@BUILD_NM_CLOUD_SETUP_TRUE@am__append_61 = src/nm-cloud-setup/libnm-cloud-setup-core.a -@BUILD_NM_CLOUD_SETUP_TRUE@am__append_62 = src/nm-cloud-setup/nm-cloud-setup -@BUILD_NM_CLOUD_SETUP_TRUE@@HAVE_SYSTEMD_TRUE@am__append_63 = \ +@BUILD_NM_CLOUD_SETUP_TRUE@am__append_62 = src/nm-cloud-setup/libnm-cloud-setup-core.a +@BUILD_NM_CLOUD_SETUP_TRUE@am__append_63 = src/nm-cloud-setup/nm-cloud-setup +@BUILD_NM_CLOUD_SETUP_TRUE@@HAVE_SYSTEMD_TRUE@am__append_64 = \ @BUILD_NM_CLOUD_SETUP_TRUE@@HAVE_SYSTEMD_TRUE@ src/nm-cloud-setup/nm-cloud-setup.service \ @BUILD_NM_CLOUD_SETUP_TRUE@@HAVE_SYSTEMD_TRUE@ src/nm-cloud-setup/nm-cloud-setup.timer \ @BUILD_NM_CLOUD_SETUP_TRUE@@HAVE_SYSTEMD_TRUE@ $(NULL) -@BUILD_NM_CLOUD_SETUP_TRUE@@HAVE_SYSTEMD_TRUE@am__append_64 = install-data-hook-cloud-setup -@BUILD_NM_CLOUD_SETUP_TRUE@@HAVE_SYSTEMD_TRUE@am__append_65 = uninstall-hook-cloud-setup -@BUILD_NM_CLOUD_SETUP_TRUE@am__append_66 = \ +@BUILD_NM_CLOUD_SETUP_TRUE@@HAVE_SYSTEMD_TRUE@am__append_65 = install-data-hook-cloud-setup +@BUILD_NM_CLOUD_SETUP_TRUE@@HAVE_SYSTEMD_TRUE@am__append_66 = uninstall-hook-cloud-setup +@BUILD_NM_CLOUD_SETUP_TRUE@am__append_67 = \ @BUILD_NM_CLOUD_SETUP_TRUE@ src/nm-cloud-setup/90-nm-cloud-setup.sh \ @BUILD_NM_CLOUD_SETUP_TRUE@ src/nm-cloud-setup/meson.build \ @BUILD_NM_CLOUD_SETUP_TRUE@ src/nm-cloud-setup/nm-cloud-setup.service.in \ @@ -324,60 +325,60 @@ TESTS = $(am__EXEEXT_11) @BUILD_NM_CLOUD_SETUP_TRUE@ src/nm-cloud-setup/tests/meson.build \ @BUILD_NM_CLOUD_SETUP_TRUE@ $(NULL) -@BUILD_NM_CLOUD_SETUP_TRUE@am__append_67 = \ +@BUILD_NM_CLOUD_SETUP_TRUE@am__append_68 = \ @BUILD_NM_CLOUD_SETUP_TRUE@ src/nm-cloud-setup/nm-cloud-setup.service -@BUILD_NM_CLOUD_SETUP_TRUE@am__append_68 = src/nm-cloud-setup/tests/test-cloud-setup-general +@BUILD_NM_CLOUD_SETUP_TRUE@am__append_69 = src/nm-cloud-setup/tests/test-cloud-setup-general ############################################################################### # data ############################################################################### -@HAVE_SYSTEMD_TRUE@am__append_69 = \ +@HAVE_SYSTEMD_TRUE@am__append_70 = \ @HAVE_SYSTEMD_TRUE@ data/NetworkManager.service \ @HAVE_SYSTEMD_TRUE@ data/NetworkManager-wait-online.service \ @HAVE_SYSTEMD_TRUE@ data/NetworkManager-dispatcher.service \ @HAVE_SYSTEMD_TRUE@ data/nm-priv-helper.service \ @HAVE_SYSTEMD_TRUE@ $(NULL) -@HAVE_INTROSPECTION_TRUE@am__append_70 = $(man_nm_settings_xml) -@CONFIG_PLUGIN_IFCFG_RH_TRUE@am__append_71 = man/nm-settings-ifcfg-rh.5 -@CONFIG_PLUGIN_IFCFG_RH_FALSE@am__append_72 = man/nm-settings-ifcfg-rh.5 +@HAVE_INTROSPECTION_TRUE@am__append_71 = $(man_nm_settings_xml) +@CONFIG_PLUGIN_IFCFG_RH_TRUE@am__append_72 = man/nm-settings-ifcfg-rh.5 @CONFIG_PLUGIN_IFCFG_RH_FALSE@am__append_73 = man/nm-settings-ifcfg-rh.5 -@WITH_OPENVSWITCH_TRUE@am__append_74 = man/nm-openvswitch.7 -@WITH_OPENVSWITCH_FALSE@am__append_75 = man/nm-openvswitch.7 +@CONFIG_PLUGIN_IFCFG_RH_FALSE@am__append_74 = man/nm-settings-ifcfg-rh.5 +@WITH_OPENVSWITCH_TRUE@am__append_75 = man/nm-openvswitch.7 @WITH_OPENVSWITCH_FALSE@am__append_76 = man/nm-openvswitch.7 -@BUILD_NM_CLOUD_SETUP_TRUE@am__append_77 = man/nm-cloud-setup.8 -@BUILD_NM_CLOUD_SETUP_FALSE@am__append_78 = man/nm-cloud-setup.8 +@WITH_OPENVSWITCH_FALSE@am__append_77 = man/nm-openvswitch.7 +@BUILD_NM_CLOUD_SETUP_TRUE@am__append_78 = man/nm-cloud-setup.8 @BUILD_NM_CLOUD_SETUP_FALSE@am__append_79 = man/nm-cloud-setup.8 -@HAVE_DOCS_TRUE@am__append_80 = install-data-hook-man -@HAVE_DOCS_TRUE@am__append_81 = uninstall-hook-man -@HAVE_DOCS_TRUE@am__append_82 = $(man_pages) $(man_pages_autogen) -@BUILD_DOCS_TRUE@am__append_83 = $(man_pages) $(man_pages_autogen) +@BUILD_NM_CLOUD_SETUP_FALSE@am__append_80 = man/nm-cloud-setup.8 +@HAVE_DOCS_TRUE@am__append_81 = install-data-hook-man +@HAVE_DOCS_TRUE@am__append_82 = uninstall-hook-man +@HAVE_DOCS_TRUE@am__append_83 = $(man_pages) $(man_pages_autogen) +@BUILD_DOCS_TRUE@am__append_84 = $(man_pages) $(man_pages_autogen) ############################################################################### # vapi ############################################################################### -@ENABLE_VAPIGEN_TRUE@am__append_84 = \ +@ENABLE_VAPIGEN_TRUE@am__append_85 = \ @ENABLE_VAPIGEN_TRUE@ vapi/libnm.vapi -@ENABLE_VAPIGEN_TRUE@am__append_85 = \ +@ENABLE_VAPIGEN_TRUE@am__append_86 = \ @ENABLE_VAPIGEN_TRUE@ $(VAPIGEN_VAPIS) \ @ENABLE_VAPIGEN_TRUE@ $(VAPIGEN_VAPIS:.vapi=.deps) -@ENABLE_VAPIGEN_TRUE@am__append_86 = $(VAPIGEN_VAPIS) +@ENABLE_VAPIGEN_TRUE@am__append_87 = $(VAPIGEN_VAPIS) ############################################################################### -@ENABLE_TESTS_TRUE@am__append_87 = $(check_programs) $(check_programs_norun) -@ENABLE_TESTS_TRUE@am__append_88 = $(check_ltlibraries) -@ENABLE_TESTS_FALSE@am__append_89 = $(check_programs) $(check_programs_norun) -@ENABLE_TESTS_FALSE@am__append_90 = $(check_ltlibraries) -@WITH_QT_TRUE@am__append_91 = \ +@ENABLE_TESTS_TRUE@am__append_88 = $(check_programs) $(check_programs_norun) +@ENABLE_TESTS_TRUE@am__append_89 = $(check_ltlibraries) +@ENABLE_TESTS_FALSE@am__append_90 = $(check_programs) $(check_programs_norun) +@ENABLE_TESTS_FALSE@am__append_91 = $(check_ltlibraries) +@WITH_QT_TRUE@am__append_92 = \ @WITH_QT_TRUE@ examples/C/qt/add-connection-wired \ @WITH_QT_TRUE@ examples/C/qt/list-connections \ @WITH_QT_TRUE@ examples/C/qt/change-ipv4-addresses \ @WITH_QT_TRUE@ examples/C/qt/monitor-nm-running -@WITH_QT_TRUE@am__append_92 = \ +@WITH_QT_TRUE@am__append_93 = \ @WITH_QT_TRUE@ examples/C/qt/monitor-nm-running.moc subdir = . @@ -1062,9 +1063,11 @@ src_core_ppp_libnm_ppp_plugin_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ @WITH_PPP_TRUE@src_core_ppp_nm_pppd_plugin_la_DEPENDENCIES = \ @WITH_PPP_TRUE@ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) am__src_core_ppp_nm_pppd_plugin_la_SOURCES_DIST = \ + src/core/ppp/nm-pppd-compat.c src/core/ppp/nm-pppd-compat.h \ src/core/ppp/nm-pppd-plugin.c src/core/ppp/nm-pppd-plugin.h \ src/core/ppp/nm-ppp-status.h -@WITH_PPP_TRUE@am_src_core_ppp_nm_pppd_plugin_la_OBJECTS = src/core/ppp/nm_pppd_plugin_la-nm-pppd-plugin.lo +@WITH_PPP_TRUE@am_src_core_ppp_nm_pppd_plugin_la_OBJECTS = src/core/ppp/nm_pppd_plugin_la-nm-pppd-compat.lo \ +@WITH_PPP_TRUE@ src/core/ppp/nm_pppd_plugin_la-nm-pppd-plugin.lo src_core_ppp_nm_pppd_plugin_la_OBJECTS = \ $(am_src_core_ppp_nm_pppd_plugin_la_OBJECTS) src_core_ppp_nm_pppd_plugin_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ @@ -2933,6 +2936,7 @@ am__depfiles_remade = examples/C/glib/$(DEPDIR)/add_connection_gdbus-add-connect src/core/ppp/$(DEPDIR)/libNetworkManager_la-nm-ppp-manager-call.Plo \ src/core/ppp/$(DEPDIR)/libNetworkManager_la-nm-ppp-mgr.Plo \ src/core/ppp/$(DEPDIR)/libnm_ppp_plugin_la-nm-ppp-manager.Plo \ + src/core/ppp/$(DEPDIR)/nm_pppd_plugin_la-nm-pppd-compat.Plo \ src/core/ppp/$(DEPDIR)/nm_pppd_plugin_la-nm-pppd-plugin.Plo \ src/core/settings/$(DEPDIR)/libNetworkManager_la-nm-agent-manager.Plo \ src/core/settings/$(DEPDIR)/libNetworkManager_la-nm-secret-agent.Plo \ @@ -4098,6 +4102,7 @@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ +PPPD_CFLAGS = @PPPD_CFLAGS@ PPPD_PATH = @PPPD_PATH@ PPPD_PLUGIN_DIR = @PPPD_PLUGIN_DIR@ PTHREAD_CC = @PTHREAD_CC@ @@ -4292,13 +4297,13 @@ noinst_LTLIBRARIES = src/c-siphash/libc-siphash.la \ src/core/libNetworkManager.la \ src/libnm-systemd-core/libnm-systemd-core.la $(NULL) \ src/libnm-systemd-shared/libnm-systemd-shared.la \ - src/nm-initrd-generator/libnmi-core.la $(am__append_24) \ - $(am__append_32) $(am__append_39) $(am__append_44) \ - src/nm-dispatcher/libnm-dispatcher-core.la $(am__append_88) -check_LTLIBRARIES = $(am__append_90) -noinst_LIBRARIES = $(am__append_57) $(am__append_61) + src/nm-initrd-generator/libnmi-core.la $(am__append_25) \ + $(am__append_33) $(am__append_40) $(am__append_45) \ + src/nm-dispatcher/libnm-dispatcher-core.la $(am__append_89) +check_LTLIBRARIES = $(am__append_91) +noinst_LIBRARIES = $(am__append_58) $(am__append_62) noinst_DATA = $(am__append_12) -dist_libexec_SCRIPTS = $(am__append_28) +dist_libexec_SCRIPTS = $(am__append_29) ############################################################################### lib_LTLIBRARIES = src/libnm-client-impl/libnm.la @@ -4307,26 +4312,26 @@ plugin_LTLIBRARIES = $(core_plugins) ############################################################################### # src/core/devices/adsl ############################################################################### -core_plugins = $(am__append_21) $(am__append_23) $(am__append_31) \ +core_plugins = $(am__append_21) $(am__append_24) $(am__append_32) \ src/core/devices/adsl/libnm-device-plugin-adsl.la \ - $(am__append_35) $(am__append_46) $(am__append_49) \ - $(am__append_51) + $(am__append_36) $(am__append_47) $(am__append_50) \ + $(am__append_52) service_DATA = -man_MANS = $(am__append_82) +man_MANS = $(am__append_83) examples_DATA = data/server.conf CLEANFILES = $(introspection_sources) $(DBUS_INTERFACE_DOCS) \ - src/core/NetworkManager.ver $(am__append_25) \ + src/core/NetworkManager.ver $(am__append_26) \ $(dispatcher_nmdbus_dispatcher_sources) \ src/nm-dispatcher/org.freedesktop.nm_dispatcher.service \ src/nm-priv-helper/org.freedesktop.nm_priv_helper.service \ - $(am__append_67) src/tests/client/test-client.log \ + $(am__append_68) src/tests/client/test-client.log \ data/NetworkManager-dispatcher.service \ data/NetworkManager-wait-online.service \ data/NetworkManager.service data/nm-priv-helper.service \ - data/server.conf $(NULL) $(am__append_70) man/common.ent \ - $(am__append_83) $(am__append_86) $(GLIB_GENERATED) \ + data/server.conf $(NULL) $(am__append_71) man/common.ent \ + $(am__append_84) $(am__append_87) $(GLIB_GENERATED) \ $(INTROSPECTION_GIRS) $(typelib_DATA) cscope.in.out cscope.out \ - cscope.po.out $(NULL) $(am__append_92) + cscope.po.out $(NULL) $(am__append_93) ############################################################################### DISTCLEANFILES = config-extra.h po/.Makefile.patched \ @@ -4736,7 +4741,9 @@ EXTRA_DIST = src/c-stdaux/src/c-stdaux-generic.h \ src/core/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-fcoe-fabric \ src/core/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-fcoe-vn2vn \ src/core/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-ibft \ - src/core/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-infiniband \ + src/core/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-infiniband0 \ + src/core/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-infiniband1 \ + src/core/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-infiniband2 \ src/core/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-ip6-disabled.cexpected \ src/core/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-ipoib \ src/core/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-link_local \ @@ -4988,7 +4995,7 @@ EXTRA_DIST = src/c-stdaux/src/c-stdaux-generic.h \ src/libnmc-setting/meson.build \ src/libnmc-setting/tests/meson.build \ src/libnmt-newt/meson.build src/nmtui/meson.build \ - $(am__append_66) src/tests/client/test-client.sh \ + $(am__append_67) src/tests/client/test-client.sh \ src/tests/client/test-client.py \ src/tests/client/test-client.check-on-disk/test_001.expected \ src/tests/client/test-client.check-on-disk/test_002.expected \ @@ -5002,7 +5009,7 @@ EXTRA_DIST = src/c-stdaux/src/c-stdaux-generic.h \ data/NetworkManager-wait-online.service.in \ data/NetworkManager.service.in data/nm-priv-helper.service.in \ data/meson.build data/nm-shared.xml data/server.conf.in \ - $(NULL) $(am__append_72) $(am__append_75) $(am__append_78) \ + $(NULL) $(am__append_73) $(am__append_76) $(am__append_79) \ man/common.ent.in $(man_nm_settings_xml) $(addsuffix \ .xsl,$(basename $(man_nm_settings_xml))) $(man_pages) \ $(addsuffix .xml,$(basename $(man_pages))) \ @@ -5095,16 +5102,16 @@ EXTRA_DIST = src/c-stdaux/src/c-stdaux-generic.h \ EXTRA_LTLIBRARIES = dist_hook = dist-hook-settings-ifcfg-rh-alias-files dist_dependencies = src/libnm-core-public/nm-vpn-dbus-types.xml \ - src/libnm-core-public/nm-dbus-types.xml $(am__append_73) \ - $(am__append_76) $(am__append_79) $(man_pages) \ + src/libnm-core-public/nm-dbus-types.xml $(am__append_74) \ + $(am__append_77) $(am__append_80) $(man_pages) \ $(man_pages_autogen) dist_configure_check = $(am__append_2) -install_data_hook = install-data-hook-dirs $(am__append_29) \ - install-data-hook-dispatcher $(am__append_55) $(am__append_64) \ - $(am__append_80) -install_exec_hook = $(am__append_59) -uninstall_hook = $(am__append_56) $(am__append_60) $(am__append_65) \ +install_data_hook = install-data-hook-dirs $(am__append_30) \ + install-data-hook-dispatcher $(am__append_56) $(am__append_65) \ $(am__append_81) +install_exec_hook = $(am__append_60) +uninstall_hook = $(am__append_57) $(am__append_61) $(am__append_66) \ + $(am__append_82) BUILT_SOURCES = src/libnm-core-public/nm-vpn-dbus-types.xml \ src/libnm-core-public/nm-dbus-types.xml $(gir_DATA) \ $(typelib_DATA) @@ -5118,9 +5125,9 @@ man_pages = man/NetworkManager-dispatcher.8 \ man/NetworkManager-wait-online.service.8 man/NetworkManager.8 \ man/NetworkManager.conf.5 man/nm-initrd-generator.8 \ man/nm-online.1 man/nmcli-examples.7 man/nmcli.1 man/nmtui.1 \ - $(NULL) $(am__append_74) $(am__append_77) + $(NULL) $(am__append_75) $(am__append_78) man_pages_autogen = man/nm-settings-dbus.5 man/nm-settings-keyfile.5 \ - man/nm-settings-nmcli.5 $(NULL) $(am__append_71) + man/nm-settings-nmcli.5 $(NULL) $(am__append_72) ############################################################################### @@ -5168,8 +5175,8 @@ check_programs = src/libnm-platform/tests/test-nm-platform \ src/core/dhcp/tests/test-dhcp-dhclient \ src/core/dhcp/tests/test-dhcp-utils \ src/core/settings/plugins/keyfile/tests/test-keyfile-settings \ - $(am__append_27) $(am__append_34) $(am__append_38) \ - $(am__append_48) src/core/dnsmasq/tests/test-dnsmasq-utils \ + $(am__append_28) $(am__append_35) $(am__append_39) \ + $(am__append_49) src/core/dnsmasq/tests/test-dnsmasq-utils \ src/core/platform/tests/test-address-fake \ src/core/platform/tests/test-address-linux \ src/core/platform/tests/test-cleanup-fake \ @@ -5189,8 +5196,8 @@ check_programs = src/libnm-platform/tests/test-nm-platform \ src/core/tests/test-l3cfg src/core/tests/test-systemd \ src/core/tests/test-utils src/core/tests/test-wired-defname \ $(NULL) src/nm-dispatcher/tests/test-dispatcher-envp \ - src/libnmc-setting/tests/test-libnmc-setting $(am__append_68) -check_programs_norun = $(am__append_19) $(am__append_43) \ + src/libnmc-setting/tests/test-libnmc-setting $(am__append_69) +check_programs_norun = $(am__append_19) $(am__append_44) \ src/core/platform/tests/monitor \ src/core/ndisc/tests/test-ndisc-linux \ examples/C/glib/add-connection-gdbus \ @@ -5201,7 +5208,7 @@ check_programs_norun = $(am__append_19) $(am__append_43) \ examples/C/glib/list-connections-libnm \ examples/C/glib/monitor-nm-running-gdbus \ examples/C/glib/monitor-nm-state-gdbus \ - examples/C/glib/vpn-import-libnm $(NULL) $(am__append_91) + examples/C/glib/vpn-import-libnm $(NULL) $(am__append_92) ############################################################################### @@ -5215,20 +5222,20 @@ check_ltlibraries = $(am__append_7) $(am__append_8) $(am__append_9) \ src/libnmc-base/libnmc-base.la \ src/libnmc-setting/libnmc-setting.la check_local = check-docs check-local-exports-libnm $(am__append_15) \ - $(am__append_18) check-config-options $(am__append_26) \ - $(am__append_33) check-local-devices-adsl $(am__append_37) \ - $(am__append_47) $(am__append_50) $(am__append_52) \ - $(am__append_53) check-local-tests-client \ + $(am__append_18) check-config-options $(am__append_23) \ + $(am__append_27) $(am__append_34) check-local-devices-adsl \ + $(am__append_38) $(am__append_48) $(am__append_51) \ + $(am__append_53) $(am__append_54) check-local-tests-client \ check-local-gitlab-ci check-tree check-po-msgfmt -VAPIGEN_VAPIS = $(am__append_84) -dbusservice_DATA = $(am__append_30) \ +VAPIGEN_VAPIS = $(am__append_85) +dbusservice_DATA = $(am__append_31) \ src/nm-dispatcher/nm-dispatcher.conf \ src/nm-priv-helper/nm-priv-helper.conf \ src/core/org.freedesktop.NetworkManager.conf dbusactivation_DATA = \ src/nm-dispatcher/org.freedesktop.nm_dispatcher.service \ src/nm-priv-helper/org.freedesktop.nm_priv_helper.service -systemdsystemunit_DATA = $(am__append_63) $(am__append_69) +systemdsystemunit_DATA = $(am__append_64) $(am__append_70) INTROSPECTION_GIRS = $(am__append_11) INTROSPECTION_SCANNER_ARGS = INTROSPECTION_COMPILER_ARGS = @@ -5245,7 +5252,7 @@ pkgconfig_DATA = src/libnm-client-impl/libnm.pc pppd_plugindir = $(PPPD_PLUGIN_DIR) pppd_plugin_LTLIBRARIES = $(am__append_22) vapidir = $(datadir)/vala/vapi -vapi_DATA = $(am__append_85) +vapi_DATA = $(am__append_86) examplesdir = $(docdir)/examples rundir = $(runstatedir)/NetworkManager statedir = $(localstatedir)/lib/NetworkManager @@ -7490,9 +7497,13 @@ src_core_dhcp_tests_test_dhcp_utils_LDFLAGS = $(src_core_tests_ldflags) @WITH_PPP_TRUE@ -I$(builddir)/src \ @WITH_PPP_TRUE@ -I$(builddir)/src/libnm-core-public \ @WITH_PPP_TRUE@ -I$(srcdir)/src/libnm-core-public \ -@WITH_PPP_TRUE@ $(GLIB_CFLAGS) +@WITH_PPP_TRUE@ $(GLIB_CFLAGS) \ +@WITH_PPP_TRUE@ $(PPPD_CFLAGS) \ +@WITH_PPP_TRUE@ $(NULL) @WITH_PPP_TRUE@src_core_ppp_nm_pppd_plugin_la_SOURCES = \ +@WITH_PPP_TRUE@ src/core/ppp/nm-pppd-compat.c \ +@WITH_PPP_TRUE@ src/core/ppp/nm-pppd-compat.h \ @WITH_PPP_TRUE@ src/core/ppp/nm-pppd-plugin.c \ @WITH_PPP_TRUE@ src/core/ppp/nm-pppd-plugin.h \ @WITH_PPP_TRUE@ src/core/ppp/nm-ppp-status.h @@ -7678,7 +7689,7 @@ src_core_devices_adsl_libnm_device_plugin_adsl_la_LIBADD = \ @WITH_MODEM_MANAGER_1_TRUE@ src/core/devices/wwan/nm-modem.h \ @WITH_MODEM_MANAGER_1_TRUE@ src/core/devices/wwan/nm-service-providers.c \ @WITH_MODEM_MANAGER_1_TRUE@ src/core/devices/wwan/nm-service-providers.h \ -@WITH_MODEM_MANAGER_1_TRUE@ $(NULL) $(am__append_36) +@WITH_MODEM_MANAGER_1_TRUE@ $(NULL) $(am__append_37) @WITH_MODEM_MANAGER_1_TRUE@src_core_devices_wwan_libnm_wwan_la_CPPFLAGS = $(src_core_devices_wwan_cppflags) @WITH_MODEM_MANAGER_1_TRUE@src_core_devices_wwan_libnm_wwan_la_LDFLAGS = \ @WITH_MODEM_MANAGER_1_TRUE@ -avoid-version \ @@ -7729,13 +7740,13 @@ src_core_devices_adsl_libnm_device_plugin_adsl_la_LIBADD = \ @WITH_MODEM_MANAGER_1_TRUE@src_core_devices_bluetooth_libnm_bluetooth_utils_la_SOURCES = src/core/devices/bluetooth/nm-bluez-common.h \ @WITH_MODEM_MANAGER_1_TRUE@ src/core/devices/bluetooth/nm-bt-error.c \ @WITH_MODEM_MANAGER_1_TRUE@ src/core/devices/bluetooth/nm-bt-error.h \ -@WITH_MODEM_MANAGER_1_TRUE@ $(NULL) $(am__append_40) +@WITH_MODEM_MANAGER_1_TRUE@ $(NULL) $(am__append_41) @WITH_MODEM_MANAGER_1_TRUE@src_core_devices_bluetooth_libnm_bluetooth_utils_la_CPPFLAGS = \ @WITH_MODEM_MANAGER_1_TRUE@ $(src_core_cppflags_base) $(NULL) \ -@WITH_MODEM_MANAGER_1_TRUE@ $(am__append_41) +@WITH_MODEM_MANAGER_1_TRUE@ $(am__append_42) @WITH_MODEM_MANAGER_1_TRUE@src_core_devices_bluetooth_libnm_bluetooth_utils_la_LIBADD = \ @WITH_MODEM_MANAGER_1_TRUE@ $(GLIB_LIBS) $(NULL) \ -@WITH_MODEM_MANAGER_1_TRUE@ $(am__append_42) +@WITH_MODEM_MANAGER_1_TRUE@ $(am__append_43) @WITH_MODEM_MANAGER_1_TRUE@src_core_devices_bluetooth_libnm_device_plugin_bluetooth_la_SOURCES = \ @WITH_MODEM_MANAGER_1_TRUE@ src/core/devices/bluetooth/nm-bluez-manager.c \ @WITH_MODEM_MANAGER_1_TRUE@ src/core/devices/bluetooth/nm-bluez-manager.h \ @@ -7783,7 +7794,7 @@ src_core_devices_adsl_libnm_device_plugin_adsl_la_LIBADD = \ @WITH_WIFI_TRUE@ src/core/devices/wifi/nm-wifi-p2p-peer.h \ @WITH_WIFI_TRUE@ src/core/devices/wifi/nm-wifi-utils.c \ @WITH_WIFI_TRUE@ src/core/devices/wifi/nm-wifi-utils.h $(NULL) \ -@WITH_WIFI_TRUE@ $(am__append_45) +@WITH_WIFI_TRUE@ $(am__append_46) @WITH_WIFI_TRUE@src_core_devices_wifi_libnm_wifi_base_la_CPPFLAGS = $(src_core_cppflags_device_plugin) @WITH_WIFI_TRUE@src_core_devices_wifi_libnm_wifi_base_la_LIBADD = \ @WITH_WIFI_TRUE@ $(GLIB_LIBS) @@ -9895,6 +9906,9 @@ src/core/ppp/libnm_ppp_plugin_la-nm-ppp-manager.lo: \ src/core/ppp/libnm-ppp-plugin.la: $(src_core_ppp_libnm_ppp_plugin_la_OBJECTS) $(src_core_ppp_libnm_ppp_plugin_la_DEPENDENCIES) $(EXTRA_src_core_ppp_libnm_ppp_plugin_la_DEPENDENCIES) src/core/ppp/$(am__dirstamp) $(AM_V_CCLD)$(src_core_ppp_libnm_ppp_plugin_la_LINK) $(am_src_core_ppp_libnm_ppp_plugin_la_rpath) $(src_core_ppp_libnm_ppp_plugin_la_OBJECTS) $(src_core_ppp_libnm_ppp_plugin_la_LIBADD) $(LIBS) +src/core/ppp/nm_pppd_plugin_la-nm-pppd-compat.lo: \ + src/core/ppp/$(am__dirstamp) \ + src/core/ppp/$(DEPDIR)/$(am__dirstamp) src/core/ppp/nm_pppd_plugin_la-nm-pppd-plugin.lo: \ src/core/ppp/$(am__dirstamp) \ src/core/ppp/$(DEPDIR)/$(am__dirstamp) @@ -12276,6 +12290,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@src/core/ppp/$(DEPDIR)/libNetworkManager_la-nm-ppp-manager-call.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/core/ppp/$(DEPDIR)/libNetworkManager_la-nm-ppp-mgr.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/core/ppp/$(DEPDIR)/libnm_ppp_plugin_la-nm-ppp-manager.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@src/core/ppp/$(DEPDIR)/nm_pppd_plugin_la-nm-pppd-compat.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/core/ppp/$(DEPDIR)/nm_pppd_plugin_la-nm-pppd-plugin.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/core/settings/$(DEPDIR)/libNetworkManager_la-nm-agent-manager.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@src/core/settings/$(DEPDIR)/libNetworkManager_la-nm-secret-agent.Plo@am__quote@ # am--include-marker @@ -14405,6 +14420,13 @@ src/core/ppp/libnm_ppp_plugin_la-nm-ppp-manager.lo: src/core/ppp/nm-ppp-manager. @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_core_ppp_libnm_ppp_plugin_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/core/ppp/libnm_ppp_plugin_la-nm-ppp-manager.lo `test -f 'src/core/ppp/nm-ppp-manager.c' || echo '$(srcdir)/'`src/core/ppp/nm-ppp-manager.c +src/core/ppp/nm_pppd_plugin_la-nm-pppd-compat.lo: src/core/ppp/nm-pppd-compat.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_core_ppp_nm_pppd_plugin_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/core/ppp/nm_pppd_plugin_la-nm-pppd-compat.lo -MD -MP -MF src/core/ppp/$(DEPDIR)/nm_pppd_plugin_la-nm-pppd-compat.Tpo -c -o src/core/ppp/nm_pppd_plugin_la-nm-pppd-compat.lo `test -f 'src/core/ppp/nm-pppd-compat.c' || echo '$(srcdir)/'`src/core/ppp/nm-pppd-compat.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/core/ppp/$(DEPDIR)/nm_pppd_plugin_la-nm-pppd-compat.Tpo src/core/ppp/$(DEPDIR)/nm_pppd_plugin_la-nm-pppd-compat.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/core/ppp/nm-pppd-compat.c' object='src/core/ppp/nm_pppd_plugin_la-nm-pppd-compat.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_core_ppp_nm_pppd_plugin_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/core/ppp/nm_pppd_plugin_la-nm-pppd-compat.lo `test -f 'src/core/ppp/nm-pppd-compat.c' || echo '$(srcdir)/'`src/core/ppp/nm-pppd-compat.c + src/core/ppp/nm_pppd_plugin_la-nm-pppd-plugin.lo: src/core/ppp/nm-pppd-plugin.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_core_ppp_nm_pppd_plugin_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/core/ppp/nm_pppd_plugin_la-nm-pppd-plugin.lo -MD -MP -MF src/core/ppp/$(DEPDIR)/nm_pppd_plugin_la-nm-pppd-plugin.Tpo -c -o src/core/ppp/nm_pppd_plugin_la-nm-pppd-plugin.lo `test -f 'src/core/ppp/nm-pppd-plugin.c' || echo '$(srcdir)/'`src/core/ppp/nm-pppd-plugin.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/core/ppp/$(DEPDIR)/nm_pppd_plugin_la-nm-pppd-plugin.Tpo src/core/ppp/$(DEPDIR)/nm_pppd_plugin_la-nm-pppd-plugin.Plo @@ -20130,6 +20152,7 @@ distclean: distclean-recursive -rm -f src/core/ppp/$(DEPDIR)/libNetworkManager_la-nm-ppp-manager-call.Plo -rm -f src/core/ppp/$(DEPDIR)/libNetworkManager_la-nm-ppp-mgr.Plo -rm -f src/core/ppp/$(DEPDIR)/libnm_ppp_plugin_la-nm-ppp-manager.Plo + -rm -f src/core/ppp/$(DEPDIR)/nm_pppd_plugin_la-nm-pppd-compat.Plo -rm -f src/core/ppp/$(DEPDIR)/nm_pppd_plugin_la-nm-pppd-plugin.Plo -rm -f src/core/settings/$(DEPDIR)/libNetworkManager_la-nm-agent-manager.Plo -rm -f src/core/settings/$(DEPDIR)/libNetworkManager_la-nm-secret-agent.Plo @@ -20808,6 +20831,7 @@ maintainer-clean: maintainer-clean-recursive -rm -f src/core/ppp/$(DEPDIR)/libNetworkManager_la-nm-ppp-manager-call.Plo -rm -f src/core/ppp/$(DEPDIR)/libNetworkManager_la-nm-ppp-mgr.Plo -rm -f src/core/ppp/$(DEPDIR)/libnm_ppp_plugin_la-nm-ppp-manager.Plo + -rm -f src/core/ppp/$(DEPDIR)/nm_pppd_plugin_la-nm-pppd-compat.Plo -rm -f src/core/ppp/$(DEPDIR)/nm_pppd_plugin_la-nm-pppd-plugin.Plo -rm -f src/core/settings/$(DEPDIR)/libNetworkManager_la-nm-agent-manager.Plo -rm -f src/core/settings/$(DEPDIR)/libNetworkManager_la-nm-secret-agent.Plo @@ -21607,6 +21631,10 @@ $(src_core_dhcp_tests_test_dhcp_utils_OBJECTS): $(src_libnm_core_public_mkenums_ @WITH_PPP_TRUE@$(src_core_ppp_libnm_ppp_plugin_la_OBJECTS): $(src_libnm_core_public_mkenums_h) +@WITH_PPP_TRUE@check-local-ppp-plugin: src/core/NetworkManager src/core/ppp/libnm-ppp-plugin.la +@WITH_PPP_TRUE@ $(srcdir)/tools/check-exports.sh $(builddir)/src/core/ppp/.libs/libnm-ppp-plugin.so "$(srcdir)/src/core/ppp/nm-ppp-plugin.ver" +@WITH_PPP_TRUE@ $(call check_so_symbols,$(builddir)/src/core/ppp/.libs/libnm-ppp-plugin.so) + $(src_core_settings_plugins_keyfile_tests_test_keyfile_settings_OBJECTS): $(src_libnm_core_public_mkenums_h) @CONFIG_PLUGIN_IFCFG_RH_TRUE@src/core/settings/plugins/ifcfg-rh/nmdbus-ifcfg-rh.h: src/core/settings/plugins/ifcfg-rh/nm-ifcfg-rh.xml diff --git a/NEWS b/NEWS index cb98c7ae..6cd720fc 100644 --- a/NEWS +++ b/NEWS @@ -1,4 +1,21 @@ =============================================== +NetworkManager-1.42.8 +Overview of changes since NetworkManager-1.42.6 +=============================================== + +* Add support for ppp 2.5.0. +* Fix nft rules for balance-slb bonding. +* Support port priority for bonding. +* Fix regression handling the PKEY_ID for infiniband profiles + in ifcfg-rh format. +* Fix race in nm-cloud-setup that caused partial configuration + and loss of connectivity with multiple interfaces. +* Don't touch "net.ipv6.conf.$IFACE.forwarding" unless explicitly + required for IPv6 sharing. +* Various bugfixes related to team, Wi-Fi P2P, IPv6LL. +* Automatically unblock autoconnect of profiles during reapply. + +=============================================== NetworkManager-1.42.6 Overview of changes since NetworkManager-1.42.4 =============================================== @@ -180,6 +197,8 @@ Overview of changes since NetworkManager-1.38 paragraphs. * Support enabling ipv4ll alongside DHCPv4 and static addressing. * Support configuring "ipv6.mtu". +* The "ipv6.addr-gen-mode" property can now have a default value + specified via global connections defaults in NetworkManager.conf. * Honor "nm.debug" kernel command line to enable debug logging of NetworkManager. * NetworkManager reads the kernel command line "/proc/cmdline" for several diff --git a/config.h.in b/config.h.in index 1451742a..ea34eaa6 100644 --- a/config.h.in +++ b/config.h.in @@ -216,6 +216,9 @@ /* Define if more debug logging is enabled */ #undef NM_MORE_LOGGING +/* The detected ppp API version */ +#undef NM_PPP_VERSION_2_5_OR_NEWER + /* Name of package */ #undef PACKAGE diff --git a/config.h.meson b/config.h.meson index 73371650..bda54203 100644 --- a/config.h.meson +++ b/config.h.meson @@ -239,6 +239,9 @@ /* Define to path of pppd binary */ #mesondefine PPPD_PATH +/* The detected ppp API version */ +#mesondefine NM_PPP_VERSION_2_5_OR_NEWER + /* Define if you have iwd support */ #mesondefine WITH_IWD diff --git a/configure b/configure index a784497c..9d2ebe54 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for NetworkManager 1.42.6. +# Generated by GNU Autoconf 2.71 for NetworkManager 1.42.8. # # Report bugs to <http://bugzilla.gnome.org/enter_bug.cgi?product=NetworkManager>. # @@ -622,8 +622,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='NetworkManager' PACKAGE_TARNAME='NetworkManager' -PACKAGE_VERSION='1.42.6' -PACKAGE_STRING='NetworkManager 1.42.6' +PACKAGE_VERSION='1.42.8' +PACKAGE_STRING='NetworkManager 1.42.8' PACKAGE_BUGREPORT='http://bugzilla.gnome.org/enter_bug.cgi?product=NetworkManager' PACKAGE_URL='' @@ -772,6 +772,7 @@ PPPD_PATH PPPD_PLUGIN_DIR WITH_PPP_FALSE WITH_PPP_TRUE +PPPD_CFLAGS DBUS_SYS_DIR GLIB_MKENUMS GLIB_MAKEFILE @@ -1744,7 +1745,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures NetworkManager 1.42.6 to adapt to many kinds of systems. +\`configure' configures NetworkManager 1.42.8 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1816,7 +1817,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of NetworkManager 1.42.6:";; + short | recursive ) echo "Configuration of NetworkManager 1.42.8:";; esac cat <<\_ACEOF @@ -2171,7 +2172,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -NetworkManager configure 1.42.6 +NetworkManager configure 1.42.8 generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2892,7 +2893,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by NetworkManager $as_me 1.42.6, which was +It was created by NetworkManager $as_me 1.42.8, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -4388,7 +4389,7 @@ fi # Define the identity of the package. PACKAGE='NetworkManager' - VERSION='1.42.6' + VERSION='1.42.8' printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h @@ -19328,8 +19329,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu NM_MAJOR_VERSION=1 NM_MINOR_VERSION=42 -NM_MICRO_VERSION=6 -NM_VERSION=1.42.6 +NM_MICRO_VERSION=8 +NM_VERSION=1.42.8 @@ -19337,7 +19338,7 @@ NM_VERSION=1.42.6 -NM_GIT_SHA=b6cc7c7e695ba3b1f2a5c95b0d6df418b8556e57 +NM_GIT_SHA=7c6da25396162ba05ffa71f00e227351dc1452b6 if test """" != "no-config-h" ; then @@ -26497,6 +26498,21 @@ fi # pppd +NM_PPP_VERSION_2_5_OR_NEWER=0 +PPPD_VERSION=2.4.9 +if test -n "$PKG_CONFIG" && \ + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"pppd\""; } >&5 + ($PKG_CONFIG --exists --print-errors "pppd") 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + + PPPD_VERSION=`$PKG_CONFIG --modversion pppd` + PPPD_CFLAGS=`$PKG_CONFIG --cflags pppd` + NM_PPP_VERSION_2_5_OR_NEWER=1 + +fi + # Check whether --enable-ppp was given. if test ${enable_ppp+y} then : @@ -26506,7 +26522,8 @@ else $as_nop fi if test "${enable_ppp}" = "yes"; then - for ac_header in pppd/pppd.h + if test -z "$PPPD_CFLAGS" ; then + for ac_header in pppd/pppd.h do : ac_fn_c_check_header_compile "$LINENO" "pppd/pppd.h" "ac_cv_header_pppd_pppd_h" "$ac_includes_default" if test "x$ac_cv_header_pppd_pppd_h" = xyes @@ -26518,6 +26535,8 @@ else $as_nop fi done + fi + PPPD_CFLAGS="$PPPD_CFLAGS" printf "%s\n" "#define WITH_PPP 1" >>confdefs.h @@ -26543,14 +26562,16 @@ then : withval=$with_pppd_plugin_dir; fi - if test -n "$with_pppd_plugin_dir" ; then PPPD_PLUGIN_DIR="$with_pppd_plugin_dir" else - PPPD_PLUGIN_DIR="${libdir}/pppd/2.4.5" + PPPD_PLUGIN_DIR="${libdir}/pppd/$PPPD_VERSION" fi +printf "%s\n" "#define NM_PPP_VERSION_2_5_OR_NEWER $NM_PPP_VERSION_2_5_OR_NEWER" >>confdefs.h + + # Check whether --with-pppd was given. if test ${with_pppd+y} @@ -32795,7 +32816,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by NetworkManager $as_me 1.42.6, which was +This file was extended by NetworkManager $as_me 1.42.8, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -32863,7 +32884,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -NetworkManager config.status 1.42.6 +NetworkManager config.status 1.42.8 configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/configure.ac b/configure.ac index d7186678..2835b841 100644 --- a/configure.ac +++ b/configure.ac @@ -8,7 +8,7 @@ dnl "shared/nm-version-macros.h.in" dnl - update number in meson.build m4_define([nm_major_version], [1]) m4_define([nm_minor_version], [42]) -m4_define([nm_micro_version], [6]) +m4_define([nm_micro_version], [8]) m4_define([nm_version], [nm_major_version.nm_minor_version.nm_micro_version]) @@ -754,13 +754,23 @@ fi AC_SUBST(DBUS_SYS_DIR) # pppd +NM_PPP_VERSION_2_5_OR_NEWER=0 +PPPD_VERSION=2.4.9 +PKG_CHECK_EXISTS([pppd], [ + PPPD_VERSION=`$PKG_CONFIG --modversion pppd` + PPPD_CFLAGS=`$PKG_CONFIG --cflags pppd` + NM_PPP_VERSION_2_5_OR_NEWER=1 +]) + AC_ARG_ENABLE(ppp, AS_HELP_STRING([--enable-ppp], [enable PPP/PPPoE support]), [enable_ppp=${enableval}], [enable_ppp=yes]) if test "${enable_ppp}" = "yes"; then - AC_CHECK_HEADERS(pppd/pppd.h,, - AC_MSG_ERROR("couldn't find pppd.h. pppd development headers are required.")) - + if test -z "$PPPD_CFLAGS" ; then + AC_CHECK_HEADERS(pppd/pppd.h,, + AC_MSG_ERROR("couldn't find pppd.h. pppd development headers are required."),) + fi + AC_SUBST(PPPD_CFLAGS, ["$PPPD_CFLAGS"]) AC_DEFINE(WITH_PPP, 1, [Define if you have PPP support]) else AC_DEFINE(WITH_PPP, 0, [Define if you have PPP support]) @@ -769,13 +779,13 @@ AM_CONDITIONAL(WITH_PPP, test "${enable_ppp}" = "yes") AC_ARG_WITH([pppd-plugin-dir], AS_HELP_STRING([--with-pppd-plugin-dir=DIR], [path to the pppd plugins directory])) - if test -n "$with_pppd_plugin_dir" ; then PPPD_PLUGIN_DIR="$with_pppd_plugin_dir" else - PPPD_PLUGIN_DIR="${libdir}/pppd/2.4.5" + PPPD_PLUGIN_DIR="${libdir}/pppd/$PPPD_VERSION" fi AC_SUBST(PPPD_PLUGIN_DIR) +AC_DEFINE_UNQUOTED(NM_PPP_VERSION_2_5_OR_NEWER, $NM_PPP_VERSION_2_5_OR_NEWER, [The detected ppp API version]) AC_ARG_WITH(pppd, AS_HELP_STRING([--with-pppd=/path/to/pppd], [path to pppd binary])) if test "x${with_pppd}" = x; then diff --git a/docs/api/Makefile.in b/docs/api/Makefile.in index 62582bcc..d7a09949 100644 --- a/docs/api/Makefile.in +++ b/docs/api/Makefile.in @@ -326,6 +326,7 @@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ +PPPD_CFLAGS = @PPPD_CFLAGS@ PPPD_PATH = @PPPD_PATH@ PPPD_PLUGIN_DIR = @PPPD_PLUGIN_DIR@ PTHREAD_CC = @PTHREAD_CC@ diff --git a/docs/api/html/NetworkManager.conf.html b/docs/api/html/NetworkManager.conf.html index 30d5660a..b4134352 100644 --- a/docs/api/html/NetworkManager.conf.html +++ b/docs/api/html/NetworkManager.conf.html @@ -1565,7 +1565,7 @@ enable=nm-version-max:1.2.6 <code class="literal">NM_CONFIG_ENABLE_TAG</code>, like: </p> <pre class="programlisting"> -# always skip loading the file when running NetworkManager with +# only load the file when running NetworkManager with # environment variable "NM_CONFIG_ENABLE_TAG=TAG1" [.config] enable=env:TAG1 diff --git a/docs/api/html/index.html b/docs/api/html/index.html index 3ce39694..56e3108b 100644 --- a/docs/api/html/index.html +++ b/docs/api/html/index.html @@ -16,7 +16,7 @@ <div> <div><table class="navigation" id="top" width="100%" cellpadding="2" cellspacing="0"><tr><th valign="middle"><p class="title">NetworkManager Reference Manual</p></th></tr></table></div> <div><p class="releaseinfo"> - for NetworkManager 1.42.6 + for NetworkManager 1.42.8 The latest version of this documentation can be found on-line at <a class="ulink" href="https://networkmanager.dev/docs/api/latest/" target="_top">https://networkmanager.dev/docs/api/latest/</a>. diff --git a/docs/api/html/ix01.html b/docs/api/html/ix01.html index e087c18a..0a54382c 100644 --- a/docs/api/html/ix01.html +++ b/docs/api/html/ix01.html @@ -1343,7 +1343,7 @@ </dt> <dt id="ientry-id-1.4.8.33.5.5.2">org.freedesktop.NetworkManager.PPP.SetState(), <a class="indexterm" href="gdbus-org.freedesktop.NetworkManager.PPP.html#gdbus-method-org-freedesktop-NetworkManager-PPP.SetState">The SetState() method</a> </dt> -<dt id="ientry-id-1.3.3.36.2.2.1.1.2.5.1.1.1">prio, <a class="indexterm" href="settings-team-port.html">team-port</a> +<dt id="ientry-id-1.3.3.36.2.2.1.1.2.5.1.1.1">prio, <a class="indexterm" href="settings-team-port.html">team-port</a>, <a class="indexterm" href="settings-bond-port.html">bond-port</a> </dt> <dt id="ientry-id-1.3.3.8.2.2.1.1.2.22.1.1.1">priority, <a class="indexterm" href="settings-bridge.html">bridge</a>, <a class="indexterm" href="settings-bridge-port.html">bridge-port</a>, <a class="indexterm" href="settings-hostname.html">hostname</a> </dt> diff --git a/docs/api/html/nm-settings-dbus.html b/docs/api/html/nm-settings-dbus.html index f78c2612..778860e6 100644 --- a/docs/api/html/nm-settings-dbus.html +++ b/docs/api/html/nm-settings-dbus.html @@ -1609,7 +1609,11 @@ This property is deprecated since version 1.16.User-provided values for this set <a name="nm-settings-dbus.property.infiniband.p-key"></a>p-key</td> <td align="left">int32</td> <td align="left">-1</td> -<td>The InfiniBand P_Key to use for this device. A value of -1 means to use the default P_Key (aka "the P_Key at index 0"). Otherwise, it is a 16-bit unsigned integer, whose high bit is set if it is a "full membership" P_Key.</td> +<td>The InfiniBand p-key to use for this device. A value of -1 means to use the default p-key (aka "the p-key at index 0"). Otherwise, it is a 16-bit unsigned integer, whose high bit 0x8000 is set if it is a "full membership" p-key. The values 0 and 0x8000 are not allowed. + +With the p-key set, the interface name is always "$parent.$p_key". Setting "connection.interface-name" to another name is not supported. + +Note that kernel will internally always set the full membership bit, although the interface name does not reflect that. Usually the user would want to configure a full membership p-key with 0x8000 flag set.</td> </tr> <tr> <td align="left"> @@ -4672,13 +4676,22 @@ WPS can be disabled by setting this property to a value of 1.</td> <th>Default Value</th> <th>Value Description</th> </tr></thead> -<tbody><tr> +<tbody> +<tr> +<td align="left"> +<a name="nm-settings-dbus.property.bond-port.prio"></a>prio</td> +<td align="left">int32</td> +<td align="left">0</td> +<td>The port priority for bond active port re-selection during failover. A higher number means a higher priority in selection. The primary port has the highest priority. This option is only compatible with active-backup, balance-tlb and balance-alb modes.</td> +</tr> +<tr> <td align="left"> <a name="nm-settings-dbus.property.bond-port.queue-id"></a>queue-id</td> <td align="left">uint32</td> <td align="left">0</td> <td>The queue ID of this bond port. The maximum value of queue ID is the number of TX queues currently active in device.</td> -</tr></tbody> +</tr> +</tbody> </table></div> </div> <hr> diff --git a/docs/api/html/nm-settings-ifcfg-rh.html b/docs/api/html/nm-settings-ifcfg-rh.html index a63ae165..f5674127 100644 --- a/docs/api/html/nm-settings-ifcfg-rh.html +++ b/docs/api/html/nm-settings-ifcfg-rh.html @@ -1101,14 +1101,26 @@ Example: </strong></span>BONDING_OPTS="miimon=100 mode=broadcast"</td> <th>Default</th> <th>Description</th> </tr></thead> -<tbody><tr> +<tbody> +<tr> <td align="left">queue-id</td> -<td align="left">BONDING_OPTS: queue-id=</td> +<td align="left">BOND_PORT_QUEUE_ID<span class="emphasis"><em>(+)</em></span> +</td> <td align="left">0</td> <td align="left">Queue ID.<span class="bold"><strong> Allowed values: </strong></span>0 - 65535</td> -</tr></tbody> +</tr> +<tr> +<td align="left">prio</td> +<td align="left">BOND_PORT_PRIO<span class="emphasis"><em>(+)</em></span> +</td> +<td align="left">0</td> +<td align="left">Port priority.<span class="bold"><strong> + +Allowed values: </strong></span>-2147483648 - 2147483647</td> +</tr> +</tbody> </table></div> </div> <br class="table-break"><div class="table"> @@ -1892,9 +1904,9 @@ Example: </strong></span>HWADDR=01:02:03:04:05:06:07:08:09:0A:01:02:03:04:05:06: </tr> <tr> <td align="left">p-key</td> -<td align="left">PKEY_ID (and PKEY=yes)</td> +<td align="left">PKEY_ID or PKEY_ID_NM(*) (requires PKEY=yes)</td> <td align="left">PKEY=no</td> -<td align="left">InfiniBand P_Key. The value can be a hex number prefixed with "0x" or a decimal number. When PKEY_ID is specified, PHYSDEV and DEVICE also must be specified.<span class="bold"><strong> +<td align="left">InfiniBand P_Key. The value can be a hex number prefixed with "0x" or a decimal number. When PKEY_ID is specified, PHYSDEV must be specified. Note that ifcfg-rh format will always automatically set the full membership flag 0x8000 for the PKEY_ID variable. To express IDs without the full membership flag, use PKEY_ID_NM. Note that kernel internally treats the interface as having the full membership flag set, this mainly affects the interface name. For the ifcfg file to be supported by initscripts' ifup-ib, the DEVICE= must always be set. NetworkManager does not require that.<span class="bold"><strong> Example: </strong></span>PKEY=yes PKEY_ID=2 PHYSDEV=mlx4_ib0 DEVICE=mlx4_ib0.8002</td> </tr> diff --git a/docs/api/html/nm-settings-nmcli.html b/docs/api/html/nm-settings-nmcli.html index 0f6798b4..139eac2f 100644 --- a/docs/api/html/nm-settings-nmcli.html +++ b/docs/api/html/nm-settings-nmcli.html @@ -1975,7 +1975,9 @@ <td> <p> Alias: p-key</p> -<p>The InfiniBand P_Key to use for this device. A value of -1 means to use the default P_Key (aka "the P_Key at index 0"). Otherwise, it is a 16-bit unsigned integer, whose high bit is set if it is a "full membership" P_Key.</p> +<p>The InfiniBand p-key to use for this device. A value of -1 means to use the default p-key (aka "the p-key at index 0"). Otherwise, it is a 16-bit unsigned integer, whose high bit 0x8000 is set if it is a "full membership" p-key. The values 0 and 0x8000 are not allowed.</p> +<p>With the p-key set, the interface name is always "$parent.$p_key". Setting "connection.interface-name" to another name is not supported.</p> +<p>Note that kernel will internally always set the full membership bit, although the interface name does not reflect that. Usually the user would want to configure a full membership p-key with 0x8000 flag set.</p> <p> Format: int32</p> </td> @@ -5485,7 +5487,18 @@ Linux traffic control subsystem <col align="left" valign="top"> <col> </colgroup> -<tbody><tr> +<tbody> +<tr> +<td><p><span class="term"><code class="option"><a name="nm-settings-nmcli.property.bond-port.prio"></a>prio</code></span></p></td> +<td> +<p> + Alias: prio</p> +<p>The port priority for bond active port re-selection during failover. A higher number means a higher priority in selection. The primary port has the highest priority. This option is only compatible with active-backup, balance-tlb and balance-alb modes.</p> +<p> + Format: int32</p> +</td> +</tr> +<tr> <td><p><span class="term"><code class="option"><a name="nm-settings-nmcli.property.bond-port.queue-id"></a>queue-id</code></span></p></td> <td> <p> @@ -5494,7 +5507,8 @@ Linux traffic control subsystem <p> Format: uint32</p> </td> -</tr></tbody> +</tr> +</tbody> </table></div> </div> <hr> diff --git a/docs/api/html/settings-bond-port.html b/docs/api/html/settings-bond-port.html index 6daf9a3d..4cece6ef 100644 --- a/docs/api/html/settings-bond-port.html +++ b/docs/api/html/settings-bond-port.html @@ -52,12 +52,20 @@ <th>Default Value</th> <th>Value Description</th> </tr></thead> -<tbody><tr> +<tbody> +<tr> +<td><pre class="screen">prio</pre></td> +<td><pre class="screen">int32</pre></td> +<td><pre class="screen">0</pre></td> +<td> </td> +</tr> +<tr> <td><pre class="screen">queue-id</pre></td> <td><pre class="screen">uint32</pre></td> <td><pre class="screen">0</pre></td> <td> </td> -</tr></tbody> +</tr> +</tbody> </table></div> </div> <p><br class="table-break"></p> diff --git a/docs/api/settings-spec.xml b/docs/api/settings-spec.xml index e12bab3c..ee0b1a61 100644 --- a/docs/api/settings-spec.xml +++ b/docs/api/settings-spec.xml @@ -98,7 +98,7 @@ Properties </title><para><table><tgroup cols="4"><thead><row><entry>Key Name</entry><entry>Value Type</entry><entry>Default Value</entry><entry>Value Description</entry></row></thead><tbody><row><entry><screen>channel<indexterm zone="settings-wpan"><primary sortas="channel">channel</primary></indexterm></screen></entry><entry><screen>int32</screen></entry><entry><screen>-1</screen></entry><entry/></row><row><entry><screen>mac-address<indexterm zone="settings-wpan"><primary sortas="mac-address">mac-address</primary></indexterm></screen></entry><entry><screen>string</screen></entry><entry><screen/></entry><entry/></row><row><entry><screen>page<indexterm zone="settings-wpan"><primary sortas="page">page</primary></indexterm></screen></entry><entry><screen>int32</screen></entry><entry><screen>-1</screen></entry><entry/></row><row><entry><screen>pan-id<indexterm zone="settings-wpan"><primary sortas="pan-id">pan-id</primary></indexterm></screen></entry><entry><screen>uint32</screen></entry><entry><screen>65535</screen></entry><entry/></row><row><entry><screen>short-address<indexterm zone="settings-wpan"><primary sortas="short-address">short-address</primary></indexterm></screen></entry><entry><screen>uint32</screen></entry><entry><screen>65535</screen></entry><entry/></row></tbody></tgroup></table></para></refsect1></refentry><refentry id="settings-bond-port"><refnamediv><refname>bond-port</refname><refpurpose>Bond Port Settings</refpurpose></refnamediv><refsect1 role="properties"><title id="settings-bond-port.properties"> Properties - </title><para><table><tgroup cols="4"><thead><row><entry>Key Name</entry><entry>Value Type</entry><entry>Default Value</entry><entry>Value Description</entry></row></thead><tbody><row><entry><screen>queue-id<indexterm zone="settings-bond-port"><primary sortas="queue-id">queue-id</primary></indexterm></screen></entry><entry><screen>uint32</screen></entry><entry><screen>0</screen></entry><entry/></row></tbody></tgroup></table></para></refsect1></refentry><refentry id="settings-hostname"><refnamediv><refname>hostname</refname><refpurpose>Hostname settings</refpurpose></refnamediv><refsect1 role="properties"><title id="settings-hostname.properties"> + </title><para><table><tgroup cols="4"><thead><row><entry>Key Name</entry><entry>Value Type</entry><entry>Default Value</entry><entry>Value Description</entry></row></thead><tbody><row><entry><screen>prio<indexterm zone="settings-bond-port"><primary sortas="prio">prio</primary></indexterm></screen></entry><entry><screen>int32</screen></entry><entry><screen>0</screen></entry><entry/></row><row><entry><screen>queue-id<indexterm zone="settings-bond-port"><primary sortas="queue-id">queue-id</primary></indexterm></screen></entry><entry><screen>uint32</screen></entry><entry><screen>0</screen></entry><entry/></row></tbody></tgroup></table></para></refsect1></refentry><refentry id="settings-hostname"><refnamediv><refname>hostname</refname><refpurpose>Hostname settings</refpurpose></refnamediv><refsect1 role="properties"><title id="settings-hostname.properties"> Properties </title><para><table><tgroup cols="4"><thead><row><entry>Key Name</entry><entry>Value Type</entry><entry>Default Value</entry><entry>Value Description</entry></row></thead><tbody><row><entry><screen>from-dhcp<indexterm zone="settings-hostname"><primary sortas="from-dhcp">from-dhcp</primary></indexterm></screen></entry><entry><screen>NMTernary (int32)</screen></entry><entry><screen/></entry><entry/></row><row><entry><screen>from-dns-lookup<indexterm zone="settings-hostname"><primary sortas="from-dns-lookup">from-dns-lookup</primary></indexterm></screen></entry><entry><screen>NMTernary (int32)</screen></entry><entry><screen/></entry><entry/></row><row><entry><screen>only-from-default<indexterm zone="settings-hostname"><primary sortas="only-from-default">only-from-default</primary></indexterm></screen></entry><entry><screen>NMTernary (int32)</screen></entry><entry><screen/></entry><entry/></row><row><entry><screen>priority<indexterm zone="settings-hostname"><primary sortas="priority">priority</primary></indexterm></screen></entry><entry><screen>int32</screen></entry><entry><screen>0</screen></entry><entry/></row></tbody></tgroup></table></para></refsect1></refentry><refentry id="settings-loopback"><refnamediv><refname>loopback</refname><refpurpose>Loopback Link Settings</refpurpose></refnamediv><refsect1 role="properties"><title id="settings-loopback.properties"> Properties diff --git a/docs/api/version.xml b/docs/api/version.xml index 5f1d262b..31ffe251 100644 --- a/docs/api/version.xml +++ b/docs/api/version.xml @@ -1 +1 @@ -1.42.6 +1.42.8 diff --git a/docs/libnm/Makefile.in b/docs/libnm/Makefile.in index d32d67b2..5b3663ab 100644 --- a/docs/libnm/Makefile.in +++ b/docs/libnm/Makefile.in @@ -323,6 +323,7 @@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ +PPPD_CFLAGS = @PPPD_CFLAGS@ PPPD_PATH = @PPPD_PATH@ PPPD_PLUGIN_DIR = @PPPD_PLUGIN_DIR@ PTHREAD_CC = @PTHREAD_CC@ diff --git a/docs/libnm/html/NMSecretAgentOld.html b/docs/libnm/html/NMSecretAgentOld.html index fb197d5d..d024b926 100644 --- a/docs/libnm/html/NMSecretAgentOld.html +++ b/docs/libnm/html/NMSecretAgentOld.html @@ -323,22 +323,22 @@ something like this:</p> 14 15 16</pre></td> - <td class="listing_code"><pre class="programlisting"><span class="n">NMConnection</span><span class="w"> </span><span class="o">*</span><span class="n">secrets</span><span class="p">;</span><span class="w"></span> -<span class="n">NMSettingWirelessSecurity</span><span class="w"> </span><span class="o">*</span><span class="n">s_wsec</span><span class="p">;</span><span class="w"></span> -<span class="n">GVariant</span><span class="w"> </span><span class="o">*</span><span class="n">secrets_dict</span><span class="p">;</span><span class="w"></span> + <td class="listing_code"><pre class="programlisting"><span class="n">NMConnection</span><span class="w"> </span><span class="o">*</span><span class="n">secrets</span><span class="p">;</span> +<span class="n">NMSettingWirelessSecurity</span><span class="w"> </span><span class="o">*</span><span class="n">s_wsec</span><span class="p">;</span> +<span class="n">GVariant</span><span class="w"> </span><span class="o">*</span><span class="n">secrets_dict</span><span class="p">;</span> -<span class="n">secrets</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">nm_simple_connection_new</span><span class="w"> </span><span class="p">();</span><span class="w"></span> -<span class="n">s_wsec</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="n">NMSettingWirelessSecurity</span><span class="w"> </span><span class="o">*</span><span class="p">)</span><span class="w"> </span><span class="n">nm_setting_wireless_security_new</span><span class="w"> </span><span class="p">();</span><span class="w"></span> -<span class="n">g_object_set</span><span class="w"> </span><span class="p">(</span><span class="n">G_OBJECT</span><span class="w"> </span><span class="p">(</span><span class="n">s_wsec</span><span class="p">),</span><span class="w"></span> -<span class="w"> </span><span class="n">NM_SETTING_WIRELESS_SECURITY_PSK</span><span class="p">,</span><span class="w"> </span><span class="s">"my really cool PSK"</span><span class="p">,</span><span class="w"></span> -<span class="w"> </span><span class="nb">NULL</span><span class="p">);</span><span class="w"></span> -<span class="n">nm_connection_add_setting</span><span class="w"> </span><span class="p">(</span><span class="n">secrets</span><span class="p">,</span><span class="w"> </span><span class="n">NM_SETTING</span><span class="w"> </span><span class="p">(</span><span class="n">s_wsec</span><span class="p">));</span><span class="w"></span> -<span class="n">secrets_dict</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">nm_connection_to_dbus</span><span class="w"> </span><span class="p">(</span><span class="n">secrets</span><span class="p">,</span><span class="w"> </span><span class="n">NM_CONNECTION_SERIALIZE_ALL</span><span class="p">);</span><span class="w"></span> +<span class="n">secrets</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">nm_simple_connection_new</span><span class="w"> </span><span class="p">();</span> +<span class="n">s_wsec</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="n">NMSettingWirelessSecurity</span><span class="w"> </span><span class="o">*</span><span class="p">)</span><span class="w"> </span><span class="n">nm_setting_wireless_security_new</span><span class="w"> </span><span class="p">();</span> +<span class="n">g_object_set</span><span class="w"> </span><span class="p">(</span><span class="n">G_OBJECT</span><span class="w"> </span><span class="p">(</span><span class="n">s_wsec</span><span class="p">),</span> +<span class="w"> </span><span class="n">NM_SETTING_WIRELESS_SECURITY_PSK</span><span class="p">,</span><span class="w"> </span><span class="s">"my really cool PSK"</span><span class="p">,</span> +<span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<span class="n">nm_connection_add_setting</span><span class="w"> </span><span class="p">(</span><span class="n">secrets</span><span class="p">,</span><span class="w"> </span><span class="n">NM_SETTING</span><span class="w"> </span><span class="p">(</span><span class="n">s_wsec</span><span class="p">));</span> +<span class="n">secrets_dict</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">nm_connection_to_dbus</span><span class="w"> </span><span class="p">(</span><span class="n">secrets</span><span class="p">,</span><span class="w"> </span><span class="n">NM_CONNECTION_SERIALIZE_ALL</span><span class="p">);</span> -<span class="p">(</span><span class="n">call</span><span class="w"> </span><span class="n">the</span><span class="w"> </span><span class="n">NMSecretAgentOldGetSecretsFunc</span><span class="w"> </span><span class="n">with</span><span class="w"> </span><span class="n">secrets_dict</span><span class="p">)</span><span class="w"></span> +<span class="p">(</span><span class="n">call</span><span class="w"> </span><span class="n">the</span><span class="w"> </span><span class="n">NMSecretAgentOldGetSecretsFunc</span><span class="w"> </span><span class="n">with</span><span class="w"> </span><span class="n">secrets_dict</span><span class="p">)</span> -<span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">secrets</span><span class="p">);</span><span class="w"></span> -<span class="n">g_variant_unref</span><span class="w"> </span><span class="p">(</span><span class="n">secrets_dict</span><span class="p">);</span><span class="w"></span></pre></td> +<span class="n">g_object_unref</span><span class="w"> </span><span class="p">(</span><span class="n">secrets</span><span class="p">);</span> +<span class="n">g_variant_unref</span><span class="w"> </span><span class="p">(</span><span class="n">secrets_dict</span><span class="p">);</span></pre></td> </tr> </tbody> </table> diff --git a/docs/libnm/html/NMSettingBondPort.html b/docs/libnm/html/NMSettingBondPort.html index 323d19da..8db01091 100644 --- a/docs/libnm/html/NMSettingBondPort.html +++ b/docs/libnm/html/NMSettingBondPort.html @@ -55,6 +55,14 @@ <a class="link" href="NMSettingBondPort.html#nm-setting-bond-port-get-queue-id" title="nm_setting_bond_port_get_queue_id ()">nm_setting_bond_port_get_queue_id</a> <span class="c_punctuation">()</span> </td> </tr> +<tr> +<td class="function_type"> +<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gint32"><span class="returnvalue">gint32</span></a> +</td> +<td class="function_name"> +<a class="link" href="NMSettingBondPort.html#nm-setting-bond-port-get-prio" title="nm_setting_bond_port_get_prio ()">nm_setting_bond_port_get_prio</a> <span class="c_punctuation">()</span> +</td> +</tr> </tbody> </table></div> </div> @@ -74,6 +82,10 @@ <td class="define_keyword">#define</td> <td class="function_name"><a class="link" href="NMSettingBondPort.html#NM-SETTING-BOND-PORT-QUEUE-ID:CAPS" title="NM_SETTING_BOND_PORT_QUEUE_ID">NM_SETTING_BOND_PORT_QUEUE_ID</a></td> </tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="NMSettingBondPort.html#NM-SETTING-BOND-PORT-PRIO:CAPS" title="NM_SETTING_BOND_PORT_PRIO">NM_SETTING_BOND_PORT_PRIO</a></td> +</tr> </tbody> </table></div> </div> @@ -122,6 +134,32 @@ nm_setting_bond_port_get_queue_id (<em class="parameter"><code><a class="link" h </div> <p class="since">Since: 1.34</p> </div> +<hr> +<div class="refsect2"> +<a name="nm-setting-bond-port-get-prio"></a><h3>nm_setting_bond_port_get_prio ()</h3> +<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gint32"><span class="returnvalue">gint32</span></a> +nm_setting_bond_port_get_prio (<em class="parameter"><code><a class="link" href="NMSettingBondPort.html" title="NMSettingBondPort"><span class="type">NMSettingBondPort</span></a> *setting</code></em>);</pre> +<div class="refsect3"> +<a name="nm-setting-bond-port-get-prio.parameters"></a><h4>Parameters</h4> +<div class="informaltable"><table class="informaltable" width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody><tr> +<td class="parameter_name"><p>setting</p></td> +<td class="parameter_description"><p>the <a class="link" href="NMSettingBondPort.html" title="NMSettingBondPort"><span class="type">NMSettingBondPort</span></a></p></td> +<td class="parameter_annotations"> </td> +</tr></tbody> +</table></div> +</div> +<div class="refsect3"> +<a name="nm-setting-bond-port-get-prio.returns"></a><h4>Returns</h4> +<p> the <span class="type">“prio”</span> property of the setting</p> +</div> +<p class="since">Since: 1.44, 1.42.8</p> +</div> </div> <div class="refsect1"> <a name="NMSettingBondPort.other_details"></a><h2>Types and Values</h2> @@ -136,6 +174,12 @@ nm_setting_bond_port_get_queue_id (<em class="parameter"><code><a class="link" h <pre class="programlisting">#define NM_SETTING_BOND_PORT_QUEUE_ID "queue-id" </pre> </div> +<hr> +<div class="refsect2"> +<a name="NM-SETTING-BOND-PORT-PRIO:CAPS"></a><h3>NM_SETTING_BOND_PORT_PRIO</h3> +<pre class="programlisting">#define NM_SETTING_BOND_PORT_PRIO "prio" +</pre> +</div> </div> </div> <div class="footer"> diff --git a/docs/libnm/html/api-index-full.html b/docs/libnm/html/api-index-full.html index 4f1b04f4..3eabbff6 100644 --- a/docs/libnm/html/api-index-full.html +++ b/docs/libnm/html/api-index-full.html @@ -1661,6 +1661,10 @@ NMSettingBondPort, struct in NMSettingOvs </dt> <dd></dd> <dt> +NMSettingBondPort:prio, object property in NMSettingOvs +</dt> +<dd></dd> +<dt> NMSettingBondPort:queue-id, object property in NMSettingOvs </dt> <dd></dd> @@ -4065,6 +4069,10 @@ NMUtilsPredicateStr, user_function in NMSettingOvs </dt> <dd></dd> <dt> +<a class="link" href="libnm-nm-version.html#NM-AVAILABLE-IN-1-42-8:CAPS" title="NM_AVAILABLE_IN_1_42_8">NM_AVAILABLE_IN_1_42_8</a>, macro in <a class="link" href="libnm-nm-version.html" title="nm-version">nm-version</a> +</dt> +<dd></dd> +<dt> <a class="link" href="libnm-nm-version.html#NM-AVAILABLE-IN-1-6:CAPS" title="NM_AVAILABLE_IN_1_6">NM_AVAILABLE_IN_1_6</a>, macro in <a class="link" href="libnm-nm-version.html" title="nm-version">nm-version</a> </dt> <dd></dd> @@ -9077,6 +9085,10 @@ NMUtilsPredicateStr, user_function in NMSettingOvs </dt> <dd></dd> <dt> +<a class="link" href="NMSettingBondPort.html#nm-setting-bond-port-get-prio" title="nm_setting_bond_port_get_prio ()">nm_setting_bond_port_get_prio</a>, function in <a class="link" href="NMSettingBondPort.html" title="NMSettingBondPort">NMSettingBondPort</a> +</dt> +<dd></dd> +<dt> <a class="link" href="NMSettingBondPort.html#nm-setting-bond-port-get-queue-id" title="nm_setting_bond_port_get_queue_id ()">nm_setting_bond_port_get_queue_id</a>, function in <a class="link" href="NMSettingBondPort.html" title="NMSettingBondPort">NMSettingBondPort</a> </dt> <dd></dd> @@ -9085,6 +9097,10 @@ NMUtilsPredicateStr, user_function in NMSettingOvs </dt> <dd></dd> <dt> +<a class="link" href="NMSettingBondPort.html#NM-SETTING-BOND-PORT-PRIO:CAPS" title="NM_SETTING_BOND_PORT_PRIO">NM_SETTING_BOND_PORT_PRIO</a>, macro in <a class="link" href="NMSettingBondPort.html" title="NMSettingBondPort">NMSettingBondPort</a> +</dt> +<dd></dd> +<dt> <a class="link" href="NMSettingBondPort.html#NM-SETTING-BOND-PORT-QUEUE-ID:CAPS" title="NM_SETTING_BOND_PORT_QUEUE_ID">NM_SETTING_BOND_PORT_QUEUE_ID</a>, macro in <a class="link" href="NMSettingBondPort.html" title="NMSettingBondPort">NMSettingBondPort</a> </dt> <dd></dd> @@ -14221,6 +14237,10 @@ NMUtilsPredicateStr, user_function in NMSettingOvs </dt> <dd></dd> <dt> +<a class="link" href="libnm-nm-version-macros.html#NM-VERSION-1-42-8:CAPS" title="NM_VERSION_1_42_8">NM_VERSION_1_42_8</a>, macro in <a class="link" href="libnm-nm-version-macros.html" title="nm-version-macros">nm-version-macros</a> +</dt> +<dd></dd> +<dt> <a class="link" href="libnm-nm-version-macros.html#NM-VERSION-1-6:CAPS" title="NM_VERSION_1_6">NM_VERSION_1_6</a>, macro in <a class="link" href="libnm-nm-version-macros.html" title="nm-version-macros">nm-version-macros</a> </dt> <dd></dd> diff --git a/docs/libnm/html/index.html b/docs/libnm/html/index.html index 074a6ac5..b47937b1 100644 --- a/docs/libnm/html/index.html +++ b/docs/libnm/html/index.html @@ -15,7 +15,7 @@ <div> <div><table class="navigation" id="top" width="100%" cellpadding="2" cellspacing="0"><tr><th valign="middle"><p class="title">libnm Reference Manual</p></th></tr></table></div> <div><p class="releaseinfo"> - for libnm 1.42.6 + for libnm 1.42.8 The latest version of this documentation can be found on-line at <a class="ulink" href="https://networkmanager.dev/docs/libnm/latest/" target="_top">https://networkmanager.dev/docs/libnm/latest/</a>. diff --git a/docs/libnm/html/libnm-nm-version-macros.html b/docs/libnm/html/libnm-nm-version-macros.html index 6e3dfc84..a9872264 100644 --- a/docs/libnm/html/libnm-nm-version-macros.html +++ b/docs/libnm/html/libnm-nm-version-macros.html @@ -176,6 +176,10 @@ </tr> <tr> <td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="libnm-nm-version-macros.html#NM-VERSION-1-42-8:CAPS" title="NM_VERSION_1_42_8">NM_VERSION_1_42_8</a></td> +</tr> +<tr> +<td class="define_keyword">#define</td> <td class="function_name"><a class="link" href="libnm-nm-version-macros.html#NM-API-VERSION:CAPS" title="NM_API_VERSION">NM_API_VERSION</a></td> </tr> <tr> @@ -261,7 +265,7 @@ is compiled against.</p> <hr> <div class="refsect2"> <a name="NM-MICRO-VERSION:CAPS"></a><h3>NM_MICRO_VERSION</h3> -<pre class="programlisting">#define NM_MICRO_VERSION (6) +<pre class="programlisting">#define NM_MICRO_VERSION (8) </pre> <p>Evaluates to the micro version number of NetworkManager which this source compiled against.</p> @@ -418,6 +422,12 @@ compiled against.</p> </div> <hr> <div class="refsect2"> +<a name="NM-VERSION-1-42-8:CAPS"></a><h3>NM_VERSION_1_42_8</h3> +<pre class="programlisting">#define NM_VERSION_1_42_8 (NM_ENCODE_VERSION(1, 42, 8)) +</pre> +</div> +<hr> +<div class="refsect2"> <a name="NM-API-VERSION:CAPS"></a><h3>NM_API_VERSION</h3> <pre class="programlisting">#define NM_API_VERSION</pre> </div> diff --git a/docs/libnm/html/libnm-nm-version.html b/docs/libnm/html/libnm-nm-version.html index fb60c610..750ef568 100644 --- a/docs/libnm/html/libnm-nm-version.html +++ b/docs/libnm/html/libnm-nm-version.html @@ -384,6 +384,10 @@ <td class="define_keyword">#define</td> <td class="function_name"><a class="link" href="libnm-nm-version.html#NM-AVAILABLE-IN-1-42-2:CAPS" title="NM_AVAILABLE_IN_1_42_2">NM_AVAILABLE_IN_1_42_2</a></td> </tr> +<tr> +<td class="define_keyword">#define</td> +<td class="function_name"><a class="link" href="libnm-nm-version.html#NM-AVAILABLE-IN-1-42-8:CAPS" title="NM_AVAILABLE_IN_1_42_8">NM_AVAILABLE_IN_1_42_8</a></td> +</tr> </tbody> </table></div> </div> @@ -822,6 +826,12 @@ <pre class="programlisting">#define NM_AVAILABLE_IN_1_42_2 G_UNAVAILABLE(1, 42.2) </pre> </div> +<hr> +<div class="refsect2"> +<a name="NM-AVAILABLE-IN-1-42-8:CAPS"></a><h3>NM_AVAILABLE_IN_1_42_8</h3> +<pre class="programlisting">#define NM_AVAILABLE_IN_1_42_8 G_UNAVAILABLE(1, 42.8) +</pre> +</div> </div> </div> <div class="footer"> diff --git a/docs/libnm/html/libnm.devhelp2 b/docs/libnm/html/libnm.devhelp2 index 82f88a93..cd41ebbd 100644 --- a/docs/libnm/html/libnm.devhelp2 +++ b/docs/libnm/html/libnm.devhelp2 @@ -982,8 +982,10 @@ <keyword type="macro" name="NM_SETTING_BLUETOOTH_TYPE_NAP" link="NMSettingBluetooth.html#NM-SETTING-BLUETOOTH-TYPE-NAP:CAPS"/> <keyword type="function" name="nm_setting_bond_port_new ()" link="NMSettingBondPort.html#nm-setting-bond-port-new" since="1.34"/> <keyword type="function" name="nm_setting_bond_port_get_queue_id ()" link="NMSettingBondPort.html#nm-setting-bond-port-get-queue-id" since="1.34"/> + <keyword type="function" name="nm_setting_bond_port_get_prio ()" link="NMSettingBondPort.html#nm-setting-bond-port-get-prio" since="1.44, 1.42.8"/> <keyword type="macro" name="NM_SETTING_BOND_PORT_SETTING_NAME" link="NMSettingBondPort.html#NM-SETTING-BOND-PORT-SETTING-NAME:CAPS"/> <keyword type="macro" name="NM_SETTING_BOND_PORT_QUEUE_ID" link="NMSettingBondPort.html#NM-SETTING-BOND-PORT-QUEUE-ID:CAPS"/> + <keyword type="macro" name="NM_SETTING_BOND_PORT_PRIO" link="NMSettingBondPort.html#NM-SETTING-BOND-PORT-PRIO:CAPS"/> <keyword type="function" name="nm_setting_bond_new ()" link="NMSettingBond.html#nm-setting-bond-new"/> <keyword type="function" name="nm_setting_bond_get_num_options ()" link="NMSettingBond.html#nm-setting-bond-get-num-options"/> <keyword type="function" name="nm_setting_bond_get_option ()" link="NMSettingBond.html#nm-setting-bond-get-option"/> @@ -3247,6 +3249,7 @@ <keyword type="macro" name="NM_DEPRECATED_IN_1_42" link="libnm-nm-version.html#NM-DEPRECATED-IN-1-42:CAPS"/> <keyword type="macro" name="NM_AVAILABLE_IN_1_42" link="libnm-nm-version.html#NM-AVAILABLE-IN-1-42:CAPS"/> <keyword type="macro" name="NM_AVAILABLE_IN_1_42_2" link="libnm-nm-version.html#NM-AVAILABLE-IN-1-42-2:CAPS"/> + <keyword type="macro" name="NM_AVAILABLE_IN_1_42_8" link="libnm-nm-version.html#NM-AVAILABLE-IN-1-42-8:CAPS"/> <keyword type="macro" name="NM_CHECK_VERSION()" link="libnm-nm-version-macros.html#NM-CHECK-VERSION:CAPS"/> <keyword type="macro" name="NM_ENCODE_VERSION()" link="libnm-nm-version-macros.html#NM-ENCODE-VERSION:CAPS"/> <keyword type="macro" name="NM_MAJOR_VERSION" link="libnm-nm-version-macros.html#NM-MAJOR-VERSION:CAPS"/> @@ -3277,6 +3280,7 @@ <keyword type="macro" name="NM_VERSION_1_40" link="libnm-nm-version-macros.html#NM-VERSION-1-40:CAPS"/> <keyword type="macro" name="NM_VERSION_1_42" link="libnm-nm-version-macros.html#NM-VERSION-1-42:CAPS"/> <keyword type="macro" name="NM_VERSION_1_42_2" link="libnm-nm-version-macros.html#NM-VERSION-1-42-2:CAPS"/> + <keyword type="macro" name="NM_VERSION_1_42_8" link="libnm-nm-version-macros.html#NM-VERSION-1-42-8:CAPS"/> <keyword type="macro" name="NM_API_VERSION" link="libnm-nm-version-macros.html#NM-API-VERSION:CAPS"/> <keyword type="macro" name="NM_VERSION_CUR_STABLE" link="libnm-nm-version-macros.html#NM-VERSION-CUR-STABLE:CAPS"/> <keyword type="macro" name="NM_VERSION_NEXT_STABLE" link="libnm-nm-version-macros.html#NM-VERSION-NEXT-STABLE:CAPS"/> diff --git a/docs/libnm/html/usage.html b/docs/libnm/html/usage.html index eccb5408..c2f36074 100644 --- a/docs/libnm/html/usage.html +++ b/docs/libnm/html/usage.html @@ -73,18 +73,18 @@ 10 11 12</pre></td> - <td class="listing_code"><pre class="programlisting"><span class="cp">#include</span><span class="w"> </span><span class="cpf"><glib.h></span><span class="cp"></span> -<span class="cp">#include</span><span class="w"> </span><span class="cpf"><NetworkManager.h></span><span class="cp"></span> + <td class="listing_code"><pre class="programlisting"><span class="cp">#include</span><span class="w"> </span><span class="cpf"><glib.h></span> +<span class="cp">#include</span><span class="w"> </span><span class="cpf"><NetworkManager.h></span> -<span class="kt">int</span><span class="w"></span> -<span class="nf">main</span><span class="w"> </span><span class="p">(</span><span class="kt">int</span><span class="w"> </span><span class="n">argc</span><span class="p">,</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">argv</span><span class="p">[])</span><span class="w"></span> -<span class="p">{</span><span class="w"></span> -<span class="w"> </span><span class="n">NMClient</span><span class="w"> </span><span class="o">*</span><span class="n">client</span><span class="p">;</span><span class="w"></span> +<span class="kt">int</span> +<span class="nf">main</span><span class="w"> </span><span class="p">(</span><span class="kt">int</span><span class="w"> </span><span class="n">argc</span><span class="p">,</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">argv</span><span class="p">[])</span> +<span class="p">{</span> +<span class="w"> </span><span class="n">NMClient</span><span class="w"> </span><span class="o">*</span><span class="n">client</span><span class="p">;</span> -<span class="w"> </span><span class="n">client</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">nm_client_new</span><span class="w"> </span><span class="p">(</span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span><span class="w"></span> -<span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">client</span><span class="p">)</span><span class="w"></span> -<span class="w"> </span><span class="n">g_print</span><span class="w"> </span><span class="p">(</span><span class="s">"NetworkManager version: %s</span><span class="se">\n</span><span class="s">"</span><span class="p">,</span><span class="w"> </span><span class="n">nm_client_get_version</span><span class="w"> </span><span class="p">(</span><span class="n">client</span><span class="p">));</span><span class="w"></span> -<span class="p">}</span><span class="w"></span></pre></td> +<span class="w"> </span><span class="n">client</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">nm_client_new</span><span class="w"> </span><span class="p">(</span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">);</span> +<span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">client</span><span class="p">)</span> +<span class="w"> </span><span class="n">g_print</span><span class="w"> </span><span class="p">(</span><span class="s">"NetworkManager version: %s</span><span class="se">\n</span><span class="s">"</span><span class="p">,</span><span class="w"> </span><span class="n">nm_client_get_version</span><span class="w"> </span><span class="p">(</span><span class="n">client</span><span class="p">));</span> +<span class="p">}</span></pre></td> </tr> </tbody> </table> @@ -96,7 +96,7 @@ </p> <pre class="screen"><code class="prompt">$ </code><strong class="userinput"><code>cc $(pkg-config --libs --cflags libnm) -o hello-nm hello-nm.c</code></strong> <code class="prompt">$ </code><strong class="userinput"><code>./hello-nm</code></strong> - NetworkManager version: 1.42.6 + NetworkManager version: 1.42.8 <code class="prompt">$ </code></pre> <p> @@ -114,9 +114,9 @@ <td class="listing_lines" align="right"><pre>1 2 3</pre></td> - <td class="listing_code"><pre class="programlisting"><span class="n">PKG_CHECK_MODULES</span><span class="p">(</span><span class="n">LIBNM</span><span class="p">,</span><span class="w"> </span><span class="n">libnm</span><span class="w"> </span><span class="o">>=</span><span class="w"> </span><span class="mf">1.8</span><span class="p">)</span><span class="w"></span> -<span class="n">LIBNM_CFLAGS</span><span class="o">=</span><span class="s">"$LIBNM_CFLAGS -DNM_VERSION_MIN_REQUIRED=NM_VERSION_1_8"</span><span class="w"></span> -<span class="n">LIBNM_CFLAGS</span><span class="o">=</span><span class="s">"$LIBNM_CFLAGS -DNM_VERSION_MAX_ALLOWED=NM_VERSION_1_8"</span><span class="w"></span></pre></td> + <td class="listing_code"><pre class="programlisting"><span class="n">PKG_CHECK_MODULES</span><span class="p">(</span><span class="n">LIBNM</span><span class="p">,</span><span class="w"> </span><span class="n">libnm</span><span class="w"> </span><span class="o">>=</span><span class="w"> </span><span class="mf">1.8</span><span class="p">)</span> +<span class="n">LIBNM_CFLAGS</span><span class="o">=</span><span class="s">"$LIBNM_CFLAGS -DNM_VERSION_MIN_REQUIRED=NM_VERSION_1_8"</span> +<span class="n">LIBNM_CFLAGS</span><span class="o">=</span><span class="s">"$LIBNM_CFLAGS -DNM_VERSION_MAX_ALLOWED=NM_VERSION_1_8"</span></pre></td> </tr> </tbody> </table> @@ -137,12 +137,12 @@ 4 5 6</pre></td> - <td class="listing_code"><pre class="programlisting"><span class="n">import</span><span class="w"> </span><span class="n">gi</span><span class="w"></span> -<span class="n">gi</span><span class="p">.</span><span class="n">require_version</span><span class="p">(</span><span class="err">'</span><span class="n">NM</span><span class="err">'</span><span class="p">,</span><span class="w"> </span><span class="err">'</span><span class="mf">1.0</span><span class="err">'</span><span class="p">)</span><span class="w"></span> -<span class="n">from</span><span class="w"> </span><span class="n">gi</span><span class="p">.</span><span class="n">repository</span><span class="w"> </span><span class="n">import</span><span class="w"> </span><span class="n">NM</span><span class="w"></span> + <td class="listing_code"><pre class="programlisting"><span class="n">import</span><span class="w"> </span><span class="n">gi</span> +<span class="n">gi</span><span class="p">.</span><span class="n">require_version</span><span class="p">(</span><span class="err">'</span><span class="n">NM</span><span class="err">'</span><span class="p">,</span><span class="w"> </span><span class="err">'</span><span class="mf">1.0</span><span class="err">'</span><span class="p">)</span> +<span class="n">from</span><span class="w"> </span><span class="n">gi</span><span class="p">.</span><span class="n">repository</span><span class="w"> </span><span class="n">import</span><span class="w"> </span><span class="n">NM</span> -<span class="n">client</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">NM</span><span class="p">.</span><span class="n">Client</span><span class="p">.</span><span class="n">new</span><span class="p">(</span><span class="n">None</span><span class="p">)</span><span class="w"></span> -<span class="n">print</span><span class="w"> </span><span class="p">(</span><span class="s">"NetworkManager version "</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">client</span><span class="p">.</span><span class="n">get_version</span><span class="p">())</span><span class="w"></span></pre></td> +<span class="n">client</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">NM</span><span class="p">.</span><span class="n">Client</span><span class="p">.</span><span class="n">new</span><span class="p">(</span><span class="n">None</span><span class="p">)</span> +<span class="n">print</span><span class="w"> </span><span class="p">(</span><span class="s">"NetworkManager version "</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">client</span><span class="p">.</span><span class="n">get_version</span><span class="p">())</span></pre></td> </tr> </tbody> </table> diff --git a/docs/libnm/libnm-sections.txt b/docs/libnm/libnm-sections.txt index 6eff992b..e3b28803 100644 --- a/docs/libnm/libnm-sections.txt +++ b/docs/libnm/libnm-sections.txt @@ -2190,8 +2190,10 @@ nm_setting_bond_get_type <TITLE>NMSettingBondPort</TITLE> NM_SETTING_BOND_PORT_SETTING_NAME NM_SETTING_BOND_PORT_QUEUE_ID +NM_SETTING_BOND_PORT_PRIO nm_setting_bond_port_new nm_setting_bond_port_get_queue_id +nm_setting_bond_port_get_prio <SUBSECTION Standard> NMSettingBondPortClass NM_IS_SETTING_BOND_PORT @@ -4426,6 +4428,7 @@ NM_DEPRECATED_IN_1_42 NM_DEPRECATED_IN_1_42_FOR NM_AVAILABLE_IN_1_42 NM_AVAILABLE_IN_1_42_2 +NM_AVAILABLE_IN_1_42_8 </SECTION> <SECTION> @@ -4460,6 +4463,7 @@ NM_VERSION_1_38 NM_VERSION_1_40 NM_VERSION_1_42 NM_VERSION_1_42_2 +NM_VERSION_1_42_8 NM_API_VERSION NM_VERSION_CUR_STABLE NM_VERSION_NEXT_STABLE diff --git a/docs/libnm/version.xml b/docs/libnm/version.xml index 5f1d262b..31ffe251 100644 --- a/docs/libnm/version.xml +++ b/docs/libnm/version.xml @@ -1 +1 @@ -1.42.6 +1.42.8 diff --git a/man/NetworkManager-dispatcher.8 b/man/NetworkManager-dispatcher.8 index 52d2b0c0..41b3945d 100644 --- a/man/NetworkManager-dispatcher.8 +++ b/man/NetworkManager-dispatcher.8 @@ -2,9 +2,9 @@ .\" Title: NetworkManager-dispatcher .\" Author: .\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/> -.\" Date: 04/20/2023 +.\" Date: 06/28/2023 .\" Manual: Network management daemons -.\" Source: NetworkManager-dispatcher 1.42.6 +.\" Source: NetworkManager-dispatcher 1.42.8 .\" Language: English .\" .TH "NETWORKMANAGER\-DISPATCHER" "8" "" "NetworkManager\-dispatcher 1\&" "Network management daemons" diff --git a/man/NetworkManager-wait-online.service.8 b/man/NetworkManager-wait-online.service.8 index 542a0876..d4ee3288 100644 --- a/man/NetworkManager-wait-online.service.8 +++ b/man/NetworkManager-wait-online.service.8 @@ -2,9 +2,9 @@ .\" Title: NetworkManager-wait-online.service .\" Author: .\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/> -.\" Date: 04/20/2023 +.\" Date: 06/28/2023 .\" Manual: Network management daemons -.\" Source: NetworkManager-wait-online.service 1.42.6 +.\" Source: NetworkManager-wait-online.service 1.42.8 .\" Language: English .\" .TH "NETWORKMANAGER\-WAIT\-ONLINE\&" "8" "" "NetworkManager\-wait\-online\&" "Network management daemons" diff --git a/man/NetworkManager.8 b/man/NetworkManager.8 index 82d59289..7e9e2964 100644 --- a/man/NetworkManager.8 +++ b/man/NetworkManager.8 @@ -2,12 +2,12 @@ .\" Title: NetworkManager .\" Author: .\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/> -.\" Date: 04/20/2023 +.\" Date: 06/28/2023 .\" Manual: Network management daemons -.\" Source: NetworkManager 1.42.6 +.\" Source: NetworkManager 1.42.8 .\" Language: English .\" -.TH "NETWORKMANAGER" "8" "" "NetworkManager 1\&.42\&.6" "Network management daemons" +.TH "NETWORKMANAGER" "8" "" "NetworkManager 1\&.42\&.8" "Network management daemons" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/NetworkManager.conf.5 b/man/NetworkManager.conf.5 index c7d80186..800874d7 100644 --- a/man/NetworkManager.conf.5 +++ b/man/NetworkManager.conf.5 @@ -2,12 +2,12 @@ .\" Title: NetworkManager.conf .\" Author: .\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/> -.\" Date: 04/20/2023 +.\" Date: 06/28/2023 .\" Manual: Configuration -.\" Source: NetworkManager 1.42.6 +.\" Source: NetworkManager 1.42.8 .\" Language: English .\" -.TH "NETWORKMANAGER\&.CONF" "5" "" "NetworkManager 1\&.42\&.6" "Configuration" +.TH "NETWORKMANAGER\&.CONF" "5" "" "NetworkManager 1\&.42\&.8" "Configuration" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -1372,7 +1372,7 @@ NM_CONFIG_ENABLE_TAG, like: .RS 4 .\} .nf -# always skip loading the file when running NetworkManager with +# only load the file when running NetworkManager with # environment variable "NM_CONFIG_ENABLE_TAG=TAG1" [\&.config] enable=env:TAG1 diff --git a/man/NetworkManager.conf.xml b/man/NetworkManager.conf.xml index 0dcf805d..3ee942b2 100644 --- a/man/NetworkManager.conf.xml +++ b/man/NetworkManager.conf.xml @@ -1568,7 +1568,7 @@ enable=nm-version-max:1.2.6 You can also match against the value of the environment variable <literal>NM_CONFIG_ENABLE_TAG</literal>, like: <programlisting> -# always skip loading the file when running NetworkManager with +# only load the file when running NetworkManager with # environment variable "NM_CONFIG_ENABLE_TAG=TAG1" [.config] enable=env:TAG1 diff --git a/man/nm-cloud-setup.8 b/man/nm-cloud-setup.8 index 90a8b8c2..da7d1712 100644 --- a/man/nm-cloud-setup.8 +++ b/man/nm-cloud-setup.8 @@ -2,12 +2,12 @@ .\" Title: nm-cloud-setup .\" Author: .\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/> -.\" Date: 04/20/2023 +.\" Date: 06/28/2023 .\" Manual: Automatic Network Configuration in Cloud with NetworkManager -.\" Source: NetworkManager 1.42.6 +.\" Source: NetworkManager 1.42.8 .\" Language: English .\" -.TH "NM\-CLOUD\-SETUP" "8" "" "NetworkManager 1\&.42\&.6" "Automatic Network Configuratio" +.TH "NM\-CLOUD\-SETUP" "8" "" "NetworkManager 1\&.42\&.8" "Automatic Network Configuratio" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/nm-initrd-generator.8 b/man/nm-initrd-generator.8 index a2d91374..314636b0 100644 --- a/man/nm-initrd-generator.8 +++ b/man/nm-initrd-generator.8 @@ -2,12 +2,12 @@ .\" Title: nm-initrd-generator .\" Author: .\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/> -.\" Date: 04/20/2023 +.\" Date: 06/28/2023 .\" Manual: System Administration -.\" Source: NetworkManager 1.42.6 +.\" Source: NetworkManager 1.42.8 .\" Language: English .\" -.TH "NM\-INITRD\-GENERATOR" "8" "" "NetworkManager 1\&.42\&.6" "System Administration" +.TH "NM\-INITRD\-GENERATOR" "8" "" "NetworkManager 1\&.42\&.8" "System Administration" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/nm-online.1 b/man/nm-online.1 index a3d87696..e3e934c3 100644 --- a/man/nm-online.1 +++ b/man/nm-online.1 @@ -2,12 +2,12 @@ .\" Title: nm-online .\" Author: .\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/> -.\" Date: 04/20/2023 +.\" Date: 06/28/2023 .\" Manual: General Commands Manual -.\" Source: NetworkManager 1.42.6 +.\" Source: NetworkManager 1.42.8 .\" Language: English .\" -.TH "NM\-ONLINE" "1" "" "NetworkManager 1\&.42\&.6" "General Commands Manual" +.TH "NM\-ONLINE" "1" "" "NetworkManager 1\&.42\&.8" "General Commands Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/nm-openvswitch.7 b/man/nm-openvswitch.7 index 36e617cb..dcffc550 100644 --- a/man/nm-openvswitch.7 +++ b/man/nm-openvswitch.7 @@ -2,12 +2,12 @@ .\" Title: nm-openvswitch .\" Author: .\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/> -.\" Date: 04/20/2023 +.\" Date: 06/28/2023 .\" Manual: Open vSwitch support overview -.\" Source: NetworkManager 1.42.6 +.\" Source: NetworkManager 1.42.8 .\" Language: English .\" -.TH "NM\-OPENVSWITCH" "7" "" "NetworkManager 1\&.42\&.6" "Open vSwitch support overview" +.TH "NM\-OPENVSWITCH" "7" "" "NetworkManager 1\&.42\&.8" "Open vSwitch support overview" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/nm-settings-dbus.5 b/man/nm-settings-dbus.5 index 74bb6dc2..c6038e9f 100644 --- a/man/nm-settings-dbus.5 +++ b/man/nm-settings-dbus.5 @@ -2,12 +2,12 @@ .\" Title: nm-settings-dbus .\" Author: .\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/> -.\" Date: 04/20/2023 +.\" Date: 06/28/2023 .\" Manual: Configuration -.\" Source: NetworkManager 1.42.6 +.\" Source: NetworkManager 1.42.8 .\" Language: English .\" -.TH "NM\-SETTINGS\-DBUS" "5" "" "NetworkManager 1\&.42\&.6" "Configuration" +.TH "NM\-SETTINGS\-DBUS" "5" "" "NetworkManager 1\&.42\&.8" "Configuration" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -2009,7 +2009,11 @@ int32 T}:T{ \-1 T}:T{ -The InfiniBand P_Key to use for this device\&. A value of \-1 means to use the default P_Key (aka "the P_Key at index 0")\&. Otherwise, it is a 16\-bit unsigned integer, whose high bit is set if it is a "full membership" P_Key\&. +The InfiniBand p\-key to use for this device\&. A value of \-1 means to use the default p\-key (aka "the p\-key at index 0")\&. Otherwise, it is a 16\-bit unsigned integer, whose high bit 0x8000 is set if it is a "full membership" p\-key\&. The values 0 and 0x8000 are not allowed\&. + +With the p\-key set, the interface name is always "$parent\&.$p_key"\&. Setting "connection\&.interface\-name" to another name is not supported\&. + +Note that kernel will internally always set the full membership bit, although the interface name does not reflect that\&. Usually the user would want to configure a full membership p\-key with 0x8000 flag set\&. T} T{ parent @@ -5857,8 +5861,18 @@ T}:T{ Value Description T} .T& +l l l l l l l l. T{ +prio +T}:T{ +int32 +T}:T{ +0 +T}:T{ +The port priority for bond active port re\-selection during failover\&. A higher number means a higher priority in selection\&. The primary port has the highest priority\&. This option is only compatible with active\-backup, balance\-tlb and balance\-alb modes\&. +T} +T{ queue\-id T}:T{ uint32 diff --git a/man/nm-settings-dbus.xml b/man/nm-settings-dbus.xml index b129a47d..93b6f2c4 100644 --- a/man/nm-settings-dbus.xml +++ b/man/nm-settings-dbus.xml @@ -1,6 +1,6 @@ <?xml version="1.0"?> <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd"> -<refentry id="nm-settings-dbus"><refentryinfo><title>nm-settings-dbus</title><author>NetworkManager developers</author></refentryinfo><refmeta><refentrytitle>nm-settings-dbus</refentrytitle><manvolnum>5</manvolnum><refmiscinfo class="source">NetworkManager</refmiscinfo><refmiscinfo class="manual">Configuration</refmiscinfo><refmiscinfo class="version">1.42.6</refmiscinfo></refmeta><refnamediv><refname>nm-settings-dbus</refname><refpurpose>Description of settings and properties of NetworkManager connection profiles on the D-Bus API</refpurpose></refnamediv><refsect1 id="description"><title>Description</title><para> +<refentry id="nm-settings-dbus"><refentryinfo><title>nm-settings-dbus</title><author>NetworkManager developers</author></refentryinfo><refmeta><refentrytitle>nm-settings-dbus</refentrytitle><manvolnum>5</manvolnum><refmiscinfo class="source">NetworkManager</refmiscinfo><refmiscinfo class="manual">Configuration</refmiscinfo><refmiscinfo class="version">1.42.8</refmiscinfo></refmeta><refnamediv><refname>nm-settings-dbus</refname><refpurpose>Description of settings and properties of NetworkManager connection profiles on the D-Bus API</refpurpose></refnamediv><refsect1 id="description"><title>Description</title><para> NetworkManager is based on a concept of connection profiles, sometimes referred to as connections only. These connection profiles contain a network configuration. When NetworkManager activates a connection profile on a network device the configuration will @@ -152,7 +152,11 @@ where $vid is either a single id between 1 and 4094 or a range, represented as a Since 1.34, NULL is the default and means "fabric". Before 1.34, NULL was rejected as invalid and the default was "fabric".</entry></row><row><entry align="left" id="nm-settings-dbus.property.dcb.app-fcoe-priority">app-fcoe-priority</entry><entry align="left">int32</entry><entry align="left">-1</entry><entry>The highest User Priority (0 - 7) which FCoE frames should use, or -1 for default priority. Only used when the "app-fcoe-flags" property includes the NM_SETTING_DCB_FLAG_ENABLE (0x1) flag.</entry></row><row><entry align="left" id="nm-settings-dbus.property.dcb.app-fip-flags">app-fip-flags</entry><entry align="left">NMSettingDcbFlags (uint32)</entry><entry align="left"/><entry>Specifies the NMSettingDcbFlags for the DCB FIP application. Flags may be any combination of NM_SETTING_DCB_FLAG_ENABLE (0x1), NM_SETTING_DCB_FLAG_ADVERTISE (0x2), and NM_SETTING_DCB_FLAG_WILLING (0x4).</entry></row><row><entry align="left" id="nm-settings-dbus.property.dcb.app-fip-priority">app-fip-priority</entry><entry align="left">int32</entry><entry align="left">-1</entry><entry>The highest User Priority (0 - 7) which FIP frames should use, or -1 for default priority. Only used when the "app-fip-flags" property includes the NM_SETTING_DCB_FLAG_ENABLE (0x1) flag.</entry></row><row><entry align="left" id="nm-settings-dbus.property.dcb.app-iscsi-flags">app-iscsi-flags</entry><entry align="left">NMSettingDcbFlags (uint32)</entry><entry align="left"/><entry>Specifies the NMSettingDcbFlags for the DCB iSCSI application. Flags may be any combination of NM_SETTING_DCB_FLAG_ENABLE (0x1), NM_SETTING_DCB_FLAG_ADVERTISE (0x2), and NM_SETTING_DCB_FLAG_WILLING (0x4).</entry></row><row><entry align="left" id="nm-settings-dbus.property.dcb.app-iscsi-priority">app-iscsi-priority</entry><entry align="left">int32</entry><entry align="left">-1</entry><entry>The highest User Priority (0 - 7) which iSCSI frames should use, or -1 for default priority. Only used when the "app-iscsi-flags" property includes the NM_SETTING_DCB_FLAG_ENABLE (0x1) flag.</entry></row><row><entry align="left" id="nm-settings-dbus.property.dcb.priority-bandwidth">priority-bandwidth</entry><entry align="left">array of uint32</entry><entry align="left"/><entry>An array of 8 uint values, where the array index corresponds to the User Priority (0 - 7) and the value indicates the percentage of bandwidth of the priority's assigned group that the priority may use. The sum of all percentages for priorities which belong to the same group must total 100 percents.</entry></row><row><entry align="left" id="nm-settings-dbus.property.dcb.priority-flow-control">priority-flow-control</entry><entry align="left">array of uint32</entry><entry align="left"/><entry>An array of 8 boolean values, where the array index corresponds to the User Priority (0 - 7) and the value indicates whether or not the corresponding priority should transmit priority pause.</entry></row><row><entry align="left" id="nm-settings-dbus.property.dcb.priority-flow-control-flags">priority-flow-control-flags</entry><entry align="left">NMSettingDcbFlags (uint32)</entry><entry align="left"/><entry>Specifies the NMSettingDcbFlags for DCB Priority Flow Control (PFC). Flags may be any combination of NM_SETTING_DCB_FLAG_ENABLE (0x1), NM_SETTING_DCB_FLAG_ADVERTISE (0x2), and NM_SETTING_DCB_FLAG_WILLING (0x4).</entry></row><row><entry align="left" id="nm-settings-dbus.property.dcb.priority-group-bandwidth">priority-group-bandwidth</entry><entry align="left">array of uint32</entry><entry align="left"/><entry>An array of 8 uint values, where the array index corresponds to the Priority Group ID (0 - 7) and the value indicates the percentage of link bandwidth allocated to that group. Allowed values are 0 - 100, and the sum of all values must total 100 percents.</entry></row><row><entry align="left" id="nm-settings-dbus.property.dcb.priority-group-flags">priority-group-flags</entry><entry align="left">NMSettingDcbFlags (uint32)</entry><entry align="left"/><entry>Specifies the NMSettingDcbFlags for DCB Priority Groups. Flags may be any combination of NM_SETTING_DCB_FLAG_ENABLE (0x1), NM_SETTING_DCB_FLAG_ADVERTISE (0x2), and NM_SETTING_DCB_FLAG_WILLING (0x4).</entry></row><row><entry align="left" id="nm-settings-dbus.property.dcb.priority-group-id">priority-group-id</entry><entry align="left">array of uint32</entry><entry align="left"/><entry>An array of 8 uint values, where the array index corresponds to the User Priority (0 - 7) and the value indicates the Priority Group ID. Allowed Priority Group ID values are 0 - 7 or 15 for the unrestricted group.</entry></row><row><entry align="left" id="nm-settings-dbus.property.dcb.priority-strict-bandwidth">priority-strict-bandwidth</entry><entry align="left">array of uint32</entry><entry align="left"/><entry>An array of 8 boolean values, where the array index corresponds to the User Priority (0 - 7) and the value indicates whether or not the priority may use all of the bandwidth allocated to its assigned group.</entry></row><row><entry align="left" id="nm-settings-dbus.property.dcb.priority-traffic-class">priority-traffic-class</entry><entry align="left">array of uint32</entry><entry align="left"/><entry>An array of 8 uint values, where the array index corresponds to the User Priority (0 - 7) and the value indicates the traffic class (0 - 7) to which the priority is mapped.</entry></row></tbody></tgroup></informaltable></refsect2><refsect2><title>dummy setting</title><para>Dummy Link Settings.</para><informaltable><tgroup cols="4"><thead><row><entry>Key Name</entry><entry>Value Type</entry><entry>Default Value</entry><entry>Value Description</entry></row></thead><tbody/></tgroup></informaltable></refsect2><refsect2><title>ethtool setting</title><para>Ethtool Ethernet Settings.</para><informaltable><tgroup cols="4"><thead><row><entry>Key Name</entry><entry>Value Type</entry><entry>Default Value</entry><entry>Value Description</entry></row></thead><tbody/></tgroup></informaltable></refsect2><refsect2><title>generic setting</title><para>Generic Link Settings.</para><informaltable><tgroup cols="4"><thead><row><entry>Key Name</entry><entry>Value Type</entry><entry>Default Value</entry><entry>Value Description</entry></row></thead><tbody/></tgroup></informaltable></refsect2><refsect2><title>gsm setting</title><para>GSM-based Mobile Broadband Settings.</para><informaltable><tgroup cols="4"><thead><row><entry>Key Name</entry><entry>Value Type</entry><entry>Default Value</entry><entry>Value Description</entry></row></thead><tbody><row><entry align="left" id="nm-settings-dbus.property.gsm.apn">apn</entry><entry align="left">string</entry><entry align="left"/><entry>The GPRS Access Point Name specifying the APN used when establishing a data session with the GSM-based network. The APN often determines how the user will be billed for their network usage and whether the user has access to the Internet or just a provider-specific walled-garden, so it is important to use the correct APN for the user's mobile broadband plan. The APN may only be composed of the characters a-z, 0-9, ., and - per GSM 03.60 Section 14.9.</entry></row><row><entry align="left" id="nm-settings-dbus.property.gsm.auto-config">auto-config</entry><entry align="left">boolean</entry><entry align="left">FALSE</entry><entry>When TRUE, the settings such as APN, username, or password will default to values that match the network the modem will register to in the Mobile Broadband Provider database.</entry></row><row><entry align="left" id="nm-settings-dbus.property.gsm.device-id">device-id</entry><entry align="left">string</entry><entry align="left"/><entry>The device unique identifier (as given by the WWAN management service) which this connection applies to. If given, the connection will only apply to the specified device.</entry></row><row><entry align="left" id="nm-settings-dbus.property.gsm.home-only">home-only</entry><entry align="left">boolean</entry><entry align="left">FALSE</entry><entry>When TRUE, only connections to the home network will be allowed. Connections to roaming networks will not be made.</entry></row><row><entry align="left" id="nm-settings-dbus.property.gsm.mtu">mtu</entry><entry align="left">uint32</entry><entry align="left">0</entry><entry>If non-zero, only transmit packets of the specified size or smaller, breaking larger packets up into multiple frames.</entry></row><row><entry align="left" id="nm-settings-dbus.property.gsm.network-id">network-id</entry><entry align="left">string</entry><entry align="left"/><entry>The Network ID (GSM LAI format, ie MCC-MNC) to force specific network registration. If the Network ID is specified, NetworkManager will attempt to force the device to register only on the specified network. This can be used to ensure that the device does not roam when direct roaming control of the device is not otherwise possible.</entry></row><row><entry align="left" id="nm-settings-dbus.property.gsm.number">number</entry><entry align="left">string</entry><entry align="left"/><entry>Legacy setting that used to help establishing PPP data sessions for GSM-based modems. -This property is deprecated since version 1.16.User-provided values for this setting are no longer used.</entry></row><row><entry align="left" id="nm-settings-dbus.property.gsm.password">password</entry><entry align="left">string</entry><entry align="left"/><entry>The password used to authenticate with the network, if required. Many providers do not require a password, or accept any password. But if a password is required, it is specified here.</entry></row><row><entry align="left" id="nm-settings-dbus.property.gsm.password-flags">password-flags</entry><entry align="left">NMSettingSecretFlags (uint32)</entry><entry align="left"/><entry>Flags indicating how to handle the "password" property.</entry></row><row><entry align="left" id="nm-settings-dbus.property.gsm.pin">pin</entry><entry align="left">string</entry><entry align="left"/><entry>If the SIM is locked with a PIN it must be unlocked before any other operations are requested. Specify the PIN here to allow operation of the device.</entry></row><row><entry align="left" id="nm-settings-dbus.property.gsm.pin-flags">pin-flags</entry><entry align="left">NMSettingSecretFlags (uint32)</entry><entry align="left"/><entry>Flags indicating how to handle the "pin" property.</entry></row><row><entry align="left" id="nm-settings-dbus.property.gsm.sim-id">sim-id</entry><entry align="left">string</entry><entry align="left"/><entry>The SIM card unique identifier (as given by the WWAN management service) which this connection applies to. If given, the connection will apply to any device also allowed by "device-id" which contains a SIM card matching the given identifier.</entry></row><row><entry align="left" id="nm-settings-dbus.property.gsm.sim-operator-id">sim-operator-id</entry><entry align="left">string</entry><entry align="left"/><entry>A MCC/MNC string like "310260" or "21601" identifying the specific mobile network operator which this connection applies to. If given, the connection will apply to any device also allowed by "device-id" and "sim-id" which contains a SIM card provisioned by the given operator.</entry></row><row><entry align="left" id="nm-settings-dbus.property.gsm.username">username</entry><entry align="left">string</entry><entry align="left"/><entry>The username used to authenticate with the network, if required. Many providers do not require a username, or accept any username. But if a username is required, it is specified here.</entry></row></tbody></tgroup></informaltable></refsect2><refsect2><title>infiniband setting</title><para>Infiniband Settings.</para><informaltable><tgroup cols="4"><thead><row><entry>Key Name</entry><entry>Value Type</entry><entry>Default Value</entry><entry>Value Description</entry></row></thead><tbody><row><entry align="left" id="nm-settings-dbus.property.infiniband.mac-address">mac-address</entry><entry align="left">byte array</entry><entry align="left"/><entry>If specified, this connection will only apply to the IPoIB device whose permanent MAC address matches. This property does not change the MAC address of the device (i.e. MAC spoofing).</entry></row><row><entry align="left" id="nm-settings-dbus.property.infiniband.mtu">mtu</entry><entry align="left">uint32</entry><entry align="left">0</entry><entry>If non-zero, only transmit packets of the specified size or smaller, breaking larger packets up into multiple frames.</entry></row><row><entry align="left" id="nm-settings-dbus.property.infiniband.p-key">p-key</entry><entry align="left">int32</entry><entry align="left">-1</entry><entry>The InfiniBand P_Key to use for this device. A value of -1 means to use the default P_Key (aka "the P_Key at index 0"). Otherwise, it is a 16-bit unsigned integer, whose high bit is set if it is a "full membership" P_Key.</entry></row><row><entry align="left" id="nm-settings-dbus.property.infiniband.parent">parent</entry><entry align="left">string</entry><entry align="left"/><entry>The interface name of the parent device of this device. Normally NULL, but if the "p_key" property is set, then you must specify the base device by setting either this property or "mac-address".</entry></row><row><entry align="left" id="nm-settings-dbus.property.infiniband.transport-mode">transport-mode</entry><entry align="left">string</entry><entry align="left"/><entry>The IP-over-InfiniBand transport mode. Either "datagram" or "connected".</entry></row></tbody></tgroup></informaltable></refsect2><refsect2><title>ipv4 setting</title><para>IPv4 Settings.</para><informaltable><tgroup cols="4"><thead><row><entry>Key Name</entry><entry>Value Type</entry><entry>Default Value</entry><entry>Value Description</entry></row></thead><tbody><row><entry align="left" id="nm-settings-dbus.property.ipv4.address-data">address-data</entry><entry align="left">array of vardict</entry><entry align="left"/><entry>Array of IPv4 addresses. Each address dictionary contains at least 'address' and 'prefix' entries, containing the IP address as a string, and the prefix length as a uint32. Additional attributes may also exist on some addresses.</entry></row><row><entry align="left" id="nm-settings-dbus.property.ipv4.addresses">addresses</entry><entry align="left">array of array of uint32</entry><entry align="left"/><entry>Deprecated in favor of the 'address-data' and 'gateway' properties, but this can be used for backward-compatibility with older daemons. Note that if you send this property the daemon will ignore 'address-data' and 'gateway'. +This property is deprecated since version 1.16.User-provided values for this setting are no longer used.</entry></row><row><entry align="left" id="nm-settings-dbus.property.gsm.password">password</entry><entry align="left">string</entry><entry align="left"/><entry>The password used to authenticate with the network, if required. Many providers do not require a password, or accept any password. But if a password is required, it is specified here.</entry></row><row><entry align="left" id="nm-settings-dbus.property.gsm.password-flags">password-flags</entry><entry align="left">NMSettingSecretFlags (uint32)</entry><entry align="left"/><entry>Flags indicating how to handle the "password" property.</entry></row><row><entry align="left" id="nm-settings-dbus.property.gsm.pin">pin</entry><entry align="left">string</entry><entry align="left"/><entry>If the SIM is locked with a PIN it must be unlocked before any other operations are requested. Specify the PIN here to allow operation of the device.</entry></row><row><entry align="left" id="nm-settings-dbus.property.gsm.pin-flags">pin-flags</entry><entry align="left">NMSettingSecretFlags (uint32)</entry><entry align="left"/><entry>Flags indicating how to handle the "pin" property.</entry></row><row><entry align="left" id="nm-settings-dbus.property.gsm.sim-id">sim-id</entry><entry align="left">string</entry><entry align="left"/><entry>The SIM card unique identifier (as given by the WWAN management service) which this connection applies to. If given, the connection will apply to any device also allowed by "device-id" which contains a SIM card matching the given identifier.</entry></row><row><entry align="left" id="nm-settings-dbus.property.gsm.sim-operator-id">sim-operator-id</entry><entry align="left">string</entry><entry align="left"/><entry>A MCC/MNC string like "310260" or "21601" identifying the specific mobile network operator which this connection applies to. If given, the connection will apply to any device also allowed by "device-id" and "sim-id" which contains a SIM card provisioned by the given operator.</entry></row><row><entry align="left" id="nm-settings-dbus.property.gsm.username">username</entry><entry align="left">string</entry><entry align="left"/><entry>The username used to authenticate with the network, if required. Many providers do not require a username, or accept any username. But if a username is required, it is specified here.</entry></row></tbody></tgroup></informaltable></refsect2><refsect2><title>infiniband setting</title><para>Infiniband Settings.</para><informaltable><tgroup cols="4"><thead><row><entry>Key Name</entry><entry>Value Type</entry><entry>Default Value</entry><entry>Value Description</entry></row></thead><tbody><row><entry align="left" id="nm-settings-dbus.property.infiniband.mac-address">mac-address</entry><entry align="left">byte array</entry><entry align="left"/><entry>If specified, this connection will only apply to the IPoIB device whose permanent MAC address matches. This property does not change the MAC address of the device (i.e. MAC spoofing).</entry></row><row><entry align="left" id="nm-settings-dbus.property.infiniband.mtu">mtu</entry><entry align="left">uint32</entry><entry align="left">0</entry><entry>If non-zero, only transmit packets of the specified size or smaller, breaking larger packets up into multiple frames.</entry></row><row><entry align="left" id="nm-settings-dbus.property.infiniband.p-key">p-key</entry><entry align="left">int32</entry><entry align="left">-1</entry><entry>The InfiniBand p-key to use for this device. A value of -1 means to use the default p-key (aka "the p-key at index 0"). Otherwise, it is a 16-bit unsigned integer, whose high bit 0x8000 is set if it is a "full membership" p-key. The values 0 and 0x8000 are not allowed. + +With the p-key set, the interface name is always "$parent.$p_key". Setting "connection.interface-name" to another name is not supported. + +Note that kernel will internally always set the full membership bit, although the interface name does not reflect that. Usually the user would want to configure a full membership p-key with 0x8000 flag set.</entry></row><row><entry align="left" id="nm-settings-dbus.property.infiniband.parent">parent</entry><entry align="left">string</entry><entry align="left"/><entry>The interface name of the parent device of this device. Normally NULL, but if the "p_key" property is set, then you must specify the base device by setting either this property or "mac-address".</entry></row><row><entry align="left" id="nm-settings-dbus.property.infiniband.transport-mode">transport-mode</entry><entry align="left">string</entry><entry align="left"/><entry>The IP-over-InfiniBand transport mode. Either "datagram" or "connected".</entry></row></tbody></tgroup></informaltable></refsect2><refsect2><title>ipv4 setting</title><para>IPv4 Settings.</para><informaltable><tgroup cols="4"><thead><row><entry>Key Name</entry><entry>Value Type</entry><entry>Default Value</entry><entry>Value Description</entry></row></thead><tbody><row><entry align="left" id="nm-settings-dbus.property.ipv4.address-data">address-data</entry><entry align="left">array of vardict</entry><entry align="left"/><entry>Array of IPv4 addresses. Each address dictionary contains at least 'address' and 'prefix' entries, containing the IP address as a string, and the prefix length as a uint32. Additional attributes may also exist on some addresses.</entry></row><row><entry align="left" id="nm-settings-dbus.property.ipv4.addresses">addresses</entry><entry align="left">array of array of uint32</entry><entry align="left"/><entry>Deprecated in favor of the 'address-data' and 'gateway' properties, but this can be used for backward-compatibility with older daemons. Note that if you send this property the daemon will ignore 'address-data' and 'gateway'. Array of IPv4 address structures. Each IPv4 address structure is composed of 3 32-bit values; the first being the IPv4 address (network byte order), the second the prefix (1 - 32), and last the IPv4 gateway (network byte order). The gateway may be left as 0 if no gateway exists for that subnet.</entry></row><row><entry align="left" id="nm-settings-dbus.property.ipv4.auto-route-ext-gw">auto-route-ext-gw</entry><entry align="left">NMTernary (int32)</entry><entry align="left"/><entry>VPN connections will default to add the route automatically unless this setting is set to FALSE. For other connection types, adding such an automatic route is currently not supported and setting this to TRUE has no effect.</entry></row><row><entry align="left" id="nm-settings-dbus.property.ipv4.dad-timeout">dad-timeout</entry><entry align="left">int32</entry><entry align="left">-1</entry><entry>Timeout in milliseconds used to check for the presence of duplicate IP addresses on the network. If an address conflict is detected, the activation will fail. A zero value means that no duplicate address detection is performed, -1 means the default value (either configuration ipvx.dad-timeout override or zero). A value greater than zero is a timeout in milliseconds. @@ -448,7 +452,7 @@ This property must be set for any Wi-Fi connection that uses security.</entry></ There's little point in changing the default setting as NetworkManager will automatically determine whether it's feasible to start WPS enrollment from the Access Point capabilities. -WPS can be disabled by setting this property to a value of 1.</entry></row></tbody></tgroup></informaltable></refsect2><refsect2><title>wpan setting</title><para>IEEE 802.15.4 (WPAN) MAC Settings.</para><informaltable><tgroup cols="4"><thead><row><entry>Key Name</entry><entry>Value Type</entry><entry>Default Value</entry><entry>Value Description</entry></row></thead><tbody><row><entry align="left" id="nm-settings-dbus.property.wpan.channel">channel</entry><entry align="left">int32</entry><entry align="left">-1</entry><entry>IEEE 802.15.4 channel. A positive integer or -1, meaning "do not set, use whatever the device is already set to".</entry></row><row><entry align="left" id="nm-settings-dbus.property.wpan.mac-address">mac-address</entry><entry align="left">string</entry><entry align="left"/><entry>If specified, this connection will only apply to the IEEE 802.15.4 (WPAN) MAC layer device whose permanent MAC address matches.</entry></row><row><entry align="left" id="nm-settings-dbus.property.wpan.page">page</entry><entry align="left">int32</entry><entry align="left">-1</entry><entry>IEEE 802.15.4 channel page. A positive integer or -1, meaning "do not set, use whatever the device is already set to".</entry></row><row><entry align="left" id="nm-settings-dbus.property.wpan.pan-id">pan-id</entry><entry align="left">uint32</entry><entry align="left">65535</entry><entry>IEEE 802.15.4 Personal Area Network (PAN) identifier.</entry></row><row><entry align="left" id="nm-settings-dbus.property.wpan.short-address">short-address</entry><entry align="left">uint32</entry><entry align="left">65535</entry><entry>Short IEEE 802.15.4 address to be used within a restricted environment.</entry></row></tbody></tgroup></informaltable></refsect2><refsect2><title>bond-port setting</title><para>Bond Port Settings.</para><informaltable><tgroup cols="4"><thead><row><entry>Key Name</entry><entry>Value Type</entry><entry>Default Value</entry><entry>Value Description</entry></row></thead><tbody><row><entry align="left" id="nm-settings-dbus.property.bond-port.queue-id">queue-id</entry><entry align="left">uint32</entry><entry align="left">0</entry><entry>The queue ID of this bond port. The maximum value of queue ID is the number of TX queues currently active in device.</entry></row></tbody></tgroup></informaltable></refsect2><refsect2><title>hostname setting</title><para>Hostname settings.</para><informaltable><tgroup cols="4"><thead><row><entry>Key Name</entry><entry>Value Type</entry><entry>Default Value</entry><entry>Value Description</entry></row></thead><tbody><row><entry align="left" id="nm-settings-dbus.property.hostname.from-dhcp">from-dhcp</entry><entry align="left">NMTernary (int32)</entry><entry align="left"/><entry>Whether the system hostname can be determined from DHCP on this connection. +WPS can be disabled by setting this property to a value of 1.</entry></row></tbody></tgroup></informaltable></refsect2><refsect2><title>wpan setting</title><para>IEEE 802.15.4 (WPAN) MAC Settings.</para><informaltable><tgroup cols="4"><thead><row><entry>Key Name</entry><entry>Value Type</entry><entry>Default Value</entry><entry>Value Description</entry></row></thead><tbody><row><entry align="left" id="nm-settings-dbus.property.wpan.channel">channel</entry><entry align="left">int32</entry><entry align="left">-1</entry><entry>IEEE 802.15.4 channel. A positive integer or -1, meaning "do not set, use whatever the device is already set to".</entry></row><row><entry align="left" id="nm-settings-dbus.property.wpan.mac-address">mac-address</entry><entry align="left">string</entry><entry align="left"/><entry>If specified, this connection will only apply to the IEEE 802.15.4 (WPAN) MAC layer device whose permanent MAC address matches.</entry></row><row><entry align="left" id="nm-settings-dbus.property.wpan.page">page</entry><entry align="left">int32</entry><entry align="left">-1</entry><entry>IEEE 802.15.4 channel page. A positive integer or -1, meaning "do not set, use whatever the device is already set to".</entry></row><row><entry align="left" id="nm-settings-dbus.property.wpan.pan-id">pan-id</entry><entry align="left">uint32</entry><entry align="left">65535</entry><entry>IEEE 802.15.4 Personal Area Network (PAN) identifier.</entry></row><row><entry align="left" id="nm-settings-dbus.property.wpan.short-address">short-address</entry><entry align="left">uint32</entry><entry align="left">65535</entry><entry>Short IEEE 802.15.4 address to be used within a restricted environment.</entry></row></tbody></tgroup></informaltable></refsect2><refsect2><title>bond-port setting</title><para>Bond Port Settings.</para><informaltable><tgroup cols="4"><thead><row><entry>Key Name</entry><entry>Value Type</entry><entry>Default Value</entry><entry>Value Description</entry></row></thead><tbody><row><entry align="left" id="nm-settings-dbus.property.bond-port.prio">prio</entry><entry align="left">int32</entry><entry align="left">0</entry><entry>The port priority for bond active port re-selection during failover. A higher number means a higher priority in selection. The primary port has the highest priority. This option is only compatible with active-backup, balance-tlb and balance-alb modes.</entry></row><row><entry align="left" id="nm-settings-dbus.property.bond-port.queue-id">queue-id</entry><entry align="left">uint32</entry><entry align="left">0</entry><entry>The queue ID of this bond port. The maximum value of queue ID is the number of TX queues currently active in device.</entry></row></tbody></tgroup></informaltable></refsect2><refsect2><title>hostname setting</title><para>Hostname settings.</para><informaltable><tgroup cols="4"><thead><row><entry>Key Name</entry><entry>Value Type</entry><entry>Default Value</entry><entry>Value Description</entry></row></thead><tbody><row><entry align="left" id="nm-settings-dbus.property.hostname.from-dhcp">from-dhcp</entry><entry align="left">NMTernary (int32)</entry><entry align="left"/><entry>Whether the system hostname can be determined from DHCP on this connection. When set to NM_TERNARY_DEFAULT (-1), the value from global configuration is used. If the property doesn't have a value in the global configuration, NetworkManager assumes the value to be NM_TERNARY_TRUE (1).</entry></row><row><entry align="left" id="nm-settings-dbus.property.hostname.from-dns-lookup">from-dns-lookup</entry><entry align="left">NMTernary (int32)</entry><entry align="left"/><entry>Whether the system hostname can be determined from reverse DNS lookup of addresses on this device. diff --git a/man/nm-settings-ifcfg-rh.5 b/man/nm-settings-ifcfg-rh.5 index 49d97776..1364260b 100644 --- a/man/nm-settings-ifcfg-rh.5 +++ b/man/nm-settings-ifcfg-rh.5 @@ -2,12 +2,12 @@ .\" Title: nm-settings-ifcfg-rh .\" Author: .\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/> -.\" Date: 04/20/2023 +.\" Date: 06/28/2023 .\" Manual: Configuration -.\" Source: NetworkManager 1.42.6 +.\" Source: NetworkManager 1.42.8 .\" Language: English .\" -.TH "NM\-SETTINGS\-IFCFG\-RH" "5" "" "NetworkManager 1\&.42\&.6" "Configuration" +.TH "NM\-SETTINGS\-IFCFG\-RH" "5" "" "NetworkManager 1\&.42\&.8" "Configuration" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -1512,11 +1512,12 @@ T}:T{ Description T} .T& +l l l l l l l l. T{ queue\-id T}:T{ -BONDING_OPTS: queue\-id= +BOND_PORT_QUEUE_ID\fI(+)\fR T}:T{ 0 T}:T{ @@ -1524,6 +1525,17 @@ Queue ID\&.\fB Allowed values: \fR0 \- 65535 T} +T{ +prio +T}:T{ +BOND_PORT_PRIO\fI(+)\fR +T}:T{ +0 +T}:T{ +Port priority\&.\fB + +Allowed values: \fR\-2147483648 \- 2147483647 +T} .TE .sp 1 .sp @@ -2599,11 +2611,11 @@ T} T{ p\-key T}:T{ -PKEY_ID (and PKEY=yes) +PKEY_ID or PKEY_ID_NM(*) (requires PKEY=yes) T}:T{ PKEY=no T}:T{ -InfiniBand P_Key\&. The value can be a hex number prefixed with "0x" or a decimal number\&. When PKEY_ID is specified, PHYSDEV and DEVICE also must be specified\&.\fB +InfiniBand P_Key\&. The value can be a hex number prefixed with "0x" or a decimal number\&. When PKEY_ID is specified, PHYSDEV must be specified\&. Note that ifcfg\-rh format will always automatically set the full membership flag 0x8000 for the PKEY_ID variable\&. To express IDs without the full membership flag, use PKEY_ID_NM\&. Note that kernel internally treats the interface as having the full membership flag set, this mainly affects the interface name\&. For the ifcfg file to be supported by initscripts\*(Aq ifup\-ib, the DEVICE= must always be set\&. NetworkManager does not require that\&.\fB Example: \fRPKEY=yes PKEY_ID=2 PHYSDEV=mlx4_ib0 DEVICE=mlx4_ib0\&.8002 T} diff --git a/man/nm-settings-ifcfg-rh.xml b/man/nm-settings-ifcfg-rh.xml index 61ae224d..5f95e129 100644 --- a/man/nm-settings-ifcfg-rh.xml +++ b/man/nm-settings-ifcfg-rh.xml @@ -1,6 +1,6 @@ <?xml version="1.0"?> <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd"> -<refentry id="nm-settings-ifcfg-rh"><refentryinfo><title>nm-settings-ifcfg-rh</title><author>NetworkManager developers</author></refentryinfo><refmeta><refentrytitle>nm-settings-ifcfg-rh</refentrytitle><manvolnum>5</manvolnum><refmiscinfo class="source">NetworkManager</refmiscinfo><refmiscinfo class="manual">Configuration</refmiscinfo><refmiscinfo class="version">1.42.6</refmiscinfo></refmeta><refnamediv><refname>nm-settings-ifcfg-rh</refname><refpurpose>Description of <emphasis>ifcfg-rh</emphasis> settings plugin</refpurpose></refnamediv><refsect1 id="description"><title>Description</title><para> +<refentry id="nm-settings-ifcfg-rh"><refentryinfo><title>nm-settings-ifcfg-rh</title><author>NetworkManager developers</author></refentryinfo><refmeta><refentrytitle>nm-settings-ifcfg-rh</refentrytitle><manvolnum>5</manvolnum><refmiscinfo class="source">NetworkManager</refmiscinfo><refmiscinfo class="manual">Configuration</refmiscinfo><refmiscinfo class="version">1.42.8</refmiscinfo></refmeta><refnamediv><refname>nm-settings-ifcfg-rh</refname><refpurpose>Description of <emphasis>ifcfg-rh</emphasis> settings plugin</refpurpose></refnamediv><refsect1 id="description"><title>Description</title><para> NetworkManager is based on the concept of connection profiles that contain network configuration (see <citerefentry><refentrytitle>nm-settings</refentrytitle><manvolnum>5</manvolnum></citerefentry> for details). The profiles can be stored in various formats. NetworkManager uses plugins for reading and writing @@ -276,9 +276,11 @@ Allowed values: </emphasis>"qeth", "lcs" or "ctc"</entry></row><row><entry align Example: </emphasis>ETHTOOL_OPTS="wol gs sopass 00:11:22:33:44:55"</entry></row><row><entry align="left">accept-all-mac-addresses</entry><entry align="left">ACCEPT_ALL_MAC_ADDRESSES</entry><entry align="left"/><entry align="left">Enforce the interface to accept all the packets.</entry></row></tbody></tgroup></table><table><title>bond setting</title><tgroup cols="4"><thead><row><entry>Property</entry><entry>Ifcfg-rh Variable</entry><entry>Default</entry><entry>Description</entry></row></thead><tbody><row><entry align="left">options</entry><entry align="left">BONDING_OPTS</entry><entry align="left"/><entry align="left">Bonding options.<emphasis role="bold"> -Example: </emphasis>BONDING_OPTS="miimon=100 mode=broadcast"</entry></row></tbody></tgroup></table><table><title>bond-port setting</title><tgroup cols="4"><thead><row><entry>Property</entry><entry>Ifcfg-rh Variable</entry><entry>Default</entry><entry>Description</entry></row></thead><tbody><row><entry align="left">queue-id</entry><entry align="left">BONDING_OPTS: queue-id=</entry><entry align="left">0</entry><entry align="left">Queue ID.<emphasis role="bold"> +Example: </emphasis>BONDING_OPTS="miimon=100 mode=broadcast"</entry></row></tbody></tgroup></table><table><title>bond-port setting</title><tgroup cols="4"><thead><row><entry>Property</entry><entry>Ifcfg-rh Variable</entry><entry>Default</entry><entry>Description</entry></row></thead><tbody><row><entry align="left">queue-id</entry><entry align="left">BOND_PORT_QUEUE_ID<emphasis>(+)</emphasis></entry><entry align="left">0</entry><entry align="left">Queue ID.<emphasis role="bold"> -Allowed values: </emphasis>0 - 65535</entry></row></tbody></tgroup></table><table><title>bridge setting</title><tgroup cols="4"><thead><row><entry>Property</entry><entry>Ifcfg-rh Variable</entry><entry>Default</entry><entry>Description</entry></row></thead><tbody><row><entry align="left">mac-address</entry><entry align="left">BRIDGE_MACADDR<emphasis>(+)</emphasis></entry><entry align="left"/><entry align="left">MAC address of the bridge. Note that this requires a recent kernel support, originally introduced in 3.15 upstream kernel) BRIDGE_MACADDR for bridges is an NM extension.</entry></row><row><entry align="left">stp</entry><entry align="left">STP</entry><entry align="left">no</entry><entry align="left">Span tree protocol participation.</entry></row><row><entry align="left">priority</entry><entry align="left">BRIDGING_OPTS: priority=</entry><entry align="left">32768</entry><entry align="left">STP priority.<emphasis role="bold"> +Allowed values: </emphasis>0 - 65535</entry></row><row><entry align="left">prio</entry><entry align="left">BOND_PORT_PRIO<emphasis>(+)</emphasis></entry><entry align="left">0</entry><entry align="left">Port priority.<emphasis role="bold"> + +Allowed values: </emphasis>-2147483648 - 2147483647</entry></row></tbody></tgroup></table><table><title>bridge setting</title><tgroup cols="4"><thead><row><entry>Property</entry><entry>Ifcfg-rh Variable</entry><entry>Default</entry><entry>Description</entry></row></thead><tbody><row><entry align="left">mac-address</entry><entry align="left">BRIDGE_MACADDR<emphasis>(+)</emphasis></entry><entry align="left"/><entry align="left">MAC address of the bridge. Note that this requires a recent kernel support, originally introduced in 3.15 upstream kernel) BRIDGE_MACADDR for bridges is an NM extension.</entry></row><row><entry align="left">stp</entry><entry align="left">STP</entry><entry align="left">no</entry><entry align="left">Span tree protocol participation.</entry></row><row><entry align="left">priority</entry><entry align="left">BRIDGING_OPTS: priority=</entry><entry align="left">32768</entry><entry align="left">STP priority.<emphasis role="bold"> Allowed values: </emphasis>0 - 32768</entry></row><row><entry align="left">forward-delay</entry><entry align="left">DELAY</entry><entry align="left">15</entry><entry align="left">STP forwarding delay.<emphasis role="bold"> @@ -421,7 +423,7 @@ Example: </emphasis>HOSTNAME_FROM_DNS_LOOKUP=0,1</entry></row><row><entry align= Example: </emphasis>HOSTNAME_ONLY_FROM_DEFAULT=0,1</entry></row></tbody></tgroup></table><table><title>infiniband setting</title><tgroup cols="4"><thead><row><entry>Property</entry><entry>Ifcfg-rh Variable</entry><entry>Default</entry><entry>Description</entry></row></thead><tbody><row><entry align="left">mac-address</entry><entry align="left">HWADDR</entry><entry align="left"/><entry align="left">IBoIP 20-byte hardware address of the device (in traditional hex-digits-and-colons notation). Note that for initscripts this is the current MAC address of the device as found during ifup. For NetworkManager this is the permanent MAC address. Or in case no permanent MAC address exists, the MAC address initially configured on the device.<emphasis role="bold"> -Example: </emphasis>HWADDR=01:02:03:04:05:06:07:08:09:0A:01:02:03:04:05:06:07:08:09:11</entry></row><row><entry align="left">mtu</entry><entry align="left">MTU</entry><entry align="left"/><entry align="left">MTU of the interface.</entry></row><row><entry align="left">transport-mode</entry><entry align="left">CONNECTED_MODE</entry><entry align="left">CONNECTED_MODE=no</entry><entry align="left">CONNECTED_MODE=yes for "connected" mode, CONNECTED_MODE=no for "datagram" mode</entry></row><row><entry align="left">p-key</entry><entry align="left">PKEY_ID (and PKEY=yes)</entry><entry align="left">PKEY=no</entry><entry align="left">InfiniBand P_Key. The value can be a hex number prefixed with "0x" or a decimal number. When PKEY_ID is specified, PHYSDEV and DEVICE also must be specified.<emphasis role="bold"> +Example: </emphasis>HWADDR=01:02:03:04:05:06:07:08:09:0A:01:02:03:04:05:06:07:08:09:11</entry></row><row><entry align="left">mtu</entry><entry align="left">MTU</entry><entry align="left"/><entry align="left">MTU of the interface.</entry></row><row><entry align="left">transport-mode</entry><entry align="left">CONNECTED_MODE</entry><entry align="left">CONNECTED_MODE=no</entry><entry align="left">CONNECTED_MODE=yes for "connected" mode, CONNECTED_MODE=no for "datagram" mode</entry></row><row><entry align="left">p-key</entry><entry align="left">PKEY_ID or PKEY_ID_NM(*) (requires PKEY=yes)</entry><entry align="left">PKEY=no</entry><entry align="left">InfiniBand P_Key. The value can be a hex number prefixed with "0x" or a decimal number. When PKEY_ID is specified, PHYSDEV must be specified. Note that ifcfg-rh format will always automatically set the full membership flag 0x8000 for the PKEY_ID variable. To express IDs without the full membership flag, use PKEY_ID_NM. Note that kernel internally treats the interface as having the full membership flag set, this mainly affects the interface name. For the ifcfg file to be supported by initscripts' ifup-ib, the DEVICE= must always be set. NetworkManager does not require that.<emphasis role="bold"> Example: </emphasis>PKEY=yes PKEY_ID=2 PHYSDEV=mlx4_ib0 DEVICE=mlx4_ib0.8002</entry></row><row><entry align="left">parent</entry><entry align="left">PHYSDEV (PKEY=yes)</entry><entry align="left">PKEY=no</entry><entry align="left">InfiniBand parent device.<emphasis role="bold"> diff --git a/man/nm-settings-keyfile.5 b/man/nm-settings-keyfile.5 index 2f1f9ff4..6a412e2f 100644 --- a/man/nm-settings-keyfile.5 +++ b/man/nm-settings-keyfile.5 @@ -2,12 +2,12 @@ .\" Title: nm-settings-keyfile .\" Author: .\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/> -.\" Date: 04/20/2023 +.\" Date: 06/28/2023 .\" Manual: Configuration -.\" Source: NetworkManager 1.42.6 +.\" Source: NetworkManager 1.42.8 .\" Language: English .\" -.TH "NM\-SETTINGS\-KEYFILE" "5" "" "NetworkManager 1\&.42\&.6" "Configuration" +.TH "NM\-SETTINGS\-KEYFILE" "5" "" "NetworkManager 1\&.42\&.8" "Configuration" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/nm-settings-keyfile.xml b/man/nm-settings-keyfile.xml index e8e2caac..e7e87cf7 100644 --- a/man/nm-settings-keyfile.xml +++ b/man/nm-settings-keyfile.xml @@ -1,6 +1,6 @@ <?xml version="1.0"?> <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd"> -<refentry id="nm-settings-keyfile"><refentryinfo><title>nm-settings-keyfile</title><author>NetworkManager developers</author></refentryinfo><refmeta><refentrytitle>nm-settings-keyfile</refentrytitle><manvolnum>5</manvolnum><refmiscinfo class="source">NetworkManager</refmiscinfo><refmiscinfo class="manual">Configuration</refmiscinfo><refmiscinfo class="version">1.42.6</refmiscinfo></refmeta><refnamediv><refname>nm-settings-keyfile</refname><refpurpose>Description of <emphasis>keyfile</emphasis> settings plugin</refpurpose></refnamediv><refsect1 id="description"><title>Description</title><para> +<refentry id="nm-settings-keyfile"><refentryinfo><title>nm-settings-keyfile</title><author>NetworkManager developers</author></refentryinfo><refmeta><refentrytitle>nm-settings-keyfile</refentrytitle><manvolnum>5</manvolnum><refmiscinfo class="source">NetworkManager</refmiscinfo><refmiscinfo class="manual">Configuration</refmiscinfo><refmiscinfo class="version">1.42.8</refmiscinfo></refmeta><refnamediv><refname>nm-settings-keyfile</refname><refpurpose>Description of <emphasis>keyfile</emphasis> settings plugin</refpurpose></refnamediv><refsect1 id="description"><title>Description</title><para> NetworkManager is based on the concept of connection profiles that contain network configuration (see <citerefentry><refentrytitle>nm-settings</refentrytitle><manvolnum>5</manvolnum></citerefentry> for details). The profiles can be stored in various formats. NetworkManager uses plugins for reading and writing diff --git a/man/nm-settings-nmcli.5 b/man/nm-settings-nmcli.5 index 0fb4219b..8fedd64b 100644 --- a/man/nm-settings-nmcli.5 +++ b/man/nm-settings-nmcli.5 @@ -2,12 +2,12 @@ .\" Title: nm-settings-nmcli .\" Author: .\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/> -.\" Date: 04/20/2023 +.\" Date: 06/28/2023 .\" Manual: Configuration -.\" Source: NetworkManager 1.42.6 +.\" Source: NetworkManager 1.42.8 .\" Language: English .\" -.TH "NM\-SETTINGS\-NMCLI" "5" "" "NetworkManager 1\&.42\&.6" "Configuration" +.TH "NM\-SETTINGS\-NMCLI" "5" "" "NetworkManager 1\&.42\&.8" "Configuration" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -1735,7 +1735,11 @@ Format: uint32 .RS 4 Alias: p\-key .sp -The InfiniBand P_Key to use for this device\&. A value of \-1 means to use the default P_Key (aka "the P_Key at index 0")\&. Otherwise, it is a 16\-bit unsigned integer, whose high bit is set if it is a "full membership" P_Key\&. +The InfiniBand p\-key to use for this device\&. A value of \-1 means to use the default p\-key (aka "the p\-key at index 0")\&. Otherwise, it is a 16\-bit unsigned integer, whose high bit 0x8000 is set if it is a "full membership" p\-key\&. The values 0 and 0x8000 are not allowed\&. +.sp +With the p\-key set, the interface name is always "$parent\&.$p_key"\&. Setting "connection\&.interface\-name" to another name is not supported\&. +.sp +Note that kernel will internally always set the full membership bit, although the interface name does not reflect that\&. Usually the user would want to configure a full membership p\-key with 0x8000 flag set\&. .sp Format: int32 .RE @@ -4985,6 +4989,15 @@ Bond Port Settings\&. .PP Properties: .PP +\fBprio\fR +.RS 4 +Alias: prio +.sp +The port priority for bond active port re\-selection during failover\&. A higher number means a higher priority in selection\&. The primary port has the highest priority\&. This option is only compatible with active\-backup, balance\-tlb and balance\-alb modes\&. +.sp +Format: int32 +.RE +.PP \fBqueue\-id\fR .RS 4 Alias: queue\-id diff --git a/man/nm-settings-nmcli.xml b/man/nm-settings-nmcli.xml index 3ecb4103..c65baaa2 100644 --- a/man/nm-settings-nmcli.xml +++ b/man/nm-settings-nmcli.xml @@ -1,6 +1,6 @@ <?xml version="1.0"?> <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd"> -<refentry id="nm-settings-nmcli"><refentryinfo><title>nm-settings-nmcli</title><author>NetworkManager developers</author></refentryinfo><refmeta><refentrytitle>nm-settings-nmcli</refentrytitle><manvolnum>5</manvolnum><refmiscinfo class="source">NetworkManager</refmiscinfo><refmiscinfo class="manual">Configuration</refmiscinfo><refmiscinfo class="version">1.42.6</refmiscinfo></refmeta><refnamediv><refname>nm-settings-nmcli</refname><refpurpose>Description of settings and properties of NetworkManager connection profiles for nmcli</refpurpose></refnamediv><refsect1 id="description"><title>Description</title><para> +<refentry id="nm-settings-nmcli"><refentryinfo><title>nm-settings-nmcli</title><author>NetworkManager developers</author></refentryinfo><refmeta><refentrytitle>nm-settings-nmcli</refentrytitle><manvolnum>5</manvolnum><refmiscinfo class="source">NetworkManager</refmiscinfo><refmiscinfo class="manual">Configuration</refmiscinfo><refmiscinfo class="version">1.42.8</refmiscinfo></refmeta><refnamediv><refname>nm-settings-nmcli</refname><refpurpose>Description of settings and properties of NetworkManager connection profiles for nmcli</refpurpose></refnamediv><refsect1 id="description"><title>Description</title><para> NetworkManager is based on a concept of connection profiles, sometimes referred to as connections only. These connection profiles contain a network configuration. When NetworkManager activates a connection profile on a network device the configuration will @@ -251,7 +251,7 @@ Format: byte array</para></listitem></varlistentry><varlistentry><term><option id="nm-settings-nmcli.property.infiniband.mtu">mtu</option></term><listitem><para> Alias: mtu</para><para>If non-zero, only transmit packets of the specified size or smaller, breaking larger packets up into multiple frames.</para><para> Format: uint32</para></listitem></varlistentry><varlistentry><term><option id="nm-settings-nmcli.property.infiniband.p-key">p-key</option></term><listitem><para> - Alias: p-key</para><para>The InfiniBand P_Key to use for this device. A value of -1 means to use the default P_Key (aka "the P_Key at index 0"). Otherwise, it is a 16-bit unsigned integer, whose high bit is set if it is a "full membership" P_Key.</para><para> + Alias: p-key</para><para>The InfiniBand p-key to use for this device. A value of -1 means to use the default p-key (aka "the p-key at index 0"). Otherwise, it is a 16-bit unsigned integer, whose high bit 0x8000 is set if it is a "full membership" p-key. The values 0 and 0x8000 are not allowed.</para><para>With the p-key set, the interface name is always "$parent.$p_key". Setting "connection.interface-name" to another name is not supported.</para><para>Note that kernel will internally always set the full membership bit, although the interface name does not reflect that. Usually the user would want to configure a full membership p-key with 0x8000 flag set.</para><para> Format: int32</para></listitem></varlistentry><varlistentry><term><option id="nm-settings-nmcli.property.infiniband.parent">parent</option></term><listitem><para> Alias: parent</para><para>The interface name of the parent device of this device. Normally NULL, but if the "p_key" property is set, then you must specify the base device by setting either this property or "mac-address".</para><para> Format: string</para></listitem></varlistentry><varlistentry><term><option id="nm-settings-nmcli.property.infiniband.transport-mode">transport-mode</option></term><listitem><para> @@ -1200,7 +1200,9 @@ Linux traffic control subsystem Alias: short-addr</para><para>Short IEEE 802.15.4 address to be used within a restricted environment.</para><para> Format: uint32</para></listitem></varlistentry></variablelist></para></refsect2><refsect2><title>bond-port setting</title><para>Bond Port Settings.</para><para> Properties: - <variablelist><varlistentry><term><option id="nm-settings-nmcli.property.bond-port.queue-id">queue-id</option></term><listitem><para> + <variablelist><varlistentry><term><option id="nm-settings-nmcli.property.bond-port.prio">prio</option></term><listitem><para> + Alias: prio</para><para>The port priority for bond active port re-selection during failover. A higher number means a higher priority in selection. The primary port has the highest priority. This option is only compatible with active-backup, balance-tlb and balance-alb modes.</para><para> + Format: int32</para></listitem></varlistentry><varlistentry><term><option id="nm-settings-nmcli.property.bond-port.queue-id">queue-id</option></term><listitem><para> Alias: queue-id</para><para>The queue ID of this bond port. The maximum value of queue ID is the number of TX queues currently active in device.</para><para> Format: uint32</para></listitem></varlistentry></variablelist></para></refsect2><refsect2><title>hostname setting</title><para>Hostname settings.</para><para> Properties: diff --git a/man/nmcli-examples.7 b/man/nmcli-examples.7 index df330439..2234b39d 100644 --- a/man/nmcli-examples.7 +++ b/man/nmcli-examples.7 @@ -2,12 +2,12 @@ .\" Title: nmcli-examples .\" Author: .\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/> -.\" Date: 04/20/2023 +.\" Date: 06/28/2023 .\" Manual: Examples -.\" Source: NetworkManager 1.42.6 +.\" Source: NetworkManager 1.42.8 .\" Language: English .\" -.TH "NMCLI\-EXAMPLES" "7" "" "NetworkManager 1\&.42\&.6" "Examples" +.TH "NMCLI\-EXAMPLES" "7" "" "NetworkManager 1\&.42\&.8" "Examples" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/nmcli.1 b/man/nmcli.1 index ec25c6fd..295ca339 100644 --- a/man/nmcli.1 +++ b/man/nmcli.1 @@ -2,12 +2,12 @@ .\" Title: nmcli .\" Author: .\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/> -.\" Date: 04/20/2023 +.\" Date: 06/28/2023 .\" Manual: General Commands Manual -.\" Source: NetworkManager 1.42.6 +.\" Source: NetworkManager 1.42.8 .\" Language: English .\" -.TH "NMCLI" "1" "" "NetworkManager 1\&.42\&.6" "General Commands Manual" +.TH "NMCLI" "1" "" "NetworkManager 1\&.42\&.8" "General Commands Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/man/nmtui.1 b/man/nmtui.1 index 6b151419..d1ca506a 100644 --- a/man/nmtui.1 +++ b/man/nmtui.1 @@ -2,12 +2,12 @@ .\" Title: nmtui .\" Author: .\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/> -.\" Date: 04/20/2023 +.\" Date: 06/28/2023 .\" Manual: General Commands Manual -.\" Source: NetworkManager 1.42.6 +.\" Source: NetworkManager 1.42.8 .\" Language: English .\" -.TH "NMTUI" "1" "" "NetworkManager 1\&.42\&.6" "General Commands Manual" +.TH "NMTUI" "1" "" "NetworkManager 1\&.42\&.8" "General Commands Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/meson.build b/meson.build index f494bf33..ffc6586e 100644 --- a/meson.build +++ b/meson.build @@ -6,7 +6,7 @@ project( # - add corresponding NM_VERSION_x_y_z macros in # "src/libnm-core-public/nm-version-macros.h.in" # - update number in configure.ac - version: '1.42.6', + version: '1.42.8', license: 'GPL2+', default_options: [ 'buildtype=debugoptimized', @@ -560,8 +560,16 @@ config_h.set10('WITH_FIREWALLD_ZONE', enable_firewalld_zone) # pppd enable_ppp = get_option('ppp') +NM_PPP_VERSION_2_5_OR_NEWER = 0 if enable_ppp - assert(cc.has_header('pppd/pppd.h'), 'couldn\'t find pppd.h. pppd development headers are required') + pppd_dep = dependency('pppd', required: false) + if (pppd_dep.found()) + pppd_version = pppd_dep.version() + NM_PPP_VERSION_2_5_OR_NEWER = 1 + else + assert(cc.has_header('pppd/pppd.h'), 'couldn\'t find pppd.h. pppd development headers are required') + pppd_version = '2.4.9' + endif pppd_path = get_option('pppd') if pppd_path == '' @@ -574,10 +582,11 @@ if enable_ppp pppd_plugin_dir = get_option('pppd_plugin_dir') if pppd_plugin_dir == '' - pppd_plugin_dir = join_paths(nm_libdir, 'pppd', '2.4.5') + pppd_plugin_dir = join_paths(nm_libdir, 'pppd', pppd_version) endif endif config_h.set10('WITH_PPP', enable_ppp) +config_h.set10('NM_PPP_VERSION_2_5_OR_NEWER', NM_PPP_VERSION_2_5_OR_NEWER) # ModemManager1 with libmm-glib enable_modem_manager = get_option('modem_manager') diff --git a/po/NetworkManager.pot b/po/NetworkManager.pot index 238b8ab8..82668286 100644 --- a/po/NetworkManager.pot +++ b/po/NetworkManager.pot @@ -6,10 +6,10 @@ #, fuzzy msgid "" msgstr "" -"Project-Id-Version: NetworkManager 1.42.6\n" +"Project-Id-Version: NetworkManager 1.42.8\n" "Report-Msgid-Bugs-To: https://gitlab.freedesktop.org/NetworkManager/" "NetworkManager/issues\n" -"POT-Creation-Date: 2023-04-20 08:45+0200\n" +"POT-Creation-Date: 2023-06-28 13:25+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL@li.org>\n" @@ -172,7 +172,7 @@ msgid "%s %u" msgstr "" #: src/core/devices/adsl/nm-device-adsl.c:115 -#: src/libnmc-setting/nm-meta-setting-desc.c:8406 +#: src/libnmc-setting/nm-meta-setting-desc.c:8412 msgid "ADSL connection" msgstr "" @@ -249,7 +249,7 @@ msgid "Wired connection %d" msgstr "" #: src/core/devices/nm-device-ethernet.c:1638 -#: src/libnmc-setting/nm-meta-setting-desc.c:8446 +#: src/libnmc-setting/nm-meta-setting-desc.c:8452 msgid "Veth connection" msgstr "" @@ -262,7 +262,7 @@ msgid "Wired connection" msgstr "" #: src/core/devices/nm-device-infiniband.c:157 -#: src/libnmc-setting/nm-meta-setting-desc.c:8420 +#: src/libnmc-setting/nm-meta-setting-desc.c:8426 msgid "InfiniBand connection" msgstr "" @@ -283,17 +283,17 @@ msgid "TUN connection" msgstr "" #: src/core/devices/nm-device-vlan.c:377 -#: src/libnmc-setting/nm-meta-setting-desc.c:8447 +#: src/libnmc-setting/nm-meta-setting-desc.c:8453 msgid "VLAN connection" msgstr "" #: src/core/devices/nm-device-vrf.c:182 -#: src/libnmc-setting/nm-meta-setting-desc.c:8449 +#: src/libnmc-setting/nm-meta-setting-desc.c:8455 msgid "VRF connection" msgstr "" #: src/core/devices/nm-device-vxlan.c:382 -#: src/libnmc-setting/nm-meta-setting-desc.c:8450 +#: src/libnmc-setting/nm-meta-setting-desc.c:8456 msgid "VXLAN connection" msgstr "" @@ -598,29 +598,29 @@ msgstr "" msgid "Show NetworkManager options" msgstr "" -#: src/core/nm-manager.c:6185 src/libnmc-setting/nm-meta-setting-desc.c:8448 +#: src/core/nm-manager.c:6185 src/libnmc-setting/nm-meta-setting-desc.c:8454 msgid "VPN connection" msgstr "" -#: src/core/settings/plugins/ifcfg-rh/nms-ifcfg-rh-reader.c:5613 +#: src/core/settings/plugins/ifcfg-rh/nms-ifcfg-rh-reader.c:5636 #: src/libnm-client-impl/nm-device.c:1780 -#: src/libnm-core-impl/nm-connection.c:3190 src/nmtui/nm-editor-utils.c:196 +#: src/libnm-core-impl/nm-connection.c:3213 src/nmtui/nm-editor-utils.c:196 msgid "Bond" msgstr "" -#: src/core/settings/plugins/ifcfg-rh/nms-ifcfg-rh-reader.c:5684 +#: src/core/settings/plugins/ifcfg-rh/nms-ifcfg-rh-reader.c:5707 #: src/libnm-client-impl/nm-device.c:1782 -#: src/libnm-core-impl/nm-connection.c:3192 src/nmtui/nm-editor-utils.c:214 +#: src/libnm-core-impl/nm-connection.c:3215 src/nmtui/nm-editor-utils.c:214 msgid "Team" msgstr "" -#: src/core/settings/plugins/ifcfg-rh/nms-ifcfg-rh-reader.c:6021 +#: src/core/settings/plugins/ifcfg-rh/nms-ifcfg-rh-reader.c:6044 #: src/libnm-client-impl/nm-device.c:1784 -#: src/libnm-core-impl/nm-connection.c:3194 src/nmtui/nm-editor-utils.c:205 +#: src/libnm-core-impl/nm-connection.c:3217 src/nmtui/nm-editor-utils.c:205 msgid "Bridge" msgstr "" -#: src/core/settings/plugins/ifcfg-rh/tests/test-ifcfg-rh.c:8982 +#: src/core/settings/plugins/ifcfg-rh/tests/test-ifcfg-rh.c:9021 #: src/libnm-core-impl/nm-team-utils.c:2391 msgid "invalid json" msgstr "" @@ -894,12 +894,12 @@ msgid "Mobile Broadband" msgstr "" #: src/libnm-client-impl/nm-device.c:1778 -#: src/libnm-core-impl/nm-connection.c:3198 src/nmtui/nm-editor-utils.c:169 +#: src/libnm-core-impl/nm-connection.c:3221 src/nmtui/nm-editor-utils.c:169 msgid "InfiniBand" msgstr "" #: src/libnm-client-impl/nm-device.c:1786 -#: src/libnm-core-impl/nm-connection.c:3196 src/nmtui/nm-editor-utils.c:223 +#: src/libnm-core-impl/nm-connection.c:3219 src/nmtui/nm-editor-utils.c:223 #: src/nmtui/nmt-page-vlan.c:57 msgid "VLAN" msgstr "" @@ -950,7 +950,7 @@ msgid "6LoWPAN" msgstr "" #: src/libnm-client-impl/nm-device.c:1810 -#: src/libnm-core-impl/nm-connection.c:3204 src/nmtui/nm-editor-utils.c:271 +#: src/libnm-core-impl/nm-connection.c:3227 src/nmtui/nm-editor-utils.c:271 #: src/nmtui/nmt-page-wireguard.c:57 msgid "WireGuard" msgstr "" @@ -1139,36 +1139,36 @@ msgstr "" msgid "has duplicate UUIDs" msgstr "" -#: src/libnm-core-impl/nm-connection.c:1793 +#: src/libnm-core-impl/nm-connection.c:1816 msgid "setting not found" msgstr "" -#: src/libnm-core-impl/nm-connection.c:1847 -#: src/libnm-core-impl/nm-connection.c:1872 -#: src/libnm-core-impl/nm-connection.c:1897 +#: src/libnm-core-impl/nm-connection.c:1870 +#: src/libnm-core-impl/nm-connection.c:1895 +#: src/libnm-core-impl/nm-connection.c:1920 msgid "setting is required for non-slave connections" msgstr "" -#: src/libnm-core-impl/nm-connection.c:1860 -#: src/libnm-core-impl/nm-connection.c:1885 -#: src/libnm-core-impl/nm-connection.c:1910 +#: src/libnm-core-impl/nm-connection.c:1883 +#: src/libnm-core-impl/nm-connection.c:1908 +#: src/libnm-core-impl/nm-connection.c:1933 msgid "setting not allowed in slave connection" msgstr "" -#: src/libnm-core-impl/nm-connection.c:2021 +#: src/libnm-core-impl/nm-connection.c:2044 msgid "Unexpected failure to normalize the connection" msgstr "" -#: src/libnm-core-impl/nm-connection.c:2082 +#: src/libnm-core-impl/nm-connection.c:2105 msgid "Unexpected failure to verify the connection" msgstr "" -#: src/libnm-core-impl/nm-connection.c:2119 +#: src/libnm-core-impl/nm-connection.c:2142 #, c-format msgid "unexpected uuid %s instead of %s" msgstr "" -#: src/libnm-core-impl/nm-connection.c:3049 +#: src/libnm-core-impl/nm-connection.c:3072 #: src/libnm-core-impl/nm-setting-8021x.c:2623 #: src/libnm-core-impl/nm-setting-8021x.c:2660 #: src/libnm-core-impl/nm-setting-8021x.c:2678 @@ -1194,11 +1194,11 @@ msgstr "" msgid "property is missing" msgstr "" -#: src/libnm-core-impl/nm-connection.c:3202 +#: src/libnm-core-impl/nm-connection.c:3225 msgid "IP Tunnel" msgstr "" -#: src/libnm-core-impl/nm-connection.c:3206 +#: src/libnm-core-impl/nm-connection.c:3229 msgid "TUN/TAP" msgstr "" @@ -1551,8 +1551,8 @@ msgstr "" #: src/libnm-core-impl/nm-setting-8021x.c:2825 #: src/libnm-core-impl/nm-setting-bluetooth.c:110 -#: src/libnm-core-impl/nm-setting-infiniband.c:191 -#: src/libnm-core-impl/nm-setting-infiniband.c:203 +#: src/libnm-core-impl/nm-setting-infiniband.c:204 +#: src/libnm-core-impl/nm-setting-infiniband.c:216 #: src/libnm-core-impl/nm-setting-ip4-config.c:234 #: src/libnm-core-impl/nm-setting-ip4-config.c:250 #: src/libnm-core-impl/nm-setting-ip6-config.c:281 @@ -1611,7 +1611,7 @@ msgstr "" msgid "'%s' connection requires '%s' setting" msgstr "" -#: src/libnm-core-impl/nm-setting-bond-port.c:82 +#: src/libnm-core-impl/nm-setting-bond-port.c:99 #: src/libnm-core-impl/nm-setting-bridge-port.c:328 #: src/libnm-core-impl/nm-setting-ovs-bridge.c:151 #: src/libnm-core-impl/nm-setting-ovs-interface.c:306 @@ -1620,7 +1620,7 @@ msgstr "" msgid "missing setting" msgstr "" -#: src/libnm-core-impl/nm-setting-bond-port.c:92 +#: src/libnm-core-impl/nm-setting-bond-port.c:109 #: src/libnm-core-impl/nm-setting-bridge-port.c:338 #: src/libnm-core-impl/nm-setting-ovs-interface.c:329 #: src/libnm-core-impl/nm-setting-ovs-port.c:434 @@ -1945,33 +1945,33 @@ msgstr "" msgid "can't be enabled when manual configuration is present" msgstr "" -#: src/libnm-core-impl/nm-setting-infiniband.c:229 +#: src/libnm-core-impl/nm-setting-infiniband.c:242 msgid "Must specify a P_Key if specifying parent" msgstr "" -#: src/libnm-core-impl/nm-setting-infiniband.c:240 +#: src/libnm-core-impl/nm-setting-infiniband.c:253 msgid "InfiniBand P_Key connection did not specify parent interface name" msgstr "" -#: src/libnm-core-impl/nm-setting-infiniband.c:248 +#: src/libnm-core-impl/nm-setting-infiniband.c:261 msgid "the values 0 and 0x8000 are not allowed" msgstr "" -#: src/libnm-core-impl/nm-setting-infiniband.c:274 +#: src/libnm-core-impl/nm-setting-infiniband.c:289 #, c-format msgid "" "interface name of software infiniband device must be '%s' or unset (instead " "it is '%s')" msgstr "" -#: src/libnm-core-impl/nm-setting-infiniband.c:282 +#: src/libnm-core-impl/nm-setting-infiniband.c:297 #, c-format msgid "" "interface name of software infiniband device with MAC address must be unset " "(instead it is '%s')" msgstr "" -#: src/libnm-core-impl/nm-setting-infiniband.c:310 +#: src/libnm-core-impl/nm-setting-infiniband.c:323 #, c-format msgid "mtu can be at most %u but it is %u" msgstr "" @@ -4425,7 +4425,7 @@ msgid "MACsec PSK authentication" msgstr "" #: src/libnmc-base/nm-secret-agent-simple.c:931 -#: src/libnmc-setting/nm-meta-setting-desc.c:6679 +#: src/libnmc-setting/nm-meta-setting-desc.c:6685 msgid "MKA CAK" msgstr "" @@ -5006,9 +5006,9 @@ msgid "" msgstr "" #: src/libnmc-setting/nm-meta-setting-desc.c:5141 -#: src/libnmc-setting/nm-meta-setting-desc.c:5437 -#: src/libnmc-setting/nm-meta-setting-desc.c:5927 -#: src/libnmc-setting/nm-meta-setting-desc.c:7034 +#: src/libnmc-setting/nm-meta-setting-desc.c:5443 +#: src/libnmc-setting/nm-meta-setting-desc.c:5933 +#: src/libnmc-setting/nm-meta-setting-desc.c:7040 msgid "Password [none]" msgstr "" @@ -5021,71 +5021,75 @@ msgstr "" msgid "Queue ID" msgstr "" -#: src/libnmc-setting/nm-meta-setting-desc.c:5247 -#: src/libnmc-setting/nm-meta-setting-desc.c:6001 -#: src/libnmc-setting/nm-meta-setting-desc.c:7760 -#: src/libnmc-setting/nm-meta-setting-desc.c:7798 -#: src/libnmc-setting/nm-meta-setting-desc.c:7983 -#: src/libnmc-setting/nm-meta-setting-desc.c:8216 -msgid "MAC [none]" +#: src/libnmc-setting/nm-meta-setting-desc.c:5241 +msgid "Port Priority" msgstr "" #: src/libnmc-setting/nm-meta-setting-desc.c:5253 -msgid "Enable STP" +#: src/libnmc-setting/nm-meta-setting-desc.c:6007 +#: src/libnmc-setting/nm-meta-setting-desc.c:7766 +#: src/libnmc-setting/nm-meta-setting-desc.c:7804 +#: src/libnmc-setting/nm-meta-setting-desc.c:7989 +#: src/libnmc-setting/nm-meta-setting-desc.c:8222 +msgid "MAC [none]" msgstr "" #: src/libnmc-setting/nm-meta-setting-desc.c:5259 -msgid "STP priority" +msgid "Enable STP" msgstr "" #: src/libnmc-setting/nm-meta-setting-desc.c:5265 +msgid "STP priority" +msgstr "" + +#: src/libnmc-setting/nm-meta-setting-desc.c:5271 #: src/nmtui/nmt-page-bridge.c:120 msgid "Forward delay" msgstr "" -#: src/libnmc-setting/nm-meta-setting-desc.c:5271 +#: src/libnmc-setting/nm-meta-setting-desc.c:5277 #: src/nmtui/nmt-page-bridge.c:134 msgid "Hello time" msgstr "" -#: src/libnmc-setting/nm-meta-setting-desc.c:5277 +#: src/libnmc-setting/nm-meta-setting-desc.c:5283 #: src/nmtui/nmt-page-bridge.c:148 msgid "Max age" msgstr "" -#: src/libnmc-setting/nm-meta-setting-desc.c:5283 +#: src/libnmc-setting/nm-meta-setting-desc.c:5289 msgid "MAC address ageing time" msgstr "" -#: src/libnmc-setting/nm-meta-setting-desc.c:5293 +#: src/libnmc-setting/nm-meta-setting-desc.c:5299 #: src/nmtui/nmt-page-bridge.c:156 msgid "Group forward mask" msgstr "" -#: src/libnmc-setting/nm-meta-setting-desc.c:5335 +#: src/libnmc-setting/nm-meta-setting-desc.c:5341 #: src/nmtui/nmt-page-bridge.c:79 msgid "Enable IGMP snooping" msgstr "" -#: src/libnmc-setting/nm-meta-setting-desc.c:5393 +#: src/libnmc-setting/nm-meta-setting-desc.c:5399 msgid "Bridge port priority" msgstr "" -#: src/libnmc-setting/nm-meta-setting-desc.c:5399 +#: src/libnmc-setting/nm-meta-setting-desc.c:5405 msgid "Bridge port STP path cost" msgstr "" -#: src/libnmc-setting/nm-meta-setting-desc.c:5405 +#: src/libnmc-setting/nm-meta-setting-desc.c:5411 msgid "Hairpin" msgstr "" -#: src/libnmc-setting/nm-meta-setting-desc.c:5431 -#: src/libnmc-setting/nm-meta-setting-desc.c:5921 -#: src/libnmc-setting/nm-meta-setting-desc.c:7607 +#: src/libnmc-setting/nm-meta-setting-desc.c:5437 +#: src/libnmc-setting/nm-meta-setting-desc.c:5927 +#: src/libnmc-setting/nm-meta-setting-desc.c:7613 msgid "Username [none]" msgstr "" -#: src/libnmc-setting/nm-meta-setting-desc.c:5536 +#: src/libnmc-setting/nm-meta-setting-desc.c:5542 msgid "" "Enter a list of user permissions. This is a list of user names formatted " "as:\n" @@ -5095,7 +5099,7 @@ msgid "" "Example: alice bob charlie\n" msgstr "" -#: src/libnmc-setting/nm-meta-setting-desc.c:5589 +#: src/libnmc-setting/nm-meta-setting-desc.c:5595 msgid "" "Enter secondary connections that should be activated when this connection " "is\n" @@ -5108,7 +5112,7 @@ msgid "" "Example: private-openvpn, fe6ba5d8-c2fc-4aae-b2e3-97efddd8d9a7\n" msgstr "" -#: src/libnmc-setting/nm-meta-setting-desc.c:5612 +#: src/libnmc-setting/nm-meta-setting-desc.c:5618 msgid "" "Enter a value which indicates whether the connection is subject to a data\n" "quota, usage costs or other limitations. Accepted options are:\n" @@ -5117,40 +5121,40 @@ msgid "" "'unknown' to let NetworkManager choose a value using some heuristics\n" msgstr "" -#: src/libnmc-setting/nm-meta-setting-desc.c:5937 +#: src/libnmc-setting/nm-meta-setting-desc.c:5943 msgid "APN" msgstr "" -#: src/libnmc-setting/nm-meta-setting-desc.c:6010 -#: src/libnmc-setting/nm-meta-setting-desc.c:6636 -#: src/libnmc-setting/nm-meta-setting-desc.c:7829 -#: src/libnmc-setting/nm-meta-setting-desc.c:8023 +#: src/libnmc-setting/nm-meta-setting-desc.c:6016 +#: src/libnmc-setting/nm-meta-setting-desc.c:6642 +#: src/libnmc-setting/nm-meta-setting-desc.c:7835 +#: src/libnmc-setting/nm-meta-setting-desc.c:8029 #: src/nmtui/nmt-page-ethernet.c:124 src/nmtui/nmt-page-infiniband.c:81 #: src/nmtui/nmt-page-ip-tunnel.c:178 src/nmtui/nmt-page-vlan.c:100 #: src/nmtui/nmt-page-wifi.c:395 src/nmtui/nmt-page-wireguard.c:85 msgid "MTU" msgstr "" -#: src/libnmc-setting/nm-meta-setting-desc.c:6029 +#: src/libnmc-setting/nm-meta-setting-desc.c:6035 msgid "P_KEY [none]" msgstr "" -#: src/libnmc-setting/nm-meta-setting-desc.c:6038 +#: src/libnmc-setting/nm-meta-setting-desc.c:6044 msgid "Parent interface [none]" msgstr "" -#: src/libnmc-setting/nm-meta-setting-desc.c:6065 +#: src/libnmc-setting/nm-meta-setting-desc.c:6071 msgid "" "Enter a list of IPv4 addresses of DNS servers.\n" "\n" "Example: 8.8.8.8, 8.8.4.4\n" msgstr "" -#: src/libnmc-setting/nm-meta-setting-desc.c:6112 +#: src/libnmc-setting/nm-meta-setting-desc.c:6118 msgid "IPv4 address (IP[/plen]) [none]" msgstr "" -#: src/libnmc-setting/nm-meta-setting-desc.c:6114 +#: src/libnmc-setting/nm-meta-setting-desc.c:6120 msgid "" "Enter a list of IPv4 addresses formatted as:\n" " ip[/prefix], ip[/prefix],...\n" @@ -5159,11 +5163,11 @@ msgid "" "Example: 192.168.1.5/24, 10.0.0.11/24\n" msgstr "" -#: src/libnmc-setting/nm-meta-setting-desc.c:6133 +#: src/libnmc-setting/nm-meta-setting-desc.c:6139 msgid "IPv4 gateway [none]" msgstr "" -#: src/libnmc-setting/nm-meta-setting-desc.c:6141 +#: src/libnmc-setting/nm-meta-setting-desc.c:6147 msgid "" "Enter a list of IPv4 routes formatted as:\n" " ip[/prefix] [next-hop] [metric],...\n" @@ -5176,14 +5180,14 @@ msgid "" " 10.1.2.0/24\n" msgstr "" -#: src/libnmc-setting/nm-meta-setting-desc.c:6181 +#: src/libnmc-setting/nm-meta-setting-desc.c:6187 msgid "" "Enter a list of IPv4 routing rules formatted as:\n" " priority [prio] [from [src]] [to [dst]], ,...\n" "\n" msgstr "" -#: src/libnmc-setting/nm-meta-setting-desc.c:6317 +#: src/libnmc-setting/nm-meta-setting-desc.c:6323 msgid "" "Enter a list of IPv6 addresses of DNS servers. If the IPv6 configuration " "method is 'auto' these DNS servers are appended to those (if any) returned " @@ -5195,11 +5199,11 @@ msgid "" "Example: 2607:f0d0:1002:51::4, 2607:f0d0:1002:51::1\n" msgstr "" -#: src/libnmc-setting/nm-meta-setting-desc.c:6370 +#: src/libnmc-setting/nm-meta-setting-desc.c:6376 msgid "IPv6 address (IP[/plen]) [none]" msgstr "" -#: src/libnmc-setting/nm-meta-setting-desc.c:6372 +#: src/libnmc-setting/nm-meta-setting-desc.c:6378 msgid "" "Enter a list of IPv6 addresses formatted as:\n" " ip[/prefix], ip[/prefix],...\n" @@ -5208,11 +5212,11 @@ msgid "" "Example: 2607:f0d0:1002:51::4/64, 1050:0:0:0:5:600:300c:326b\n" msgstr "" -#: src/libnmc-setting/nm-meta-setting-desc.c:6391 +#: src/libnmc-setting/nm-meta-setting-desc.c:6397 msgid "IPv6 gateway [none]" msgstr "" -#: src/libnmc-setting/nm-meta-setting-desc.c:6399 +#: src/libnmc-setting/nm-meta-setting-desc.c:6405 msgid "" "Enter a list of IPv6 routes formatted as:\n" " ip[/prefix] [next-hop] [metric],...\n" @@ -5226,395 +5230,395 @@ msgid "" " abbe::/64 55\n" msgstr "" -#: src/libnmc-setting/nm-meta-setting-desc.c:6439 +#: src/libnmc-setting/nm-meta-setting-desc.c:6445 msgid "" "Enter a list of IPv6 routing rules formatted as:\n" " priority [prio] [from [src]] [to [dst]], ,...\n" "\n" msgstr "" -#: src/libnmc-setting/nm-meta-setting-desc.c:6573 -#: src/libnmc-setting/nm-meta-setting-desc.c:7660 +#: src/libnmc-setting/nm-meta-setting-desc.c:6579 +#: src/libnmc-setting/nm-meta-setting-desc.c:7666 msgid "Parent device [none]" msgstr "" -#: src/libnmc-setting/nm-meta-setting-desc.c:6579 +#: src/libnmc-setting/nm-meta-setting-desc.c:6585 msgid "Local endpoint [none]" msgstr "" -#: src/libnmc-setting/nm-meta-setting-desc.c:6586 -#: src/libnmc-setting/nm-meta-setting-desc.c:7679 +#: src/libnmc-setting/nm-meta-setting-desc.c:6592 +#: src/libnmc-setting/nm-meta-setting-desc.c:7685 msgid "Remote" msgstr "" -#: src/libnmc-setting/nm-meta-setting-desc.c:6652 +#: src/libnmc-setting/nm-meta-setting-desc.c:6658 msgid "MACsec parent device or connection UUID" msgstr "" -#: src/libnmc-setting/nm-meta-setting-desc.c:6673 +#: src/libnmc-setting/nm-meta-setting-desc.c:6679 msgid "Enable encryption" msgstr "" -#: src/libnmc-setting/nm-meta-setting-desc.c:6689 +#: src/libnmc-setting/nm-meta-setting-desc.c:6695 msgid "MKA_CKN" msgstr "" -#: src/libnmc-setting/nm-meta-setting-desc.c:6695 +#: src/libnmc-setting/nm-meta-setting-desc.c:6701 #: src/nmtui/nmt-page-macsec.c:170 msgid "SCI port" msgstr "" -#: src/libnmc-setting/nm-meta-setting-desc.c:6721 +#: src/libnmc-setting/nm-meta-setting-desc.c:6727 msgid "MACVLAN parent device or connection UUID" msgstr "" -#: src/libnmc-setting/nm-meta-setting-desc.c:6742 +#: src/libnmc-setting/nm-meta-setting-desc.c:6748 msgid "Tap" msgstr "" -#: src/libnmc-setting/nm-meta-setting-desc.c:6809 -#: src/libnmc-setting/nm-meta-setting-desc.c:7937 src/nmtui/nmt-page-wifi.c:216 +#: src/libnmc-setting/nm-meta-setting-desc.c:6815 +#: src/libnmc-setting/nm-meta-setting-desc.c:7943 src/nmtui/nmt-page-wifi.c:216 msgid "SSID" msgstr "" -#: src/libnmc-setting/nm-meta-setting-desc.c:6818 +#: src/libnmc-setting/nm-meta-setting-desc.c:6824 msgid "OLPC Mesh channel" msgstr "" -#: src/libnmc-setting/nm-meta-setting-desc.c:6827 +#: src/libnmc-setting/nm-meta-setting-desc.c:6833 msgid "DHCP anycast MAC address [none]" msgstr "" -#: src/libnmc-setting/nm-meta-setting-desc.c:7015 +#: src/libnmc-setting/nm-meta-setting-desc.c:7021 msgid "PPPoE parent device" msgstr "" -#: src/libnmc-setting/nm-meta-setting-desc.c:7021 +#: src/libnmc-setting/nm-meta-setting-desc.c:7027 msgid "Service [none]" msgstr "" -#: src/libnmc-setting/nm-meta-setting-desc.c:7028 +#: src/libnmc-setting/nm-meta-setting-desc.c:7034 msgid "PPPoE username" msgstr "" -#: src/libnmc-setting/nm-meta-setting-desc.c:7064 +#: src/libnmc-setting/nm-meta-setting-desc.c:7070 msgid "Browser only" msgstr "" -#: src/libnmc-setting/nm-meta-setting-desc.c:7070 +#: src/libnmc-setting/nm-meta-setting-desc.c:7076 msgid "PAC URL" msgstr "" -#: src/libnmc-setting/nm-meta-setting-desc.c:7076 +#: src/libnmc-setting/nm-meta-setting-desc.c:7082 msgid "PAC script" msgstr "" -#: src/libnmc-setting/nm-meta-setting-desc.c:7200 -#: src/libnmc-setting/nm-meta-setting-desc.c:7388 +#: src/libnmc-setting/nm-meta-setting-desc.c:7206 +#: src/libnmc-setting/nm-meta-setting-desc.c:7394 msgid "Team JSON configuration [none]" msgstr "" -#: src/libnmc-setting/nm-meta-setting-desc.c:7491 +#: src/libnmc-setting/nm-meta-setting-desc.c:7497 msgid "User ID [none]" msgstr "" -#: src/libnmc-setting/nm-meta-setting-desc.c:7497 +#: src/libnmc-setting/nm-meta-setting-desc.c:7503 msgid "Group ID [none]" msgstr "" -#: src/libnmc-setting/nm-meta-setting-desc.c:7503 +#: src/libnmc-setting/nm-meta-setting-desc.c:7509 msgid "Enable PI" msgstr "" -#: src/libnmc-setting/nm-meta-setting-desc.c:7509 +#: src/libnmc-setting/nm-meta-setting-desc.c:7515 msgid "Enable VNET header" msgstr "" -#: src/libnmc-setting/nm-meta-setting-desc.c:7515 +#: src/libnmc-setting/nm-meta-setting-desc.c:7521 msgid "Enable multi queue" msgstr "" -#: src/libnmc-setting/nm-meta-setting-desc.c:7528 +#: src/libnmc-setting/nm-meta-setting-desc.c:7534 msgid "veth peer" msgstr "" -#: src/libnmc-setting/nm-meta-setting-desc.c:7541 +#: src/libnmc-setting/nm-meta-setting-desc.c:7547 msgid "VLAN parent device or connection UUID" msgstr "" -#: src/libnmc-setting/nm-meta-setting-desc.c:7548 +#: src/libnmc-setting/nm-meta-setting-desc.c:7554 msgid "VLAN ID (<0-4094>)" msgstr "" -#: src/libnmc-setting/nm-meta-setting-desc.c:7554 +#: src/libnmc-setting/nm-meta-setting-desc.c:7560 msgid "VLAN flags (<0-7>) [none]" msgstr "" -#: src/libnmc-setting/nm-meta-setting-desc.c:7569 +#: src/libnmc-setting/nm-meta-setting-desc.c:7575 msgid "Ingress priority maps [none]" msgstr "" -#: src/libnmc-setting/nm-meta-setting-desc.c:7579 +#: src/libnmc-setting/nm-meta-setting-desc.c:7585 msgid "Egress priority maps [none]" msgstr "" -#: src/libnmc-setting/nm-meta-setting-desc.c:7647 +#: src/libnmc-setting/nm-meta-setting-desc.c:7653 msgid "Table" msgstr "" -#: src/libnmc-setting/nm-meta-setting-desc.c:7667 +#: src/libnmc-setting/nm-meta-setting-desc.c:7673 msgid "VXLAN ID" msgstr "" -#: src/libnmc-setting/nm-meta-setting-desc.c:7673 +#: src/libnmc-setting/nm-meta-setting-desc.c:7679 msgid "Local address [none]" msgstr "" -#: src/libnmc-setting/nm-meta-setting-desc.c:7685 +#: src/libnmc-setting/nm-meta-setting-desc.c:7691 msgid "Minimum source port" msgstr "" -#: src/libnmc-setting/nm-meta-setting-desc.c:7691 +#: src/libnmc-setting/nm-meta-setting-desc.c:7697 msgid "Maximum source port" msgstr "" -#: src/libnmc-setting/nm-meta-setting-desc.c:7697 +#: src/libnmc-setting/nm-meta-setting-desc.c:7703 msgid "Destination port" msgstr "" -#: src/libnmc-setting/nm-meta-setting-desc.c:7737 +#: src/libnmc-setting/nm-meta-setting-desc.c:7743 #: src/nmtui/nmt-wireguard-peer-editor.c:78 msgid "Peer" msgstr "" -#: src/libnmc-setting/nm-meta-setting-desc.c:7767 +#: src/libnmc-setting/nm-meta-setting-desc.c:7773 msgid "WiMAX NSP name" msgstr "" -#: src/libnmc-setting/nm-meta-setting-desc.c:7804 -#: src/libnmc-setting/nm-meta-setting-desc.c:7988 +#: src/libnmc-setting/nm-meta-setting-desc.c:7810 +#: src/libnmc-setting/nm-meta-setting-desc.c:7994 msgid "Cloned MAC [none]" msgstr "" -#: src/libnmc-setting/nm-meta-setting-desc.c:7837 +#: src/libnmc-setting/nm-meta-setting-desc.c:7843 msgid "" "Enter a list of subchannels (comma or space separated).\n" "\n" "Example: 0.0.0e20 0.0.0e21 0.0.0e22\n" msgstr "" -#: src/libnmc-setting/nm-meta-setting-desc.c:8165 +#: src/libnmc-setting/nm-meta-setting-desc.c:8171 msgid "" "Enter the type of WEP keys. The accepted values are: 0 or unknown, 1 or key, " "and 2 or passphrase.\n" msgstr "" -#: src/libnmc-setting/nm-meta-setting-desc.c:8224 +#: src/libnmc-setting/nm-meta-setting-desc.c:8230 msgid "Short address (<0x0000-0xffff>)" msgstr "" -#: src/libnmc-setting/nm-meta-setting-desc.c:8240 +#: src/libnmc-setting/nm-meta-setting-desc.c:8246 msgid "PAN Identifier (<0x0000-0xffff>)" msgstr "" -#: src/libnmc-setting/nm-meta-setting-desc.c:8255 +#: src/libnmc-setting/nm-meta-setting-desc.c:8261 msgid "Page (<default|0-31>)" msgstr "" -#: src/libnmc-setting/nm-meta-setting-desc.c:8269 +#: src/libnmc-setting/nm-meta-setting-desc.c:8275 msgid "Channel (<default|0-26>)" msgstr "" #. *************************************************************************** -#: src/libnmc-setting/nm-meta-setting-desc.c:8404 +#: src/libnmc-setting/nm-meta-setting-desc.c:8410 msgid "6LOWPAN settings" msgstr "" -#: src/libnmc-setting/nm-meta-setting-desc.c:8405 +#: src/libnmc-setting/nm-meta-setting-desc.c:8411 msgid "802-1x settings" msgstr "" -#: src/libnmc-setting/nm-meta-setting-desc.c:8407 +#: src/libnmc-setting/nm-meta-setting-desc.c:8413 msgid "bluetooth connection" msgstr "" -#: src/libnmc-setting/nm-meta-setting-desc.c:8408 +#: src/libnmc-setting/nm-meta-setting-desc.c:8414 msgid "Bond device" msgstr "" -#: src/libnmc-setting/nm-meta-setting-desc.c:8409 +#: src/libnmc-setting/nm-meta-setting-desc.c:8415 msgid "Bond port" msgstr "" -#: src/libnmc-setting/nm-meta-setting-desc.c:8410 +#: src/libnmc-setting/nm-meta-setting-desc.c:8416 msgid "Bridge device" msgstr "" -#: src/libnmc-setting/nm-meta-setting-desc.c:8411 +#: src/libnmc-setting/nm-meta-setting-desc.c:8417 msgid "Bridge port" msgstr "" -#: src/libnmc-setting/nm-meta-setting-desc.c:8412 +#: src/libnmc-setting/nm-meta-setting-desc.c:8418 msgid "CDMA mobile broadband connection" msgstr "" -#: src/libnmc-setting/nm-meta-setting-desc.c:8413 +#: src/libnmc-setting/nm-meta-setting-desc.c:8419 msgid "General settings" msgstr "" -#: src/libnmc-setting/nm-meta-setting-desc.c:8414 +#: src/libnmc-setting/nm-meta-setting-desc.c:8420 msgid "DCB settings" msgstr "" -#: src/libnmc-setting/nm-meta-setting-desc.c:8415 +#: src/libnmc-setting/nm-meta-setting-desc.c:8421 msgid "Dummy settings" msgstr "" -#: src/libnmc-setting/nm-meta-setting-desc.c:8416 +#: src/libnmc-setting/nm-meta-setting-desc.c:8422 msgid "Ethtool settings" msgstr "" -#: src/libnmc-setting/nm-meta-setting-desc.c:8417 +#: src/libnmc-setting/nm-meta-setting-desc.c:8423 msgid "Generic settings" msgstr "" -#: src/libnmc-setting/nm-meta-setting-desc.c:8418 +#: src/libnmc-setting/nm-meta-setting-desc.c:8424 msgid "GSM mobile broadband connection" msgstr "" -#: src/libnmc-setting/nm-meta-setting-desc.c:8419 +#: src/libnmc-setting/nm-meta-setting-desc.c:8425 msgid "Hostname settings" msgstr "" -#: src/libnmc-setting/nm-meta-setting-desc.c:8421 +#: src/libnmc-setting/nm-meta-setting-desc.c:8427 msgid "IPv4 protocol" msgstr "" -#: src/libnmc-setting/nm-meta-setting-desc.c:8422 +#: src/libnmc-setting/nm-meta-setting-desc.c:8428 msgid "IPv6 protocol" msgstr "" -#: src/libnmc-setting/nm-meta-setting-desc.c:8423 +#: src/libnmc-setting/nm-meta-setting-desc.c:8429 msgid "IP-tunnel settings" msgstr "" -#: src/libnmc-setting/nm-meta-setting-desc.c:8424 +#: src/libnmc-setting/nm-meta-setting-desc.c:8430 msgid "Loopback settings" msgstr "" -#: src/libnmc-setting/nm-meta-setting-desc.c:8425 +#: src/libnmc-setting/nm-meta-setting-desc.c:8431 msgid "MACsec connection" msgstr "" -#: src/libnmc-setting/nm-meta-setting-desc.c:8426 +#: src/libnmc-setting/nm-meta-setting-desc.c:8432 msgid "macvlan connection" msgstr "" -#: src/libnmc-setting/nm-meta-setting-desc.c:8427 +#: src/libnmc-setting/nm-meta-setting-desc.c:8433 msgid "Match" msgstr "" -#: src/libnmc-setting/nm-meta-setting-desc.c:8428 +#: src/libnmc-setting/nm-meta-setting-desc.c:8434 msgid "OLPC Mesh connection" msgstr "" -#: src/libnmc-setting/nm-meta-setting-desc.c:8429 +#: src/libnmc-setting/nm-meta-setting-desc.c:8435 msgid "Open vSwitch bridge settings" msgstr "" -#: src/libnmc-setting/nm-meta-setting-desc.c:8430 +#: src/libnmc-setting/nm-meta-setting-desc.c:8436 msgid "Open vSwitch DPDK interface settings" msgstr "" -#: src/libnmc-setting/nm-meta-setting-desc.c:8431 +#: src/libnmc-setting/nm-meta-setting-desc.c:8437 msgid "OVS Other Config" msgstr "" -#: src/libnmc-setting/nm-meta-setting-desc.c:8432 +#: src/libnmc-setting/nm-meta-setting-desc.c:8438 msgid "OVS External IDs" msgstr "" -#: src/libnmc-setting/nm-meta-setting-desc.c:8433 +#: src/libnmc-setting/nm-meta-setting-desc.c:8439 msgid "Open vSwitch interface settings" msgstr "" -#: src/libnmc-setting/nm-meta-setting-desc.c:8434 +#: src/libnmc-setting/nm-meta-setting-desc.c:8440 msgid "Open vSwitch patch interface settings" msgstr "" -#: src/libnmc-setting/nm-meta-setting-desc.c:8435 +#: src/libnmc-setting/nm-meta-setting-desc.c:8441 msgid "Open vSwitch port settings" msgstr "" -#: src/libnmc-setting/nm-meta-setting-desc.c:8436 +#: src/libnmc-setting/nm-meta-setting-desc.c:8442 msgid "PPP settings" msgstr "" -#: src/libnmc-setting/nm-meta-setting-desc.c:8437 +#: src/libnmc-setting/nm-meta-setting-desc.c:8443 msgid "PPPoE" msgstr "" -#: src/libnmc-setting/nm-meta-setting-desc.c:8438 +#: src/libnmc-setting/nm-meta-setting-desc.c:8444 msgid "Proxy" msgstr "" -#: src/libnmc-setting/nm-meta-setting-desc.c:8439 +#: src/libnmc-setting/nm-meta-setting-desc.c:8445 msgid "Serial settings" msgstr "" -#: src/libnmc-setting/nm-meta-setting-desc.c:8440 +#: src/libnmc-setting/nm-meta-setting-desc.c:8446 msgid "SR-IOV settings" msgstr "" -#: src/libnmc-setting/nm-meta-setting-desc.c:8441 +#: src/libnmc-setting/nm-meta-setting-desc.c:8447 msgid "Traffic controls" msgstr "" -#: src/libnmc-setting/nm-meta-setting-desc.c:8442 +#: src/libnmc-setting/nm-meta-setting-desc.c:8448 msgid "Team device" msgstr "" -#: src/libnmc-setting/nm-meta-setting-desc.c:8443 +#: src/libnmc-setting/nm-meta-setting-desc.c:8449 msgid "Team port" msgstr "" -#: src/libnmc-setting/nm-meta-setting-desc.c:8444 +#: src/libnmc-setting/nm-meta-setting-desc.c:8450 msgid "Tun device" msgstr "" -#: src/libnmc-setting/nm-meta-setting-desc.c:8445 +#: src/libnmc-setting/nm-meta-setting-desc.c:8451 msgid "User settings" msgstr "" -#: src/libnmc-setting/nm-meta-setting-desc.c:8451 +#: src/libnmc-setting/nm-meta-setting-desc.c:8457 msgid "Wi-Fi P2P connection" msgstr "" -#: src/libnmc-setting/nm-meta-setting-desc.c:8452 +#: src/libnmc-setting/nm-meta-setting-desc.c:8458 msgid "WiMAX connection" msgstr "" -#: src/libnmc-setting/nm-meta-setting-desc.c:8453 +#: src/libnmc-setting/nm-meta-setting-desc.c:8459 msgid "Wired Ethernet" msgstr "" -#: src/libnmc-setting/nm-meta-setting-desc.c:8454 +#: src/libnmc-setting/nm-meta-setting-desc.c:8460 msgid "WireGuard VPN settings" msgstr "" -#: src/libnmc-setting/nm-meta-setting-desc.c:8455 +#: src/libnmc-setting/nm-meta-setting-desc.c:8461 msgid "Wi-Fi connection" msgstr "" -#: src/libnmc-setting/nm-meta-setting-desc.c:8456 +#: src/libnmc-setting/nm-meta-setting-desc.c:8462 msgid "Wi-Fi security settings" msgstr "" -#: src/libnmc-setting/nm-meta-setting-desc.c:8457 +#: src/libnmc-setting/nm-meta-setting-desc.c:8463 msgid "WPAN settings" msgstr "" -#: src/libnmc-setting/nm-meta-setting-desc.c:8870 +#: src/libnmc-setting/nm-meta-setting-desc.c:8876 msgid "name" msgstr "" @@ -6781,9 +6785,15 @@ msgstr "" #: src/libnmc-setting/settings-docs.h.in:156 msgid "" -"The InfiniBand P_Key to use for this device. A value of -1 means to use the " -"default P_Key (aka \"the P_Key at index 0\"). Otherwise, it is a 16-bit " -"unsigned integer, whose high bit is set if it is a \"full membership\" P_Key." +"The InfiniBand p-key to use for this device. A value of -1 means to use the " +"default p-key (aka \"the p-key at index 0\"). Otherwise, it is a 16-bit " +"unsigned integer, whose high bit 0x8000 is set if it is a \"full " +"membership\" p-key. The values 0 and 0x8000 are not allowed. With the p-key " +"set, the interface name is always \"$parent.$p_key\". Setting \"connection." +"interface-name\" to another name is not supported. Note that kernel will " +"internally always set the full membership bit, although the interface name " +"does not reflect that. Usually the user would want to configure a full " +"membership p-key with 0x8000 flag set." msgstr "" #: src/libnmc-setting/settings-docs.h.in:157 @@ -8295,7 +8305,7 @@ msgstr "" #: src/libnmc-setting/settings-docs.h.in:380 #: src/libnmc-setting/settings-docs.h.in:407 -#: src/libnmc-setting/settings-docs.h.in:444 +#: src/libnmc-setting/settings-docs.h.in:445 msgid "" "If non-zero, only transmit packets of the specified size or smaller, " "breaking larger packets up into multiple Ethernet frames." @@ -8769,11 +8779,19 @@ msgstr "" #: src/libnmc-setting/settings-docs.h.in:439 msgid "" +"The port priority for bond active port re-selection during failover. A " +"higher number means a higher priority in selection. The primary port has the " +"highest priority. This option is only compatible with active-backup, balance-" +"tlb and balance-alb modes." +msgstr "" + +#: src/libnmc-setting/settings-docs.h.in:440 +msgid "" "The queue ID of this bond port. The maximum value of queue ID is the number " "of TX queues currently active in device." msgstr "" -#: src/libnmc-setting/settings-docs.h.in:440 +#: src/libnmc-setting/settings-docs.h.in:441 msgid "" "Whether the system hostname can be determined from DHCP on this connection. " "When set to NM_TERNARY_DEFAULT (-1), the value from global configuration is " @@ -8781,7 +8799,7 @@ msgid "" "NetworkManager assumes the value to be NM_TERNARY_TRUE (1)." msgstr "" -#: src/libnmc-setting/settings-docs.h.in:441 +#: src/libnmc-setting/settings-docs.h.in:442 msgid "" "Whether the system hostname can be determined from reverse DNS lookup of " "addresses on this device. When set to NM_TERNARY_DEFAULT (-1), the value " @@ -8790,7 +8808,7 @@ msgid "" "NM_TERNARY_TRUE (1)." msgstr "" -#: src/libnmc-setting/settings-docs.h.in:442 +#: src/libnmc-setting/settings-docs.h.in:443 msgid "" "If set to NM_TERNARY_TRUE (1), NetworkManager attempts to get the hostname " "via DHCPv4/DHCPv6 or reverse DNS lookup on this device only when the device " @@ -8802,7 +8820,7 @@ msgid "" "NM_TERNARY_FALSE (0)." msgstr "" -#: src/libnmc-setting/settings-docs.h.in:443 +#: src/libnmc-setting/settings-docs.h.in:444 msgid "" "The relative priority of this connection to determine the system hostname. A " "lower numerical value is better (higher priority). A connection with higher " @@ -8816,18 +8834,18 @@ msgid "" "hostname." msgstr "" -#: src/libnmc-setting/settings-docs.h.in:445 +#: src/libnmc-setting/settings-docs.h.in:446 msgid "A dictionary of key/value pairs with external-ids for OVS." msgstr "" -#: src/libnmc-setting/settings-docs.h.in:446 +#: src/libnmc-setting/settings-docs.h.in:447 msgid "" "A dictionary of key/value pairs with other_config settings for OVS. See also " "\"other_config\" in the \"ovs-vswitchd.conf.db\" manual for the keys that " "OVS supports." msgstr "" -#: src/libnmc-setting/settings-docs.h.in:447 +#: src/libnmc-setting/settings-docs.h.in:448 msgid "" "This property specifies the peer interface name of the veth. This property " "is mandatory." diff --git a/po/hr.gmo b/po/hr.gmo index 1626f185..47e37388 100644 --- a/po/hr.gmo +++ b/po/hr.gmo Binary files differdiff --git a/po/ko.gmo b/po/ko.gmo index 14166869..16fd9eed 100644 --- a/po/ko.gmo +++ b/po/ko.gmo Binary files differdiff --git a/po/ru.gmo b/po/ru.gmo index 50b92520..fefa6923 100644 --- a/po/ru.gmo +++ b/po/ru.gmo Binary files differdiff --git a/po/uk.gmo b/po/uk.gmo index 9da2f2ad..7654d863 100644 --- a/po/uk.gmo +++ b/po/uk.gmo Binary files differdiff --git a/po/zh_CN.gmo b/po/zh_CN.gmo index ef4b7408..75796761 100644 --- a/po/zh_CN.gmo +++ b/po/zh_CN.gmo Binary files differdiff --git a/src/core/devices/nm-device-bond.c b/src/core/devices/nm-device-bond.c index 0b0697e3..56c5ec50 100644 --- a/src/core/devices/nm-device-bond.c +++ b/src/core/devices/nm-device-bond.c @@ -227,24 +227,23 @@ controller_update_port_connection(NMDevice *self, NMConnection *connection, GError **error) { - NMSettingBondPort *s_port; - int ifindex_port = nm_device_get_ifindex(port); - NMConnection *applied_connection = nm_device_get_applied_connection(self); - uint queue_id = NM_BOND_PORT_QUEUE_ID_DEF; - gs_free char *queue_id_str = NULL; + NMSettingBondPort *s_port; + int ifindex_port = nm_device_get_ifindex(port); + NMConnection *applied_connection = nm_device_get_applied_connection(self); + const NMPlatformLink *pllink; g_return_val_if_fail(ifindex_port > 0, FALSE); s_port = _nm_connection_ensure_setting(connection, NM_TYPE_SETTING_BOND_PORT); + pllink = nm_platform_link_get(nm_device_get_platform(port), ifindex_port); - queue_id_str = - nm_platform_sysctl_slave_get_option(nm_device_get_platform(self), ifindex_port, "queue_id"); - if (queue_id_str) { - queue_id = - _nm_utils_ascii_str_to_int64(queue_id_str, 10, 0, 65535, NM_BOND_PORT_QUEUE_ID_DEF); - g_object_set(s_port, NM_SETTING_BOND_PORT_QUEUE_ID, queue_id, NULL); - } else - _LOGW(LOGD_BOND, "failed to read bond port setting '%s'", NM_SETTING_BOND_PORT_QUEUE_ID); + if (pllink && pllink->port_kind == NM_PORT_KIND_BOND) + g_object_set(s_port, + NM_SETTING_BOND_PORT_QUEUE_ID, + pllink->port_data.bond.queue_id, + NM_SETTING_BOND_PORT_PRIO, + pllink->port_data.bond.prio, + NULL); g_object_set(nm_connection_get_setting_connection(connection), NM_SETTING_CONNECTION_MASTER, @@ -600,23 +599,52 @@ act_stage1_prepare(NMDevice *device, NMDeviceStateReason *out_failure_reason) static void commit_port_options(NMDevice *bond_device, NMDevice *port, NMSettingBondPort *s_port) { - char queue_id_str[IFNAMSIZ + NM_STRLEN(":") + 5 + 100]; - - /* - * The queue-id of bond port is read only, we should modify bond interface using: - * echo "eth1:2" > /sys/class/net/bond0/bonding/queue_id - * Kernel allows parital editing, so no need to care about other bond ports. - */ - g_snprintf(queue_id_str, - sizeof(queue_id_str), - "%s:%" G_GUINT32_FORMAT, - nm_device_get_iface(port), - s_port ? nm_setting_bond_port_get_queue_id(s_port) : NM_BOND_PORT_QUEUE_ID_DEF); - - nm_platform_sysctl_master_set_option(nm_device_get_platform(bond_device), - nm_device_get_ifindex(bond_device), - "queue_id", - queue_id_str); + NMBondMode mode = NM_BOND_MODE_UNKNOWN; + const char *value; + NMSettingBond *s_bond; + gint32 prio; + gboolean prio_has; + + s_bond = nm_device_get_applied_setting(bond_device, NM_TYPE_SETTING_BOND); + if (s_bond) { + value = nm_setting_bond_get_option_normalized(s_bond, NM_SETTING_BOND_OPTION_MODE); + mode = _nm_setting_bond_mode_from_string(value); + } + + prio = s_port ? nm_setting_bond_port_get_prio(s_port) : NM_BOND_PORT_PRIO_DEF; + + if (prio != 0) { + /* The profile explicitly sets the priority. No matter what, we try to set it + * in netlink. */ + prio_has = TRUE; + } else if (!NM_IN_SET(mode, NM_BOND_MODE_ACTIVEBACKUP, NM_BOND_MODE_TLB, NM_BOND_MODE_ALB)) { + /* The priority only is configurable with certain modes. If we don't have + * one of those modes, don't try to set the priority explicitly to zero. */ + prio_has = FALSE; + } else if (nm_platform_kernel_support_get_full( + NM_PLATFORM_KERNEL_SUPPORT_TYPE_IFLA_BOND_SLAVE_PRIO, + FALSE) + == NM_OPTION_BOOL_TRUE) { + /* We can only detect support if we have it. We cannot detect lack of support if + * we don't have it. + * + * But we did explicitly detect support, so explicitly set the prio to zero. */ + prio_has = TRUE; + } else { + /* We either have an unsuitable mode or didn't detect kernel support for the + * priority. Don't explicitly set priority to zero. It is already the default, + * so it shouldn't be necessary. */ + prio_has = FALSE; + } + + nm_platform_link_change(nm_device_get_platform(port), + nm_device_get_ifindex(port), + &((NMPlatformLinkBondPort){ + .queue_id = s_port ? nm_setting_bond_port_get_queue_id(s_port) + : NM_BOND_PORT_QUEUE_ID_DEF, + .prio = prio_has ? prio : 0, + .prio_has = prio_has, + })); } static NMTernary diff --git a/src/core/devices/nm-device.c b/src/core/devices/nm-device.c index d080b540..62a9ff1e 100644 --- a/src/core/devices/nm-device.c +++ b/src/core/devices/nm-device.c @@ -11691,7 +11691,18 @@ _dev_ipac6_start(NMDevice *self) } if (nm_ndisc_get_node_type(priv->ipac6_data.ndisc) == NM_NDISC_NODE_TYPE_ROUTER) { - nm_device_sysctl_ip_conf_set(self, AF_INET6, "forwarding", "1"); + gs_free char *sysctl_value = NULL; + + sysctl_value = nm_device_sysctl_ip_conf_get(self, AF_INET6, "forwarding"); + if (!nm_streq0(sysctl_value, "1")) { + if (sysctl_value && !g_hash_table_contains(priv->ip6_saved_properties, "forwarding")) { + g_hash_table_insert(priv->ip6_saved_properties, + "forwarding", + g_steal_pointer(&sysctl_value)); + } + nm_device_sysctl_ip_conf_set(self, AF_INET6, "forwarding", "1"); + } + priv->needs_ip6_subnet = TRUE; g_signal_emit(self, signals[IP6_SUBNET_NEEDED], 0); } @@ -11749,7 +11760,6 @@ _dev_sysctl_save_ip6_properties(NMDevice *self) { static const char *const ip6_properties_to_save[] = { "accept_ra", - "forwarding", "disable_ipv6", "hop_limit", "use_tempaddr", @@ -12892,6 +12902,7 @@ check_and_reapply_connection(NMDevice *self, NMConnection *con_old; NMConnection *con_new; GHashTableIter iter; + NMSettingsConnection *sett_conn; if (priv->state < NM_DEVICE_STATE_PREPARE || priv->state > NM_DEVICE_STATE_ACTIVATED) { g_set_error_literal(error, @@ -13064,6 +13075,14 @@ check_and_reapply_connection(NMDevice *self, if (priv->state >= NM_DEVICE_STATE_ACTIVATED) nm_device_update_metered(self); + sett_conn = nm_device_get_settings_connection(self); + if (sett_conn) { + nm_settings_connection_autoconnect_blocked_reason_set( + sett_conn, + NM_SETTINGS_AUTO_CONNECT_BLOCKED_REASON_USER_REQUEST, + FALSE); + } + /* Notify dispatcher when re-applied */ _LOGD(LOGD_DEVICE, "Notifying re-apply complete"); nm_dispatcher_call_device(NM_DISPATCHER_ACTION_REAPPLY, self, NULL, NULL, NULL, NULL); @@ -15649,7 +15668,6 @@ ip6_managed_setup(NMDevice *self) _dev_sysctl_set_disable_ipv6(self, FALSE); nm_device_sysctl_ip_conf_set(self, AF_INET6, "accept_ra", "0"); nm_device_sysctl_ip_conf_set(self, AF_INET6, "use_tempaddr", "0"); - nm_device_sysctl_ip_conf_set(self, AF_INET6, "forwarding", "0"); } static void diff --git a/src/core/devices/team/nm-device-team.c b/src/core/devices/team/nm-device-team.c index 3e3fe52b..5c955986 100644 --- a/src/core/devices/team/nm-device-team.c +++ b/src/core/devices/team/nm-device-team.c @@ -226,24 +226,10 @@ update_connection(NMDevice *device, NMConnection *connection) NMDeviceTeam *self = NM_DEVICE_TEAM(device); NMSettingTeam *s_team = _nm_connection_ensure_setting(connection, NM_TYPE_SETTING_TEAM); NMDeviceTeamPrivate *priv = NM_DEVICE_TEAM_GET_PRIVATE(self); - struct teamdctl *tdc = priv->tdc; - GError *error = NULL; /* Read the configuration only if not already set */ - if (!priv->config) { - if (ensure_teamd_connection(device, &error)) { - teamd_read_config(self); - } else { - _LOGD(LOGD_TEAM, "could not connect to teamd: %s", error->message); - g_clear_error(&error); - } - } - - /* Restore previous tdc state */ - if (priv->tdc && !tdc) { - teamdctl_disconnect(priv->tdc); - teamdctl_free(priv->tdc); - priv->tdc = NULL; + if (!priv->config && priv->tdc) { + teamd_read_config(self); } g_object_set(G_OBJECT(s_team), NM_SETTING_TEAM_CONFIG, _get_config(self), NULL); diff --git a/src/core/devices/wifi/nm-device-wifi-p2p.c b/src/core/devices/wifi/nm-device-wifi-p2p.c index 6c0a4d5e..424464c1 100644 --- a/src/core/devices/wifi/nm-device-wifi-p2p.c +++ b/src/core/devices/wifi/nm-device-wifi-p2p.c @@ -585,7 +585,7 @@ act_stage3_ip_config(NMDevice *device, int addr_family) nm_device_devip_set_state(device, AF_INET, NM_DEVICE_IP_STATE_READY, l3cd); /* This just disables the addressing indicator. */ - method = NM_SETTING_IP4_CONFIG_METHOD_DISABLED; + method = NM_SETTING_IP4_CONFIG_METHOD_MANUAL; } } @@ -643,7 +643,7 @@ get_auto_ip_config_method(NMDevice *device, int addr_family) if (addr_family == AF_INET && priv->group_iface && !nm_supplicant_interface_get_p2p_group_owner(priv->group_iface) && nm_supplicant_interface_get_p2p_assigned_addr(priv->group_iface, NULL, NULL)) - return NM_SETTING_IP4_CONFIG_METHOD_DISABLED; + return NM_SETTING_IP4_CONFIG_METHOD_MANUAL; /* Override the AUTO method to mean shared if we are group owner. */ if (priv->group_iface && nm_supplicant_interface_get_p2p_group_owner(priv->group_iface)) { diff --git a/src/core/nm-firewall-utils.c b/src/core/nm-firewall-utils.c index f231583a..03f1a9a5 100644 --- a/src/core/nm-firewall-utils.c +++ b/src/core/nm-firewall-utils.c @@ -889,12 +889,12 @@ nm_firewall_nft_stdio_mlag(gboolean up, */ _append(&strbuf, "add set netdev %s macset-tagged {" - " typeof ether saddr . vlan id; flags timeout; " + " typeof ether saddr . vlan id; flags dynamic,timeout; " "}", table_name); _append(&strbuf, "add set netdev %s macset-untagged {" - " typeof ether saddr; flags timeout;" + " typeof ether saddr; flags dynamic,timeout; " "}", table_name); diff --git a/src/core/nm-l3-ipv6ll.c b/src/core/nm-l3-ipv6ll.c index 2e2a6a0a..0133ebe6 100644 --- a/src/core/nm-l3-ipv6ll.c +++ b/src/core/nm-l3-ipv6ll.c @@ -391,7 +391,7 @@ _pladdr_find_ll(NML3IPv6LL *self, gboolean *out_cur_addr_failed) /*****************************************************************************/ static void -_lladdr_handle_changed(NML3IPv6LL *self) +_lladdr_handle_changed(NML3IPv6LL *self, gboolean force_commit) { const NML3ConfigData *l3cd; gboolean changed = FALSE; @@ -420,7 +420,9 @@ _lladdr_handle_changed(NML3IPv6LL *self) NM_DNS_PRIORITY_DEFAULT_NORMAL, NM_L3_ACD_DEFEND_TYPE_ALWAYS, 0, - NM_L3CFG_CONFIG_FLAGS_NONE, + /* Even if the address was removed from platform, it must + * be re-added, hence FORCE_ONCE. */ + NM_L3CFG_CONFIG_FLAGS_FORCE_ONCE, NM_L3_CONFIG_MERGE_FLAGS_NONE)) changed = TRUE; } else { @@ -434,7 +436,7 @@ _lladdr_handle_changed(NML3IPv6LL *self) self->l3cfg_commit_handle, "ipv6ll"); - if (changed) + if (changed || force_commit) nm_l3cfg_commit_on_idle_schedule(self->l3cfg, NM_L3_CFG_COMMIT_TYPE_AUTO); if (!self->emit_changed_idle_source) { @@ -515,6 +517,7 @@ _check(NML3IPv6LL *self) const NMPlatformIP6Address *pladdr; char sbuf[INET6_ADDRSTRLEN]; gboolean cur_addr_failed; + gboolean restarted = FALSE; struct in6_addr lladdr; pladdr = _pladdr_find_ll(self, &cur_addr_failed); @@ -526,14 +529,14 @@ _check(NML3IPv6LL *self) if (_set_cur_lladdr_obj(self, NM_L3_IPV6LL_STATE_DAD_IN_PROGRESS, pladdr)) { _LOGT("changed: waiting for address %s to complete DAD", nm_inet6_ntop(&self->cur_lladdr, sbuf)); - _lladdr_handle_changed(self); + _lladdr_handle_changed(self, FALSE); } return; } if (_set_cur_lladdr_obj(self, NM_L3_IPV6LL_STATE_READY, pladdr)) { _LOGT("changed: address %s is ready", nm_inet6_ntop(&self->cur_lladdr, sbuf)); - _lladdr_handle_changed(self); + _lladdr_handle_changed(self, FALSE); } return; } @@ -543,11 +546,17 @@ _check(NML3IPv6LL *self) * Prematurely abort DAD to generate a new address below. */ nm_assert( NM_IN_SET(self->state, NM_L3_IPV6LL_STATE_DAD_IN_PROGRESS, NM_L3_IPV6LL_STATE_READY)); - if (self->state == NM_L3_IPV6LL_STATE_DAD_IN_PROGRESS) - _LOGT("changed: address %s did not complete DAD", - nm_inet6_ntop(&self->cur_lladdr, sbuf)); - else { + + if (cur_addr_failed) { + /* On DAD failure, we always try to regenerate a new address. */ + _LOGT("changed: address %s failed", nm_inet6_ntop(&self->cur_lladdr, sbuf)); + } else { _LOGT("changed: address %s is gone", nm_inet6_ntop(&self->cur_lladdr, sbuf)); + /* When the address is removed, we always try to re-add it. */ + nm_clear_g_source_inst(&self->wait_for_addr_source); + lladdr = self->cur_lladdr; + restarted = TRUE; + goto commit; } /* reset the state here, so that we are sure that the following @@ -569,18 +578,19 @@ _check(NML3IPv6LL *self) if (_set_cur_lladdr_bin(self, NM_L3_IPV6LL_STATE_DAD_FAILED, NULL)) { _LOGW("changed: no IPv6 link local address to retry after Duplicate Address Detection " "failures (back off)"); - _lladdr_handle_changed(self); + _lladdr_handle_changed(self, FALSE); } return; } +commit: /* we give NML3Cfg 2 seconds to configure the address on the interface. We * thus very soon expect to see this address configured (and kernel started DAD). * If that does not happen within timeout, we assume that this address failed DAD. */ self->wait_for_addr_source = nm_g_timeout_add_source(2000, _wait_for_addr_timeout_cb, self); - if (_set_cur_lladdr_bin(self, NM_L3_IPV6LL_STATE_DAD_IN_PROGRESS, &lladdr)) { + if (_set_cur_lladdr_bin(self, NM_L3_IPV6LL_STATE_DAD_IN_PROGRESS, &lladdr) || restarted) { _LOGT("changed: starting DAD for address %s", nm_inet6_ntop(&self->cur_lladdr, sbuf)); - _lladdr_handle_changed(self); + _lladdr_handle_changed(self, restarted); } return; } diff --git a/src/core/platform/nm-fake-platform.c b/src/core/platform/nm-fake-platform.c index 86d6bc5f..0c366d82 100644 --- a/src/core/platform/nm-fake-platform.c +++ b/src/core/platform/nm-fake-platform.c @@ -667,6 +667,31 @@ link_supports_sriov(NMPlatform *platform, int ifindex) } static gboolean +link_change(NMPlatform *platform, + int ifindex, + NMPortKind port_kind, + const NMPlatformLinkPortData *port_data) +{ + NMFakePlatformLink *device = link_get(platform, ifindex); + nm_auto_nmpobj NMPObject *obj_tmp = NULL; + + switch (port_kind) { + case NM_PORT_KIND_BOND: + obj_tmp = nmp_object_clone(device->obj, FALSE); + obj_tmp->link.port_kind = NM_PORT_KIND_BOND; + obj_tmp->link.port_data.bond.queue_id = port_data->bond.queue_id; + obj_tmp->link.port_data.bond.prio_has = port_data->bond.prio_has; + obj_tmp->link.port_data.bond.prio = port_data->bond.prio; + link_set_obj(platform, device, obj_tmp); + return TRUE; + case NM_PORT_KIND_NONE: + return TRUE; + } + + return nm_assert_unreachable_val(TRUE); +} + +static gboolean link_enslave(NMPlatform *platform, int master, int slave) { NMFakePlatformLink *device = link_get(platform, slave); @@ -770,7 +795,7 @@ static gboolean infiniband_partition_delete(NMPlatform *platform, int parent, int p_key) { NMFakePlatformLink *parent_device; - gs_free char *name = NULL; + char name[IFNAMSIZ]; parent_device = link_get(platform, parent); g_return_val_if_fail(parent_device != NULL, FALSE); @@ -1325,6 +1350,7 @@ nm_fake_platform_class_init(NMFakePlatformClass *klass) platform_class->link_set_address = link_set_address; platform_class->link_set_mtu = link_set_mtu; + platform_class->link_change = link_change; platform_class->link_change_flags = link_change_flags; platform_class->link_get_driver_info = link_get_driver_info; diff --git a/src/core/platform/tests/test-link.c b/src/core/platform/tests/test-link.c index 9a1eaf89..33858671 100644 --- a/src/core/platform/tests/test-link.c +++ b/src/core/platform/tests/test-link.c @@ -112,7 +112,7 @@ software_add(NMLinkType link_type, const char *name) gboolean bond0_exists = !!nm_platform_link_get_by_ifname(NM_PLATFORM_GET, "bond0"); int r; const NMPlatformLnkBond nm_platform_lnk_bond_default = { - .mode = 3, + .mode = nmtst_rand_select(3, 1), }; r = nm_platform_link_bond_add(NM_PLATFORM_GET, name, &nm_platform_lnk_bond_default, NULL); @@ -263,6 +263,38 @@ test_slave(int master, int type, SignalData *master_changed) else g_assert(!nm_platform_link_is_up(NM_PLATFORM_GET, ifindex)); + if (NM_IN_SET(link_type, NM_LINK_TYPE_BOND)) { + NMPlatformLinkBondPort bond_port; + gboolean prio_has; + gboolean prio_supported; + const NMPlatformLink *link; + const NMPlatformLnkBond *lnk; + + link = nmtstp_link_get_typed(NM_PLATFORM_GET, 0, SLAVE_NAME, NM_LINK_TYPE_DUMMY); + g_assert(link); + + lnk = nm_platform_link_get_lnk_bond(NM_PLATFORM_GET, master, NULL); + g_assert(lnk); + + g_assert(NM_IN_SET(lnk->mode, 3, 1)); + prio_supported = (lnk->mode == 1); + prio_has = nmtst_get_rand_bool() && prio_supported; + + bond_port = (NMPlatformLinkBondPort){ + .queue_id = 5, + .prio_has = prio_has, + .prio = prio_has ? 6 : 0, + }; + + g_assert(nm_platform_link_change(NM_PLATFORM_GET, ifindex, &bond_port)); + accept_signals(link_changed, 1, 3); + + link = nmtstp_link_get(NM_PLATFORM_GET, ifindex, SLAVE_NAME); + g_assert(link); + g_assert_cmpint(link->port_data.bond.queue_id, ==, 5); + g_assert(link->port_data.bond.prio_has || link->port_data.bond.prio == 0); + } + test_link_changed_signal_arg1 = FALSE; test_link_changed_signal_arg2 = FALSE; g_signal_connect(NM_PLATFORM_GET, @@ -3349,7 +3381,9 @@ test_netns_bind_to_path(gpointer fixture, gconstpointer test_data) nm_auto_pop_netns NMPNetns *netns_pop = NULL; NMPlatform *platforms[3]; NMPNetns *netns; + int errsv; int i; + int r; if (_test_netns_check_skip()) return; @@ -3379,7 +3413,15 @@ test_netns_bind_to_path(gpointer fixture, gconstpointer test_data) g_assert(nmp_netns_bind_to_path(netns, P_VAR_RUN_NETNS_BINDNAME, NULL)); g_assert(g_file_test(P_VAR_RUN_NETNS_BINDNAME, G_FILE_TEST_EXISTS)); - g_assert_cmpint(nmtstp_run_command("ip netns exec " P_NETNS_BINDNAME " true"), ==, 0); + + r = nmtstp_run_command("ip netns exec " P_NETNS_BINDNAME " true"); + if (r != 0) { + gs_free char *msg = g_strdup_printf("`ip netns exec` fails with code %d. Skip test", r); + + g_test_skip(msg); + return; + } + g_assert_cmpint( nmtstp_run_command("ip netns exec " P_NETNS_BINDNAME " ip link show dummy2b 1>/dev/null"), ==, @@ -3392,7 +3434,12 @@ test_netns_bind_to_path(gpointer fixture, gconstpointer test_data) !=, 0); - g_assert_cmpint(umount(P_VAR_RUN), ==, 0); + r = umount(P_VAR_RUN); + if (r != 0) { + errsv = errno; + g_assert_cmpint(errsv, ==, 0); + g_assert_cmpint(r, ==, 0); + } } /*****************************************************************************/ diff --git a/src/core/ppp/meson.build b/src/core/ppp/meson.build index 9ee46113..2365ffa8 100644 --- a/src/core/ppp/meson.build +++ b/src/core/ppp/meson.build @@ -3,7 +3,10 @@ nm_pppd_plugin = shared_module( 'nm-pppd-plugin', name_prefix: '', - sources: 'nm-pppd-plugin.c', + sources: [ + 'nm-pppd-compat.c', + 'nm-pppd-plugin.c', + ], include_directories: [ src_inc, top_inc, @@ -11,6 +14,7 @@ nm_pppd_plugin = shared_module( dependencies: [ libnm_core_public_dep, glib_dep, + pppd_dep, ], link_with: [ libnm_core_impl, diff --git a/src/core/ppp/nm-ppp-manager.c b/src/core/ppp/nm-ppp-manager.c index 14cd5731..fbc5d075 100644 --- a/src/core/ppp/nm-ppp-manager.c +++ b/src/core/ppp/nm-ppp-manager.c @@ -428,7 +428,7 @@ impl_ppp_manager_set_state(NMDBusObject *obj, if (ppp_state >= NM_PPP_STATUS_INTERN_DEAD) { /* we don't expect an intern state to be reported by the plugin. */ - ppp_state = NM_PPP_STATUS_UNKNOWN; + ppp_state = NM_PPP_STATUS_INTERN_UNKNOWN; } g_signal_emit(self, signals[STATE_CHANGED], 0, (guint) ppp_state); @@ -843,7 +843,7 @@ create_pppd_cmd_line(NMPPPManager *self, const char *pppoe_service; nm_strv_ptrarray_add_string_dup(cmd, "plugin"); - nm_strv_ptrarray_add_string_dup(cmd, "rp-pppoe.so"); + nm_strv_ptrarray_add_string_dup(cmd, NM_PPPOE_PLUGIN_NAME); nm_strv_ptrarray_add_string_concat(cmd, "nic-", priv->parent_iface); @@ -872,7 +872,7 @@ create_pppd_cmd_line(NMPPPManager *self, } else if (!strcmp(protocol, NM_SETTING_ADSL_PROTOCOL_PPPOE)) { nm_strv_ptrarray_add_string_dup(cmd, "plugin"); - nm_strv_ptrarray_add_string_dup(cmd, "rp-pppoe.so"); + nm_strv_ptrarray_add_string_dup(cmd, NM_PPPOE_PLUGIN_NAME); nm_strv_ptrarray_add_string_dup(cmd, priv->parent_iface); } diff --git a/src/core/ppp/nm-ppp-mgr.c b/src/core/ppp/nm-ppp-mgr.c index bebffaf3..91d9a021 100644 --- a/src/core/ppp/nm-ppp-mgr.c +++ b/src/core/ppp/nm-ppp-mgr.c @@ -257,7 +257,7 @@ _ppp_signal_state_changed(NMPPPManager *ppp_manager, guint ppp_state_u, gpointer const char *reason_msg; if ((guint) ppp_state != ppp_state_u) - ppp_state = NM_PPP_STATUS_UNKNOWN; + ppp_state = NM_PPP_STATUS_INTERN_UNKNOWN; switch (ppp_state) { case NM_PPP_STATUS_DISCONNECT: diff --git a/src/core/ppp/nm-ppp-status.h b/src/core/ppp/nm-ppp-status.h index df0ac10b..a2576e9c 100644 --- a/src/core/ppp/nm-ppp-status.h +++ b/src/core/ppp/nm-ppp-status.h @@ -8,24 +8,31 @@ #define __NM_PPP_STATUS_H__ typedef enum { - NM_PPP_STATUS_UNKNOWN, - - NM_PPP_STATUS_DEAD, - NM_PPP_STATUS_INITIALIZE, - NM_PPP_STATUS_SERIALCONN, - NM_PPP_STATUS_DORMANT, - NM_PPP_STATUS_ESTABLISH, - NM_PPP_STATUS_AUTHENTICATE, - NM_PPP_STATUS_CALLBACK, - NM_PPP_STATUS_NETWORK, - NM_PPP_STATUS_RUNNING, - NM_PPP_STATUS_TERMINATE, - NM_PPP_STATUS_DISCONNECT, - NM_PPP_STATUS_HOLDOFF, - NM_PPP_STATUS_MASTER, + + /* The numeric values correspond to the PHASE_{DEAD,} defines from <pppd/pppd.h>. */ + NM_PPP_STATUS_DEAD = 0, + NM_PPP_STATUS_INITIALIZE = 1, + NM_PPP_STATUS_SERIALCONN = 2, + NM_PPP_STATUS_DORMANT = 3, + NM_PPP_STATUS_ESTABLISH = 4, + NM_PPP_STATUS_AUTHENTICATE = 5, + NM_PPP_STATUS_CALLBACK = 6, + NM_PPP_STATUS_NETWORK = 7, + NM_PPP_STATUS_RUNNING = 8, + NM_PPP_STATUS_TERMINATE = 9, + NM_PPP_STATUS_DISCONNECT = 10, + NM_PPP_STATUS_HOLDOFF = 11, + NM_PPP_STATUS_MASTER = 12, /* these states are internal and not announced by the pppd plugin. */ + NM_PPP_STATUS_INTERN_UNKNOWN = 20, NM_PPP_STATUS_INTERN_DEAD, } NMPPPStatus; +/*****************************************************************************/ + +/* The plugin name "(rp-)pppoe.so" depends on the ppp version. */ + +#define NM_PPPOE_PLUGIN_NAME (NM_PPP_VERSION_2_5_OR_NEWER ? "pppoe.so" : "rp-pppoe.so") + #endif /* __NM_PPP_STATUS_H__ */ diff --git a/src/core/ppp/nm-pppd-compat.c b/src/core/ppp/nm-pppd-compat.c new file mode 100644 index 00000000..f7940c55 --- /dev/null +++ b/src/core/ppp/nm-pppd-compat.c @@ -0,0 +1,308 @@ +/* SPDX-License-Identifier: LGPL-2.1-or-later */ +/* + * Copyright (C) 2023 Eivind Næss, eivnaes@yahoo.com + */ + +/*****************************************************************************/ + +/* PPP headers define some symbols as we do. We need to be careful to handle + * the conflict, and include stuff in a certain order. */ + +#include <config.h> +#define ___CONFIG_H__ + +/*****************************************************************************/ + +#if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) +_Pragma("GCC diagnostic push") _Pragma("GCC diagnostic ignored \"-Wstrict-prototypes\"") +#define _NM_PRAGMA_WARNING_REENABLE _Pragma("GCC diagnostic pop") +#elif defined(__clang__) +_Pragma("clang diagnostic push") _Pragma("clang diagnostic ignored \"-Wunknown-warning-option\"") + _Pragma("clang diagnostic ignored \"-Wstrict-prototypes\"") +#define _NM_PRAGMA_WARNING_REENABLE _Pragma("clang diagnostic pop") +#else +#define _NM_PRAGMA_WARNING_REENABLE +#endif + +/*****************************************************************************/ + +#define INET6 1 + +#include <pppd/pppd.h> + +#ifdef DATE +/* Before ppp 2.5, pppd/patchlevel.h defined "DATE". Use that for detection. */ +#define PPP_VERSION_2_5_OR_NEWER 0 +#else +#define PPP_VERSION_2_5_OR_NEWER 1 +#endif + +#include <pppd/eui64.h> +#include <pppd/fsm.h> +#include <pppd/ipcp.h> +#include <pppd/ipv6cp.h> +#include <pppd/upap.h> + +#if PPP_VERSION_2_5_OR_NEWER +#include <pppd/chap.h> +#else +#include <pppd/chap-new.h> +#include <pppd/chap_ms.h> +#endif + + char pppd_version[] = ( +#if PPP_VERSION_2_5_OR_NEWER + PPPD_VERSION +#else + VERSION +#endif + ); + +#undef VERSION + +_NM_PRAGMA_WARNING_REENABLE; + +/*****************************************************************************/ + +#include "libnm-glib-aux/nm-default-glib.h" + +#include "nm-pppd-compat.h" + +#include <net/if.h> +#include <dlfcn.h> + +#include "nm-ppp-status.h" + +/*****************************************************************************/ + +G_STATIC_ASSERT(PPP_VERSION_2_5_OR_NEWER == NM_PPP_VERSION_2_5_OR_NEWER); + +/*****************************************************************************/ + +G_STATIC_ASSERT((gint64) NM_PPP_STATUS_DEAD == PHASE_DEAD); +G_STATIC_ASSERT((gint64) NM_PPP_STATUS_INITIALIZE == PHASE_INITIALIZE); +G_STATIC_ASSERT((gint64) NM_PPP_STATUS_SERIALCONN == PHASE_SERIALCONN); +G_STATIC_ASSERT((gint64) NM_PPP_STATUS_DORMANT == PHASE_DORMANT); +G_STATIC_ASSERT((gint64) NM_PPP_STATUS_ESTABLISH == PHASE_ESTABLISH); +G_STATIC_ASSERT((gint64) NM_PPP_STATUS_AUTHENTICATE == PHASE_AUTHENTICATE); +G_STATIC_ASSERT((gint64) NM_PPP_STATUS_CALLBACK == PHASE_CALLBACK); +G_STATIC_ASSERT((gint64) NM_PPP_STATUS_NETWORK == PHASE_NETWORK); +G_STATIC_ASSERT((gint64) NM_PPP_STATUS_RUNNING == PHASE_RUNNING); +G_STATIC_ASSERT((gint64) NM_PPP_STATUS_TERMINATE == PHASE_TERMINATE); +G_STATIC_ASSERT((gint64) NM_PPP_STATUS_DISCONNECT == PHASE_DISCONNECT); +G_STATIC_ASSERT((gint64) NM_PPP_STATUS_HOLDOFF == PHASE_HOLDOFF); +G_STATIC_ASSERT((gint64) NM_PPP_STATUS_MASTER == PHASE_MASTER); + +G_STATIC_ASSERT(NM_PPPD_COMPAT_MAXNAMELEN == MAXNAMELEN); +G_STATIC_ASSERT(NM_PPPD_COMPAT_MAXSECRETLEN == MAXSECRETLEN); + +/*****************************************************************************/ + +int +nm_pppd_compat_get_ifunit(void) +{ + int i; + +#if PPP_VERSION_2_5_OR_NEWER + i = ppp_ifunit(); +#else + i = ifunit; +#endif + + return i; +} + +const char * +nm_pppd_compat_get_ifname(void) +{ + const char *s; + +#if PPP_VERSION_2_5_OR_NEWER + s = ppp_ifname(); +#else + s = ifname; +#endif + + nm_assert(s); + nm_assert(strlen(s) < IFNAMSIZ); + return s; +} + +void +nm_pppd_compat_set_ifname(const char *arg_ifname) +{ + nm_assert(arg_ifname); + nm_assert(strlen(arg_ifname) < IFNAMSIZ); + +#if PPP_VERSION_2_5_OR_NEWER + ppp_set_ifname(arg_ifname); +#else + g_strlcpy(ifname, arg_ifname, IFNAMSIZ); +#endif +} + +const char * +nm_pppd_compat_get_ipparam(void) +{ + const char *s; + +#if PPP_VERSION_2_5_OR_NEWER + s = ppp_ipparam(); +#else + s = ipparam; +#endif + + return s; +} + +void +nm_pppd_compat_get_ipcp_options(NMPppdCompatIPCPOptions *out_got, NMPppdCompatIPCPOptions *out_his) +{ + const ipcp_options *const got = &ipcp_gotoptions[0]; + const ipcp_options *const his = &ipcp_hisoptions[0]; + + nm_assert(out_got); + nm_assert(out_his); + + *out_got = (NMPppdCompatIPCPOptions){ + .ouraddr = got->ouraddr, + .hisaddr = got->hisaddr, + .dnsaddr = {got->dnsaddr[0], got->dnsaddr[1]}, + .winsaddr = {got->winsaddr[0], got->winsaddr[1]}, + }; + + *out_his = (NMPppdCompatIPCPOptions){ + .ouraddr = his->ouraddr, + .hisaddr = his->hisaddr, + .dnsaddr = {his->dnsaddr[0], his->dnsaddr[1]}, + .winsaddr = {his->winsaddr[0], his->winsaddr[1]}, + }; +} + +void +nm_pppd_compat_get_ipv6cp_options(NMPppdCompatIPV6CPOptions *out_got, + NMPppdCompatIPV6CPOptions *out_his) +{ + const ipv6cp_options *const his = &ipv6cp_hisoptions[0]; + const ipv6cp_options *const got = &ipv6cp_gotoptions[0]; + + G_STATIC_ASSERT(sizeof(guint64) == sizeof(eui64_t)); + + nm_assert(out_got); + nm_assert(out_his); + + *out_got = (NMPppdCompatIPV6CPOptions){}; + memcpy(&out_got->ourid, &got->ourid, sizeof(guint64)); + memcpy(&out_got->hisid, &got->hisid, sizeof(guint64)); + + *out_his = (NMPppdCompatIPV6CPOptions){}; + memcpy(&out_his->ourid, &his->ourid, sizeof(guint64)); + memcpy(&out_his->hisid, &his->hisid, sizeof(guint64)); +} + +void +nm_pppd_compat_set_chap_passwd_hook(int (*hook)(char *user, char *password)) +{ + chap_passwd_hook = hook; +} + +void +nm_pppd_compat_set_chap_check_hook(int (*hook)(void)) +{ + chap_check_hook = hook; +} + +void +nm_pppd_compat_set_pap_passwd_hook(int (*hook)(char *user, char *passwd)) +{ + pap_passwd_hook = hook; +} + +void +nm_pppd_compat_set_pap_check_hook(int (*hook)(void)) +{ + pap_check_hook = hook; +} + +gboolean +nm_pppd_compat_add_notify(NMPppdCompatNotifyT type, void (*func)(void *ctx, int arg), void *ctx) +{ + nm_assert(NM_IN_SET(type, + NM_PPPD_COMPAT_NF_PID_CHANGE, + NM_PPPD_COMPAT_NF_PHASE_CHANGE, + NM_PPPD_COMPAT_NF_EXIT, + NM_PPPD_COMPAT_NF_SIGNALED, + NM_PPPD_COMPAT_NF_IP_UP, + NM_PPPD_COMPAT_NF_IP_DOWN, + NM_PPPD_COMPAT_NF_IPV6_UP, + NM_PPPD_COMPAT_NF_IPV6_DOWN, + NM_PPPD_COMPAT_NF_AUTH_UP, + NM_PPPD_COMPAT_NF_LINK_DOWN, + NM_PPPD_COMPAT_NF_FORK)); + nm_assert(func); + +#if PPP_VERSION_2_5_OR_NEWER + { + G_STATIC_ASSERT((gint64) NM_PPPD_COMPAT_NF_PID_CHANGE == NF_PID_CHANGE); + G_STATIC_ASSERT((gint64) NM_PPPD_COMPAT_NF_PHASE_CHANGE == NF_PHASE_CHANGE); + G_STATIC_ASSERT((gint64) NM_PPPD_COMPAT_NF_EXIT == NF_EXIT); + G_STATIC_ASSERT((gint64) NM_PPPD_COMPAT_NF_SIGNALED == NF_SIGNALED); + G_STATIC_ASSERT((gint64) NM_PPPD_COMPAT_NF_IP_UP == NF_IP_UP); + G_STATIC_ASSERT((gint64) NM_PPPD_COMPAT_NF_IP_DOWN == NF_IP_DOWN); + G_STATIC_ASSERT((gint64) NM_PPPD_COMPAT_NF_IPV6_UP == NF_IPV6_UP); + G_STATIC_ASSERT((gint64) NM_PPPD_COMPAT_NF_IPV6_DOWN == NF_IPV6_DOWN); + G_STATIC_ASSERT((gint64) NM_PPPD_COMPAT_NF_AUTH_UP == NF_AUTH_UP); + G_STATIC_ASSERT((gint64) NM_PPPD_COMPAT_NF_LINK_DOWN == NF_LINK_DOWN); + G_STATIC_ASSERT((gint64) NM_PPPD_COMPAT_NF_FORK == NF_FORK); + + ppp_add_notify((gint64) type, func, ctx); + return TRUE; + } +#else + { + static struct notifier **list[] = { + [NM_PPPD_COMPAT_NF_PID_CHANGE] = &pidchange, + [NM_PPPD_COMPAT_NF_PHASE_CHANGE] = &phasechange, + [NM_PPPD_COMPAT_NF_EXIT] = &exitnotify, + [NM_PPPD_COMPAT_NF_SIGNALED] = &sigreceived, + [NM_PPPD_COMPAT_NF_IP_UP] = &ip_up_notifier, + [NM_PPPD_COMPAT_NF_IP_DOWN] = &ip_down_notifier, + [NM_PPPD_COMPAT_NF_IPV6_UP] = NULL /* ipv6_up_notifier */, + [NM_PPPD_COMPAT_NF_IPV6_DOWN] = NULL /* ipv6_down_notifier */, + [NM_PPPD_COMPAT_NF_AUTH_UP] = &auth_up_notifier, + [NM_PPPD_COMPAT_NF_LINK_DOWN] = &link_down_notifier, + [NM_PPPD_COMPAT_NF_FORK] = &fork_notifier, + }; + struct notifier **notifier; + + nm_assert(_NM_INT_NOT_NEGATIVE(type) && type < G_N_ELEMENTS(list)); + + if (NM_IN_SET(type, NM_PPPD_COMPAT_NF_IPV6_UP, NM_PPPD_COMPAT_NF_IPV6_DOWN)) { + static gsize load_once = 0; + + /* pppd might be build without IPv6 support. Load the symbols dynamically. */ + if (g_once_init_enter(&load_once)) { + void *handle; + + handle = dlopen(NULL, RTLD_NOW | RTLD_GLOBAL); + if (handle) { + list[NM_PPPD_COMPAT_NF_IPV6_UP] = dlsym(handle, "ipv6_up_notifier"); + list[NM_PPPD_COMPAT_NF_IPV6_DOWN] = dlsym(handle, "ipv6_down_notifier"); + dlclose(handle); + } + g_once_init_leave(&load_once, 1); + } + + notifier = list[type]; + } else { + notifier = list[type]; + nm_assert(notifier); + } + + if (notifier) + add_notifier(notifier, func, ctx); + + return !!notifier; + } +#endif +} diff --git a/src/core/ppp/nm-pppd-compat.h b/src/core/ppp/nm-pppd-compat.h new file mode 100644 index 00000000..11376e36 --- /dev/null +++ b/src/core/ppp/nm-pppd-compat.h @@ -0,0 +1,64 @@ +/* SPDX-License-Identifier: LGPL-2.1-or-later */ +/* + * Copyright (C) 2023 Eivind Næss, eivnaes@yahoo.com + */ + +#ifndef __NM_PPPD_COMPAT_H__ +#define __NM_PPPD_COMPAT_H__ + +#define NM_PPPD_COMPAT_MAXNAMELEN 256 +#define NM_PPPD_COMPAT_MAXSECRETLEN 256 + +int nm_pppd_compat_get_ifunit(void); + +const char *nm_pppd_compat_get_ifname(void); +void nm_pppd_compat_set_ifname(const char *ifname); + +const char *nm_pppd_compat_get_ipparam(void); + +typedef struct { + /* has information from "ipcp_options" */ + in_addr_t ouraddr; + in_addr_t hisaddr; + in_addr_t dnsaddr[2]; + in_addr_t winsaddr[2]; +} NMPppdCompatIPCPOptions; + +void nm_pppd_compat_get_ipcp_options(NMPppdCompatIPCPOptions *out_got, + NMPppdCompatIPCPOptions *out_his); + +typedef struct { + /* has information from "ipv6cp_options" */ + guint64 ourid; + guint64 hisid; +} NMPppdCompatIPV6CPOptions; + +void nm_pppd_compat_get_ipv6cp_options(NMPppdCompatIPV6CPOptions *out_got, + NMPppdCompatIPV6CPOptions *out_his); + +void nm_pppd_compat_set_chap_passwd_hook(int (*hook)(char *user, char *password)); + +void nm_pppd_compat_set_chap_check_hook(int (*hook)(void)); + +void nm_pppd_compat_set_pap_passwd_hook(int (*hook)(char *user, char *passwd)); + +void nm_pppd_compat_set_pap_check_hook(int (*hook)(void)); + +typedef enum { + NM_PPPD_COMPAT_NF_PID_CHANGE, + NM_PPPD_COMPAT_NF_PHASE_CHANGE, + NM_PPPD_COMPAT_NF_EXIT, + NM_PPPD_COMPAT_NF_SIGNALED, + NM_PPPD_COMPAT_NF_IP_UP, + NM_PPPD_COMPAT_NF_IP_DOWN, + NM_PPPD_COMPAT_NF_IPV6_UP, + NM_PPPD_COMPAT_NF_IPV6_DOWN, + NM_PPPD_COMPAT_NF_AUTH_UP, + NM_PPPD_COMPAT_NF_LINK_DOWN, + NM_PPPD_COMPAT_NF_FORK, +} NMPppdCompatNotifyT; + +gboolean +nm_pppd_compat_add_notify(NMPppdCompatNotifyT type, void (*func)(void *ctx, int arg), void *ctx); + +#endif /* #ifdef __NM_PPPD_COMPAT_H__ */ diff --git a/src/core/ppp/nm-pppd-plugin.c b/src/core/ppp/nm-pppd-plugin.c index e2e34d2a..93425f38 100644 --- a/src/core/ppp/nm-pppd-plugin.c +++ b/src/core/ppp/nm-pppd-plugin.c @@ -4,33 +4,23 @@ * Copyright (C) 2008 Red Hat, Inc. */ -#include <config.h> -#define ___CONFIG_H__ +#include "libnm-glib-aux/nm-default-glib.h" + +#include "nm-pppd-plugin.h" -#include <pppd/pppd.h> -#include <pppd/fsm.h> -#include <pppd/ipcp.h> #include <sys/socket.h> #include <netinet/in.h> #include <net/if.h> #include <arpa/inet.h> #include <dlfcn.h> +#include <glib.h> -#define INET6 -#include <pppd/eui64.h> -#include <pppd/ipv6cp.h> - -#include "libnm-glib-aux/nm-default-glib.h" - -#include "nm-dbus-interface.h" - -#include "nm-pppd-plugin.h" +#include "nm-pppd-compat.h" #include "nm-ppp-status.h" +#include "nm-dbus-interface.h" int plugin_init(void); -char pppd_version[] = VERSION; - static struct { GDBusConnection *dbus_connection; char *ipparam; @@ -39,73 +29,63 @@ static struct { static void nm_phasechange(int arg) { - NMPPPStatus ppp_status = NM_PPP_STATUS_UNKNOWN; + NMPPPStatus ppp_status; char *ppp_phase; g_return_if_fail(G_IS_DBUS_CONNECTION(gl.dbus_connection)); + ppp_status = arg; + switch (arg) { - case PHASE_DEAD: - ppp_status = NM_PPP_STATUS_DEAD; - ppp_phase = "dead"; + case NM_PPP_STATUS_DEAD: + ppp_phase = "dead"; break; - case PHASE_INITIALIZE: - ppp_status = NM_PPP_STATUS_INITIALIZE; - ppp_phase = "initialize"; + case NM_PPP_STATUS_INITIALIZE: + ppp_phase = "initialize"; break; - case PHASE_SERIALCONN: - ppp_status = NM_PPP_STATUS_SERIALCONN; - ppp_phase = "serial connection"; + case NM_PPP_STATUS_SERIALCONN: + ppp_phase = "serial connection"; break; - case PHASE_DORMANT: - ppp_status = NM_PPP_STATUS_DORMANT; - ppp_phase = "dormant"; + case NM_PPP_STATUS_DORMANT: + ppp_phase = "dormant"; break; - case PHASE_ESTABLISH: - ppp_status = NM_PPP_STATUS_ESTABLISH; - ppp_phase = "establish"; + case NM_PPP_STATUS_ESTABLISH: + ppp_phase = "establish"; break; - case PHASE_AUTHENTICATE: - ppp_status = NM_PPP_STATUS_AUTHENTICATE; - ppp_phase = "authenticate"; + case NM_PPP_STATUS_AUTHENTICATE: + ppp_phase = "authenticate"; break; - case PHASE_CALLBACK: - ppp_status = NM_PPP_STATUS_CALLBACK; - ppp_phase = "callback"; + case NM_PPP_STATUS_CALLBACK: + ppp_phase = "callback"; break; - case PHASE_NETWORK: - ppp_status = NM_PPP_STATUS_NETWORK; - ppp_phase = "network"; + case NM_PPP_STATUS_NETWORK: + ppp_phase = "network"; break; - case PHASE_RUNNING: - ppp_status = NM_PPP_STATUS_RUNNING; - ppp_phase = "running"; + case NM_PPP_STATUS_RUNNING: + ppp_phase = "running"; break; - case PHASE_TERMINATE: - ppp_status = NM_PPP_STATUS_TERMINATE; - ppp_phase = "terminate"; + case NM_PPP_STATUS_TERMINATE: + ppp_phase = "terminate"; break; - case PHASE_DISCONNECT: - ppp_status = NM_PPP_STATUS_DISCONNECT; - ppp_phase = "disconnect"; + case NM_PPP_STATUS_DISCONNECT: + ppp_phase = "disconnect"; break; - case PHASE_HOLDOFF: - ppp_status = NM_PPP_STATUS_HOLDOFF; - ppp_phase = "holdoff"; + case NM_PPP_STATUS_HOLDOFF: + ppp_phase = "holdoff"; break; - case PHASE_MASTER: - ppp_status = NM_PPP_STATUS_MASTER; - ppp_phase = "master"; + case NM_PPP_STATUS_MASTER: + ppp_phase = "master"; break; default: - ppp_phase = "unknown"; + ppp_status = NM_PPP_STATUS_INTERN_UNKNOWN; + ppp_phase = "unknown"; break; } g_message("nm-ppp-plugin: status %d / phase '%s'", ppp_status, ppp_phase); - if (ppp_status != NM_PPP_STATUS_UNKNOWN) { + if (ppp_status != NM_PPP_STATUS_INTERN_UNKNOWN) { g_dbus_connection_call(gl.dbus_connection, NM_DBUS_SERVICE, gl.ipparam, @@ -125,7 +105,7 @@ nm_phasechange(int arg) char new_name[IF_NAMESIZE]; int ifindex; - ifindex = if_nametoindex(ifname); + ifindex = if_nametoindex(nm_pppd_compat_get_ifname()); /* Make a sync call to ensure that when the call * terminates the interface already has its final @@ -143,9 +123,12 @@ nm_phasechange(int arg) NULL); /* Update the name in pppd if NM changed it */ - if (if_indextoname(ifindex, new_name) && !nm_streq0(ifname, new_name)) { - g_message("nm-ppp-plugin: interface name changed from '%s' to '%s'", ifname, new_name); - g_strlcpy(ifname, new_name, IF_NAMESIZE); + if (if_indextoname(ifindex, new_name) + && !nm_streq0(nm_pppd_compat_get_ifname(), new_name)) { + g_message("nm-ppp-plugin: interface name changed from '%s' to '%s'", + nm_pppd_compat_get_ifname(), + new_name); + nm_pppd_compat_set_ifname(new_name); } } } @@ -154,7 +137,7 @@ static void nm_phasechange_hook(void *data, int arg) { /* We send the nofication in exitnotify instead */ - if (arg == PHASE_DEAD) + if (arg == NM_PPP_STATUS_DEAD) return; nm_phasechange(arg); @@ -163,18 +146,21 @@ nm_phasechange_hook(void *data, int arg) static void nm_ip_up(void *data, int arg) { - ipcp_options opts = ipcp_gotoptions[0]; - ipcp_options peer_opts = ipcp_hisoptions[0]; - GVariantBuilder builder; - guint32 pppd_made_up_address = htonl(0x0a404040 + ifunit); + NMPppdCompatIPCPOptions opts; + NMPppdCompatIPCPOptions peer_opts; + GVariantBuilder builder; + const in_addr_t pppd_made_up_address = + htonl(0x0a404040u + ((guint) nm_pppd_compat_get_ifunit())); g_return_if_fail(G_IS_DBUS_CONNECTION(gl.dbus_connection)); g_message("nm-ppp-plugin: ip-up event"); + nm_pppd_compat_get_ipcp_options(&opts, &peer_opts); + if (!opts.ouraddr) { g_warning("nm-ppp-plugin: didn't receive an internal IP from pppd!"); - nm_phasechange(PHASE_DEAD); + nm_phasechange(NM_PPP_STATUS_DEAD); return; } @@ -186,7 +172,7 @@ nm_ip_up(void *data, int arg) g_variant_builder_add(&builder, "{sv}", NM_PPP_IP4_CONFIG_INTERFACE, - g_variant_new_string(ifname)); + g_variant_new_string(nm_pppd_compat_get_ifname())); g_variant_builder_add(&builder, "{sv}", @@ -263,28 +249,19 @@ nm_ip_up(void *data, int arg) NULL); } -static GVariant * -eui64_to_variant(eui64_t eui) -{ - guint64 iid; - - G_STATIC_ASSERT(sizeof(iid) == sizeof(eui)); - - memcpy(&iid, &eui, sizeof(eui)); - return g_variant_new_uint64(iid); -} - static void nm_ip6_up(void *data, int arg) { - ipv6cp_options *ho = &ipv6cp_hisoptions[0]; - ipv6cp_options *go = &ipv6cp_gotoptions[0]; - GVariantBuilder builder; + NMPppdCompatIPV6CPOptions his; + NMPppdCompatIPV6CPOptions got; + GVariantBuilder builder; g_return_if_fail(G_IS_DBUS_CONNECTION(gl.dbus_connection)); g_message("nm-ppp-plugin: ip6-up event"); + nm_pppd_compat_get_ipv6cp_options(&got, &his); + g_variant_builder_init(&builder, G_VARIANT_TYPE_VARDICT); /* Keep sending the interface name to be backwards compatible * with older versions of NM during a package upgrade, where @@ -292,12 +269,15 @@ nm_ip6_up(void *data, int arg) g_variant_builder_add(&builder, "{sv}", NM_PPP_IP6_CONFIG_INTERFACE, - g_variant_new_string(ifname)); - g_variant_builder_add(&builder, "{sv}", NM_PPP_IP6_CONFIG_OUR_IID, eui64_to_variant(go->ourid)); + g_variant_new_string(nm_pppd_compat_get_ifname())); + g_variant_builder_add(&builder, + "{sv}", + NM_PPP_IP6_CONFIG_OUR_IID, + g_variant_new_uint64(got.ourid)); g_variant_builder_add(&builder, "{sv}", NM_PPP_IP6_CONFIG_PEER_IID, - eui64_to_variant(ho->hisid)); + g_variant_new_uint64(his.hisid)); /* DNS is done via DHCPv6 or router advertisements */ @@ -368,8 +348,8 @@ get_credentials(char *username, char *password) g_variant_get(ret, "(&s&s)", &my_username, &my_password); - g_strlcpy(username, my_username, MAXNAMELEN); - g_strlcpy(password, my_password, MAXSECRETLEN); + g_strlcpy(username, my_username, NM_PPPD_COMPAT_MAXNAMELEN); + g_strlcpy(password, my_password, NM_PPPD_COMPAT_MAXSECRETLEN); return 1; } @@ -382,7 +362,7 @@ nm_exit_notify(void *data, int arg) /* We wait until this point to notify dead phase to make sure that * the serial port has recovered already its original settings. */ - nm_phasechange(PHASE_DEAD); + nm_phasechange(NM_PPP_STATUS_DEAD); g_message("nm-ppp-plugin: cleaning up"); @@ -390,27 +370,6 @@ nm_exit_notify(void *data, int arg) nm_clear_g_free(&gl.ipparam); } -static void -add_ip6_notifier(void) -{ - static struct notifier **notifier = NULL; - static gsize load_once = 0; - - if (g_once_init_enter(&load_once)) { - void *handle = dlopen(NULL, RTLD_NOW | RTLD_GLOBAL); - - if (handle) { - notifier = dlsym(handle, "ipv6_up_notifier"); - dlclose(handle); - } - g_once_init_leave(&load_once, 1); - } - if (notifier) - add_notifier(notifier, nm_ip6_up, NULL); - else - g_message("nm-ppp-plugin: no IPV6CP notifier support; IPv6 not available"); -} - int plugin_init(void) { @@ -427,17 +386,16 @@ plugin_init(void) return -1; } - gl.ipparam = g_strdup(ipparam); - - chap_passwd_hook = get_credentials; - chap_check_hook = get_chap_check; - pap_passwd_hook = get_credentials; - pap_check_hook = get_pap_check; + gl.ipparam = g_strdup(nm_pppd_compat_get_ipparam()); - add_notifier(&phasechange, nm_phasechange_hook, NULL); - add_notifier(&ip_up_notifier, nm_ip_up, NULL); - add_notifier(&exitnotify, nm_exit_notify, NULL); - add_ip6_notifier(); + nm_pppd_compat_set_chap_passwd_hook(get_credentials); + nm_pppd_compat_set_chap_check_hook(get_chap_check); + nm_pppd_compat_set_pap_passwd_hook(get_credentials); + nm_pppd_compat_set_pap_check_hook(get_pap_check); + nm_pppd_compat_add_notify(NM_PPPD_COMPAT_NF_PHASE_CHANGE, nm_phasechange_hook, NULL); + nm_pppd_compat_add_notify(NM_PPPD_COMPAT_NF_IP_UP, nm_ip_up, NULL); + nm_pppd_compat_add_notify(NM_PPPD_COMPAT_NF_EXIT, nm_exit_notify, NULL); + nm_pppd_compat_add_notify(NM_PPPD_COMPAT_NF_IPV6_UP, nm_ip6_up, NULL); return 0; } diff --git a/src/core/settings/plugins/ifcfg-rh/nms-ifcfg-rh-reader.c b/src/core/settings/plugins/ifcfg-rh/nms-ifcfg-rh-reader.c index aa593331..6cfb5705 100644 --- a/src/core/settings/plugins/ifcfg-rh/nms-ifcfg-rh-reader.c +++ b/src/core/settings/plugins/ifcfg-rh/nms-ifcfg-rh-reader.c @@ -5377,6 +5377,7 @@ parse_infiniband_p_key(shvarFile *ifcfg, int *out_p_key, char **out_parent, GErr gs_free char *physdev = NULL; gs_free char *pkey_id = NULL; int id; + int fixup_id = 0; physdev = svGetValueStr_cp(ifcfg, "PHYSDEV"); if (!physdev) { @@ -5387,7 +5388,14 @@ parse_infiniband_p_key(shvarFile *ifcfg, int *out_p_key, char **out_parent, GErr return FALSE; } - pkey_id = svGetValueStr_cp(ifcfg, "PKEY_ID"); + pkey_id = svGetValueStr_cp(ifcfg, "PKEY_ID_NM"); + if (!pkey_id) { + /* Only check for "$PKEY_ID". That key is interpreted as having the + * full membership flag set ("fixup_id"). */ + fixup_id = 0x8000; + pkey_id = svGetValueStr_cp(ifcfg, "PKEY_ID"); + } + if (!pkey_id) { g_set_error(error, NM_SETTINGS_ERROR, @@ -5406,6 +5414,8 @@ parse_infiniband_p_key(shvarFile *ifcfg, int *out_p_key, char **out_parent, GErr return FALSE; } + id |= fixup_id; + *out_p_key = id; *out_parent = g_steal_pointer(&physdev); return TRUE; @@ -5576,6 +5586,7 @@ make_bond_port_setting(shvarFile *ifcfg) gs_free char *value_to_free = NULL; const char *value; guint queue_id; + gint32 prio; g_return_val_if_fail(ifcfg != NULL, FALSE); @@ -5584,11 +5595,23 @@ make_bond_port_setting(shvarFile *ifcfg) s_port = nm_setting_bond_port_new(); queue_id = _nm_utils_ascii_str_to_uint64(value, 10, 0, G_MAXUINT16, NM_BOND_PORT_QUEUE_ID_DEF); - if (errno != 0) { - PARSE_WARNING("Invalid bond port queue_id value '%s'", value); - return s_port; - } - g_object_set(G_OBJECT(s_port), NM_SETTING_BOND_PORT_QUEUE_ID, queue_id, NULL); + if (errno != 0) + PARSE_WARNING("Invalid bond port queue_id value BOND_PORT_QUEUE_ID '%s'", value); + else + g_object_set(G_OBJECT(s_port), NM_SETTING_BOND_PORT_QUEUE_ID, queue_id, NULL); + } + + nm_clear_g_free(&value_to_free); + value = svGetValue(ifcfg, "BOND_PORT_PRIO", &value_to_free); + if (value) { + if (!s_port) + s_port = nm_setting_bond_port_new(); + prio = + _nm_utils_ascii_str_to_int64(value, 10, G_MININT32, G_MAXINT32, NM_BOND_PORT_PRIO_DEF); + if (errno != 0) + PARSE_WARNING("Invalid bond port prio value BOND_PORT_PRIO '%s'", value); + else + g_object_set(G_OBJECT(s_port), NM_SETTING_BOND_PORT_PRIO, prio, NULL); } return s_port; diff --git a/src/core/settings/plugins/ifcfg-rh/nms-ifcfg-rh-utils.c b/src/core/settings/plugins/ifcfg-rh/nms-ifcfg-rh-utils.c index 552310dd..207b8700 100644 --- a/src/core/settings/plugins/ifcfg-rh/nms-ifcfg-rh-utils.c +++ b/src/core/settings/plugins/ifcfg-rh/nms-ifcfg-rh-utils.c @@ -827,6 +827,7 @@ const NMSIfcfgKeyTypeInfo nms_ifcfg_well_known_keys[] = { _KEY_TYPE("BAND", NMS_IFCFG_KEY_TYPE_IS_PLAIN), _KEY_TYPE("BONDING_MASTER", NMS_IFCFG_KEY_TYPE_IS_PLAIN), _KEY_TYPE("BONDING_OPTS", NMS_IFCFG_KEY_TYPE_IS_PLAIN), + _KEY_TYPE("BOND_PORT_PRIO", NMS_IFCFG_KEY_TYPE_IS_PLAIN), _KEY_TYPE("BOND_PORT_QUEUE_ID", NMS_IFCFG_KEY_TYPE_IS_PLAIN), _KEY_TYPE("BOOTPROTO", NMS_IFCFG_KEY_TYPE_IS_PLAIN), _KEY_TYPE("BRIDGE", NMS_IFCFG_KEY_TYPE_IS_PLAIN), @@ -1031,6 +1032,7 @@ const NMSIfcfgKeyTypeInfo nms_ifcfg_well_known_keys[] = { _KEY_TYPE("PHYSDEV", NMS_IFCFG_KEY_TYPE_IS_PLAIN), _KEY_TYPE("PKEY", NMS_IFCFG_KEY_TYPE_IS_PLAIN), _KEY_TYPE("PKEY_ID", NMS_IFCFG_KEY_TYPE_IS_PLAIN), + _KEY_TYPE("PKEY_ID_NM", NMS_IFCFG_KEY_TYPE_IS_PLAIN), _KEY_TYPE("PMF", NMS_IFCFG_KEY_TYPE_IS_PLAIN), _KEY_TYPE("PORTNAME", NMS_IFCFG_KEY_TYPE_IS_PLAIN), _KEY_TYPE("POWERSAVE", NMS_IFCFG_KEY_TYPE_IS_PLAIN), diff --git a/src/core/settings/plugins/ifcfg-rh/nms-ifcfg-rh-utils.h b/src/core/settings/plugins/ifcfg-rh/nms-ifcfg-rh-utils.h index 4fa9f18c..51b118e3 100644 --- a/src/core/settings/plugins/ifcfg-rh/nms-ifcfg-rh-utils.h +++ b/src/core/settings/plugins/ifcfg-rh/nms-ifcfg-rh-utils.h @@ -33,7 +33,7 @@ typedef struct { NMSIfcfgKeyTypeFlags key_flags; } NMSIfcfgKeyTypeInfo; -extern const NMSIfcfgKeyTypeInfo nms_ifcfg_well_known_keys[261]; +extern const NMSIfcfgKeyTypeInfo nms_ifcfg_well_known_keys[263]; const NMSIfcfgKeyTypeInfo *nms_ifcfg_well_known_key_find_info(const char *key, gssize *out_idx); diff --git a/src/core/settings/plugins/ifcfg-rh/nms-ifcfg-rh-writer.c b/src/core/settings/plugins/ifcfg-rh/nms-ifcfg-rh-writer.c index 41260020..97637063 100644 --- a/src/core/settings/plugins/ifcfg-rh/nms-ifcfg-rh-writer.c +++ b/src/core/settings/plugins/ifcfg-rh/nms-ifcfg-rh-writer.c @@ -1023,7 +1023,10 @@ write_wireless_setting(NMConnection *connection, } static gboolean -write_infiniband_setting(NMConnection *connection, shvarFile *ifcfg, GError **error) +write_infiniband_setting(NMConnection *connection, + shvarFile *ifcfg, + char **out_interface_name, + GError **error) { NMSettingInfiniband *s_infiniband; const char *mac, *transport_mode, *parent; @@ -1052,11 +1055,23 @@ write_infiniband_setting(NMConnection *connection, shvarFile *ifcfg, GError **er p_key = nm_setting_infiniband_get_p_key(s_infiniband); if (p_key != -1) { svSetValueStr(ifcfg, "PKEY", "yes"); + svSetValueInt64(ifcfg, "PKEY_ID", p_key); + if (!NM_FLAGS_HAS(p_key, 0x8000)) { + /* initscripts' ifup-ib used to always interpret the PKEY_ID with + * the full membership flag (0x8000) set. For compatibility, we do + * interpret PKEY_ID as having that flag set. + * + * However, now we want to persist a p-key which doesn't have the + * flag. Use a NetworkManager specific variable for that. This configuration + * is not supported by initscripts' ifup-ib. + */ + svSetValueInt64(ifcfg, "PKEY_ID_NM", p_key); + } + parent = nm_setting_infiniband_get_parent(s_infiniband); - if (parent) - svSetValueStr(ifcfg, "PHYSDEV", parent); + svSetValueStr(ifcfg, "PHYSDEV", parent); } svSetValueStr(ifcfg, "TYPE", TYPE_INFINIBAND); @@ -1911,8 +1926,10 @@ write_bond_port_setting(NMConnection *connection, shvarFile *ifcfg) NMSettingBondPort *s_port; s_port = _nm_connection_get_setting(connection, NM_TYPE_SETTING_BOND_PORT); - if (s_port) + if (s_port) { svSetValueInt64(ifcfg, "BOND_PORT_QUEUE_ID", nm_setting_bond_port_get_queue_id(s_port)); + svSetValueInt64(ifcfg, "BOND_PORT_PRIO", nm_setting_bond_port_get_prio(s_port)); + } } static gboolean @@ -2093,7 +2110,7 @@ write_dcb_setting(NMConnection *connection, shvarFile *ifcfg, GError **error) } static void -write_connection_setting(NMSettingConnection *s_con, shvarFile *ifcfg) +write_connection_setting(NMSettingConnection *s_con, shvarFile *ifcfg, const char *interface_name) { guint32 n, i; nm_auto_free_gstring GString *str = NULL; @@ -2110,7 +2127,9 @@ write_connection_setting(NMSettingConnection *s_con, shvarFile *ifcfg) svSetValueStr(ifcfg, "NAME", nm_setting_connection_get_id(s_con)); svSetValueStr(ifcfg, "UUID", nm_setting_connection_get_uuid(s_con)); svSetValueStr(ifcfg, "STABLE_ID", nm_setting_connection_get_stable_id(s_con)); - svSetValueStr(ifcfg, "DEVICE", nm_setting_connection_get_interface_name(s_con)); + svSetValueStr(ifcfg, + "DEVICE", + interface_name ?: nm_setting_connection_get_interface_name(s_con)); svSetValueBoolean(ifcfg, "ONBOOT", nm_setting_connection_get_autoconnect(s_con)); vint = nm_setting_connection_get_autoconnect_priority(s_con); @@ -3308,6 +3327,7 @@ do_write_construct(NMConnection *connection, nm_auto_shvar_file_close shvarFile *route_content_svformat = NULL; nm_auto_free_gstring GString *route_content = NULL; nm_auto_free_gstring GString *route6_content = NULL; + gs_free char *interface_name = NULL; nm_assert(NM_IS_CONNECTION(connection)); nm_assert(_nm_connection_verify(connection, NULL) == NM_SETTING_VERIFY_SUCCESS); @@ -3413,7 +3433,7 @@ do_write_construct(NMConnection *connection, if (!write_wireless_setting(connection, ifcfg, secrets, &no_8021x, error)) return FALSE; } else if (!strcmp(type, NM_SETTING_INFINIBAND_SETTING_NAME)) { - if (!write_infiniband_setting(connection, ifcfg, error)) + if (!write_infiniband_setting(connection, ifcfg, &interface_name, error)) return FALSE; } else if (!strcmp(type, NM_SETTING_BOND_SETTING_NAME)) { if (!write_bond_setting(connection, ifcfg, &wired, error)) @@ -3518,7 +3538,7 @@ do_write_construct(NMConnection *connection, write_ip_routing_rules(connection, ifcfg, route_ignore); - write_connection_setting(s_con, ifcfg); + write_connection_setting(s_con, ifcfg, interface_name); NM_SET_OUT(out_ifcfg, g_steal_pointer(&ifcfg)); NM_SET_OUT(out_blobs, g_steal_pointer(&blobs)); diff --git a/src/core/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-infiniband b/src/core/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-infiniband0 index 6c36f1de..6c36f1de 100644 --- a/src/core/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-infiniband +++ b/src/core/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-infiniband0 diff --git a/src/core/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-infiniband1 b/src/core/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-infiniband1 new file mode 100644 index 00000000..dcb7758e --- /dev/null +++ b/src/core/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-infiniband1 @@ -0,0 +1,12 @@ +TYPE=InfiniBand +HWADDR=80:00:11:22:33:44:55:66:77:88:99:aa:bb:cc:dd:ee:ff:00:11:22 +CONNECTED_MODE=yes +MTU=65520 +IPADDR=192.168.2.2 +NETMASK=255.255.255.0 +GATEWAY=192.168.2.1 + +DEVICE=ib0.80c1 +PKEY=yes +PKEY_ID=0x00c1 +PHYSDEV=ib0 diff --git a/src/core/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-infiniband2 b/src/core/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-infiniband2 new file mode 100644 index 00000000..2e6d9edf --- /dev/null +++ b/src/core/settings/plugins/ifcfg-rh/tests/network-scripts/ifcfg-test-infiniband2 @@ -0,0 +1,12 @@ +TYPE=InfiniBand +HWADDR=80:00:11:22:33:44:55:66:77:88:99:aa:bb:cc:dd:ee:ff:00:11:22 +CONNECTED_MODE=yes +MTU=65520 +IPADDR=192.168.2.2 +NETMASK=255.255.255.0 +GATEWAY=192.168.2.1 + +DEVICE=ib0.00c1 +PKEY=yes +PKEY_ID=0x00c1 +PHYSDEV=ib0 diff --git a/src/core/settings/plugins/ifcfg-rh/tests/test-ifcfg-rh.c b/src/core/settings/plugins/ifcfg-rh/tests/test-ifcfg-rh.c index 40ff7c67..8c1e9d94 100644 --- a/src/core/settings/plugins/ifcfg-rh/tests/test-ifcfg-rh.c +++ b/src/core/settings/plugins/ifcfg-rh/tests/test-ifcfg-rh.c @@ -8352,6 +8352,7 @@ test_write_bond_port(void) s_bond_port = _nm_connection_new_setting(connection, NM_TYPE_SETTING_BOND_PORT); g_object_set(s_bond_port, NM_SETTING_BOND_PORT_QUEUE_ID, 1, NULL); + g_object_set(s_bond_port, NM_SETTING_BOND_PORT_PRIO, 10, NULL); nmtst_assert_connection_verifies(connection); @@ -8363,8 +8364,9 @@ test_write_bond_port(void) } static void -test_read_infiniband(void) +test_read_infiniband(gconstpointer test_data) { + const guint TEST_IDX = GPOINTER_TO_UINT(test_data); gs_unref_object NMConnection *connection = NULL; NMSettingInfiniband *s_infiniband; char *unmanaged = NULL; @@ -8373,11 +8375,15 @@ test_read_infiniband(void) 0x66, 0x77, 0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff, 0x00, 0x11, 0x22}; const char *transport_mode; + const char *test_files[] = { + TEST_IFCFG_DIR "/ifcfg-test-infiniband0", + TEST_IFCFG_DIR "/ifcfg-test-infiniband1", + TEST_IFCFG_DIR "/ifcfg-test-infiniband2", + }; - connection = _connection_from_file(TEST_IFCFG_DIR "/ifcfg-test-infiniband", - NULL, - TYPE_INFINIBAND, - &unmanaged); + g_assert(TEST_IDX < G_N_ELEMENTS(test_files)); + + connection = _connection_from_file(test_files[TEST_IDX], NULL, TYPE_INFINIBAND, &unmanaged); g_assert(!unmanaged); s_infiniband = nmtst_connection_assert_setting(connection, NM_TYPE_SETTING_INFINIBAND); @@ -8389,6 +8395,25 @@ test_read_infiniband(void) transport_mode = nm_setting_infiniband_get_transport_mode(s_infiniband); g_assert(transport_mode); g_assert_cmpstr(transport_mode, ==, "connected"); + + nmtst_assert_connection_verifies_without_normalization(connection); + + switch (TEST_IDX) { + case 0: + g_assert_cmpint(nm_setting_infiniband_get_p_key(s_infiniband), ==, -1); + g_assert_cmpstr(nm_setting_infiniband_get_parent(s_infiniband), ==, NULL); + g_assert_cmpstr(nm_connection_get_interface_name(connection), ==, "ib0"); + break; + case 1: + case 2: + g_assert_cmpint(nm_setting_infiniband_get_p_key(s_infiniband), ==, 0x80c1); + g_assert_cmpstr(nm_setting_infiniband_get_parent(s_infiniband), ==, "ib0"); + g_assert_cmpstr(nm_connection_get_interface_name(connection), ==, "ib0.80c1"); + break; + default: + g_assert_not_reached(); + break; + } } static void @@ -8409,21 +8434,20 @@ test_read_ipoib(void) s_infiniband = nmtst_connection_assert_setting(connection, NM_TYPE_SETTING_INFINIBAND); pkey = nm_setting_infiniband_get_p_key(s_infiniband); - g_assert(pkey); - g_assert_cmpint(pkey, ==, 12); + g_assert_cmpint(pkey, ==, 0x800c); transport_mode = nm_setting_infiniband_get_transport_mode(s_infiniband); - g_assert(transport_mode); g_assert_cmpstr(transport_mode, ==, "connected"); } static void test_write_infiniband(gconstpointer test_data) { - const int TEST_IDX = GPOINTER_TO_INT(test_data); - nmtst_auto_unlinkfile char *testfile = NULL; - gs_unref_object NMConnection *connection = NULL; - gs_unref_object NMConnection *reread = NULL; + const int TEST_IDX = GPOINTER_TO_INT(test_data); + nmtst_auto_unlinkfile char *testfile = NULL; + gs_unref_object NMConnection *connection = NULL; + gs_unref_object NMConnection *reread = NULL; + gboolean reread_same = FALSE; NMSettingConnection *s_con; NMSettingInfiniband *s_infiniband; NMSettingIPConfig *s_ip4; @@ -8433,6 +8457,7 @@ test_write_infiniband(gconstpointer test_data) NMIPAddress *addr; GError *error = NULL; const char *interface_name = NULL; + int p_key; connection = nm_simple_connection_new(); @@ -8448,14 +8473,21 @@ test_write_infiniband(gconstpointer test_data) NM_SETTING_INFINIBAND_SETTING_NAME, NULL); - if (NM_IN_SET(TEST_IDX, 1, 3)) - interface_name = "ib0.000c"; + if (NM_IN_SET(TEST_IDX, 1, 2)) + p_key = nmtst_get_rand_bool() ? 0x000c : 0x800c; + else + p_key = -1; + + if (NM_IN_SET(TEST_IDX, 1, 3)) { + if (p_key >= 0x8000) + interface_name = "ib0.800c"; + } g_object_set(s_con, NM_SETTING_CONNECTION_INTERFACE_NAME, interface_name, NULL); s_infiniband = _nm_connection_new_setting(connection, NM_TYPE_SETTING_INFINIBAND); g_object_set(s_infiniband, NM_SETTING_INFINIBAND_TRANSPORT_MODE, "connected", NULL); - if (NM_IN_SET(TEST_IDX, 1, 2)) { + if (p_key == -1) { g_object_set(s_infiniband, NM_SETTING_INFINIBAND_MAC_ADDRESS, mac, @@ -8465,7 +8497,7 @@ test_write_infiniband(gconstpointer test_data) } else { g_object_set(s_infiniband, NM_SETTING_INFINIBAND_P_KEY, - 12, + p_key, NM_SETTING_INFINIBAND_PARENT, "ib0", NULL); @@ -8494,13 +8526,20 @@ test_write_infiniband(gconstpointer test_data) nmtst_assert_connection_verifies(connection); - _writer_new_connection(connection, TEST_SCRATCH_DIR, &testfile); - - reread = _connection_from_file(testfile, NULL, TYPE_INFINIBAND, NULL); - - nmtst_assert_connection_equals(connection, TRUE, reread, FALSE); + _writer_new_connection_reread(connection, + TEST_SCRATCH_DIR, + &testfile, + NO_EXPECTED, + &reread, + &reread_same); + _assert_reread_same(connection, reread); + g_assert(reread_same); g_assert_cmpstr(interface_name, ==, nm_connection_get_interface_name(reread)); + g_assert_cmpint(nm_setting_infiniband_get_p_key( + _nm_connection_get_setting(reread, NM_TYPE_SETTING_INFINIBAND)), + ==, + p_key); } static void @@ -10672,7 +10711,9 @@ main(int argc, char **argv) g_test_add_func(TPATH "wifi/read/wep-no-keys", test_read_wifi_wep_no_keys); g_test_add_func(TPATH "wifi/read/wep-agent-keys", test_read_wifi_wep_agent_keys); - g_test_add_func(TPATH "infiniband/read", test_read_infiniband); + g_test_add_data_func(TPATH "infiniband/read/0", GUINT_TO_POINTER(0), test_read_infiniband); + g_test_add_data_func(TPATH "infiniband/read/1", GUINT_TO_POINTER(1), test_read_infiniband); + g_test_add_data_func(TPATH "infiniband/read/2", GUINT_TO_POINTER(2), test_read_infiniband); g_test_add_func(TPATH "ipoib/read", test_read_ipoib); g_test_add_func(TPATH "vlan/read", test_read_vlan_interface); g_test_add_func(TPATH "vlan/read-flags-1", test_read_vlan_flags_1); diff --git a/src/libnm-base/nm-base.h b/src/libnm-base/nm-base.h index 77d2ef0a..440fbc90 100644 --- a/src/libnm-base/nm-base.h +++ b/src/libnm-base/nm-base.h @@ -392,6 +392,7 @@ typedef struct { /****************************************************************************/ #define NM_BOND_PORT_QUEUE_ID_DEF 0 +#define NM_BOND_PORT_PRIO_DEF 0 /****************************************************************************/ diff --git a/src/libnm-client-impl/libnm.ver b/src/libnm-client-impl/libnm.ver index 3c200fb3..3fbd701d 100644 --- a/src/libnm-client-impl/libnm.ver +++ b/src/libnm-client-impl/libnm.ver @@ -1879,6 +1879,11 @@ global: nm_vpn_plugin_info_supports_multiple; } libnm_1_40_0; +libnm_1_40_20_bondp { +global: + nm_setting_bond_port_get_prio; +} libnm_1_40_0; + libnm_1_42_0 { global: nm_client_get_version_info; diff --git a/src/libnm-client-impl/tests/test-gir.py b/src/libnm-client-impl/tests/test-gir.py index d91849b8..9b42431c 100755 --- a/src/libnm-client-impl/tests/test-gir.py +++ b/src/libnm-client-impl/tests/test-gir.py @@ -7,6 +7,7 @@ from __future__ import print_function import xml.etree.ElementTree as ET import argparse +import re import sys C_NS = "http://www.gtk.org/introspection/c/1.0" @@ -60,17 +61,6 @@ def str_removesuffix(string, suffix): return string -# Older Python doesn't have str.removeprefix() -def str_removeprefix(string, prefix): - try: - return string.removeprefix(prefix) - except AttributeError: - if string.startswith(prefix): - return string[len(prefix) :] - else: - return string - - def syms_from_ver(verfile): c_syms = {} for line in open(verfile).readlines(): @@ -78,8 +68,10 @@ def syms_from_ver(verfile): if line.endswith("{"): line = str_removesuffix(line, " {") - line = str_removeprefix(line, "libnm_") - (major, minor, micro) = line.split("_") + m = re.search(r"^libnm_([0-9]+)_([0-9]+)_([0-9]+)$", line) + if not m: + continue + (major, minor, micro) = m.groups() if int(major) > 1 or int(minor) > 0: if int(micro) > 0: # Snap to next major version. Perhaps not @@ -97,8 +89,10 @@ def syms_from_ver(verfile): ): c_syms[str_removesuffix(line, ";")] = version - # This one is... messy. + # These are exceptions and we cannot know the version for the symbol so we + # hardcode it. c_syms["nm_ethtool_optname_is_feature"] = "1.20" + c_syms["nm_setting_bond_port_get_prio"] = "1.44" return c_syms diff --git a/src/libnm-core-impl/gen-metadata-nm-settings-libnm-core.xml.in b/src/libnm-core-impl/gen-metadata-nm-settings-libnm-core.xml.in index a40b8695..4a6e70fe 100644 --- a/src/libnm-core-impl/gen-metadata-nm-settings-libnm-core.xml.in +++ b/src/libnm-core-impl/gen-metadata-nm-settings-libnm-core.xml.in @@ -582,6 +582,10 @@ <setting name="bond-port" gtype="NMSettingBondPort" > + <property name="prio" + dbus-type="i" + gprop-type="gint" + /> <property name="queue-id" dbus-type="u" gprop-type="guint" diff --git a/src/libnm-core-impl/nm-connection.c b/src/libnm-core-impl/nm-connection.c index 3a9eda0e..b017a6e5 100644 --- a/src/libnm-core-impl/nm-connection.c +++ b/src/libnm-core-impl/nm-connection.c @@ -1332,18 +1332,41 @@ _normalize_ip_config(NMConnection *self, GHashTable *parameters) } static gboolean -_normalize_infiniband_mtu(NMConnection *self) +_normalize_infiniband(NMConnection *self) { NMSettingInfiniband *s_infini = nm_connection_get_setting_infiniband(self); + gboolean changed = FALSE; + const char *interface_name; + int p_key; - if (!s_infini || nm_setting_infiniband_get_mtu(s_infini) <= NM_INFINIBAND_MAX_MTU - || !NM_IN_STRSET(nm_setting_infiniband_get_transport_mode(s_infini), - "datagram", - "connected")) + if (!s_infini) return FALSE; - g_object_set(s_infini, NM_SETTING_INFINIBAND_MTU, (guint) NM_INFINIBAND_MAX_MTU, NULL); - return TRUE; + if (nm_setting_infiniband_get_mtu(s_infini) > NM_INFINIBAND_MAX_MTU) { + if (NM_IN_STRSET(nm_setting_infiniband_get_transport_mode(s_infini), + "datagram", + "connected")) { + g_object_set(s_infini, NM_SETTING_INFINIBAND_MTU, (guint) NM_INFINIBAND_MAX_MTU, NULL); + changed = TRUE; + } + } + + if ((p_key = nm_setting_infiniband_get_p_key(s_infini)) != -1 + && (interface_name = nm_connection_get_interface_name(self))) { + const char *virtual_iface_name; + + virtual_iface_name = nm_setting_infiniband_get_virtual_interface_name(s_infini); + + if (!nm_streq0(interface_name, virtual_iface_name)) { + g_object_set(nm_connection_get_setting_connection(self), + NM_SETTING_CONNECTION_INTERFACE_NAME, + virtual_iface_name, + NULL); + changed = TRUE; + } + } + + return changed; } static gboolean @@ -1986,7 +2009,7 @@ _connection_normalize(NMConnection *connection, was_modified |= _normalize_invalid_slave_port_settings(connection); was_modified |= _normalize_ip_config(connection, parameters); was_modified |= _normalize_ethernet_link_neg(connection); - was_modified |= _normalize_infiniband_mtu(connection); + was_modified |= _normalize_infiniband(connection); was_modified |= _normalize_bond_mode(connection); was_modified |= _normalize_bond_options(connection); was_modified |= _normalize_wireless_mac_address_randomization(connection); diff --git a/src/libnm-core-impl/nm-setting-bond-port.c b/src/libnm-core-impl/nm-setting-bond-port.c index 7ea82a76..16512a6a 100644 --- a/src/libnm-core-impl/nm-setting-bond-port.c +++ b/src/libnm-core-impl/nm-setting-bond-port.c @@ -22,9 +22,10 @@ /*****************************************************************************/ -NM_GOBJECT_PROPERTIES_DEFINE(NMSettingBondPort, PROP_QUEUE_ID, ); +NM_GOBJECT_PROPERTIES_DEFINE(NMSettingBondPort, PROP_QUEUE_ID, PROP_PRIO, ); typedef struct { + gint32 prio; guint32 queue_id; } NMSettingBondPortPrivate; @@ -65,6 +66,22 @@ nm_setting_bond_port_get_queue_id(NMSettingBondPort *setting) return NM_SETTING_BOND_PORT_GET_PRIVATE(setting)->queue_id; } +/** + * nm_setting_bond_port_get_prio: + * @setting: the #NMSettingBondPort + * + * Returns: the #NMSettingBondPort:prio property of the setting + * + * Since: 1.44, 1.42.8 + **/ +gint32 +nm_setting_bond_port_get_prio(NMSettingBondPort *setting) +{ + g_return_val_if_fail(NM_IS_SETTING_BOND_PORT(setting), 0); + + return NM_SETTING_BOND_PORT_GET_PRIVATE(setting)->prio; +} + /*****************************************************************************/ static gboolean @@ -148,7 +165,7 @@ nm_setting_bond_port_class_init(NMSettingBondPortClass *klass) **/ /* ---ifcfg-rh--- * property: queue-id - * variable: BONDING_OPTS: queue-id= + * variable: BOND_PORT_QUEUE_ID(+) * values: 0 - 65535 * default: 0 * description: Queue ID. @@ -165,6 +182,35 @@ nm_setting_bond_port_class_init(NMSettingBondPortClass *klass) NMSettingBondPort, _priv.queue_id); + /** + * NMSettingBondPort:prio: + * + * The port priority for bond active port re-selection during failover. A + * higher number means a higher priority in selection. The primary port has + * the highest priority. This option is only compatible with active-backup, + * balance-tlb and balance-alb modes. + * + * Since: 1.44, 1.42.8 + **/ + /* ---ifcfg-rh--- + * property: prio + * variable: BOND_PORT_PRIO(+) + * values: -2147483648 - 2147483647 + * default: 0 + * description: Port priority. + * ---end--- + */ + _nm_setting_property_define_direct_int32(properties_override, + obj_properties, + NM_SETTING_BOND_PORT_PRIO, + PROP_PRIO, + G_MININT32, + G_MAXINT32, + NM_BOND_PORT_PRIO_DEF, + NM_SETTING_PARAM_INFERRABLE, + NMSettingBondPort, + _priv.prio); + g_object_class_install_properties(object_class, _PROPERTY_ENUMS_LAST, obj_properties); _nm_setting_class_commit(setting_class, diff --git a/src/libnm-core-impl/nm-setting-infiniband.c b/src/libnm-core-impl/nm-setting-infiniband.c index 410f1f06..a3bda692 100644 --- a/src/libnm-core-impl/nm-setting-infiniband.c +++ b/src/libnm-core-impl/nm-setting-infiniband.c @@ -10,6 +10,7 @@ #include <stdlib.h> #include <linux/if_infiniband.h> +#include "libnm-platform/nmp-base.h" #include "nm-utils.h" #include "nm-utils-private.h" #include "nm-setting-private.h" @@ -144,6 +145,17 @@ nm_setting_infiniband_get_parent(NMSettingInfiniband *setting) return NM_SETTING_INFINIBAND_GET_PRIVATE(setting)->parent; } +char * +nm_setting_infiniband_create_virtual_interface_name(const char *parent, int p_key) +{ + char *s; + + s = g_strdup_printf("%s.%04x", parent, (guint) p_key); + if (strlen(s) >= NMP_IFNAMSIZ) + s[NMP_IFNAMSIZ - 1] = '\0'; + return s; +} + /** * nm_setting_infiniband_get_virtual_interface_name: * @setting: the #NMSettingInfiniband @@ -172,7 +184,8 @@ nm_setting_infiniband_get_virtual_interface_name(NMSettingInfiniband *setting) priv->virtual_iface_name_p_key = priv->p_key; priv->virtual_iface_name_parent_length = len; g_free(priv->virtual_iface_name); - priv->virtual_iface_name = g_strdup_printf("%s.%04x", priv->parent, priv->p_key); + priv->virtual_iface_name = + nm_setting_infiniband_create_virtual_interface_name(priv->parent, priv->p_key); } return priv->virtual_iface_name; @@ -181,8 +194,8 @@ nm_setting_infiniband_get_virtual_interface_name(NMSettingInfiniband *setting) static gboolean verify(NMSetting *setting, NMConnection *connection, GError **error) { - NMSettingConnection *s_con = NULL; - NMSettingInfinibandPrivate *priv = NM_SETTING_INFINIBAND_GET_PRIVATE(setting); + NMSettingConnection *s_con; + NMSettingInfinibandPrivate *priv = NM_SETTING_INFINIBAND_GET_PRIVATE(setting); if (priv->mac_address && !nm_utils_hwaddr_valid(priv->mac_address, INFINIBAND_ALEN)) { g_set_error_literal(error, @@ -251,8 +264,10 @@ verify(NMSetting *setting, NMConnection *connection, GError **error) } } - if (connection) - s_con = nm_connection_get_setting_connection(connection); + /* *** errors above here should be always fatal, below NORMALIZABLE_ERROR *** */ + + s_con = connection ? nm_connection_get_setting_connection(connection) : NULL; + if (s_con) { const char *interface_name = nm_setting_connection_get_interface_name(s_con); @@ -287,13 +302,11 @@ verify(NMSetting *setting, NMConnection *connection, GError **error) "%s.%s: ", NM_SETTING_CONNECTION_SETTING_NAME, NM_SETTING_CONNECTION_INTERFACE_NAME); - return FALSE; + return NM_SETTING_VERIFY_NORMALIZABLE_ERROR; } } } - /* *** errors above here should be always fatal, below NORMALIZABLE_ERROR *** */ - if (priv->mtu > NM_INFINIBAND_MAX_MTU) { /* Traditionally, MTU for "datagram" mode was limited to 2044 * and for "connected" mode it was 65520. @@ -448,18 +461,31 @@ nm_setting_infiniband_class_init(NMSettingInfinibandClass *klass) /** * NMSettingInfiniband:p-key: * - * The InfiniBand P_Key to use for this device. A value of -1 means to use - * the default P_Key (aka "the P_Key at index 0"). Otherwise, it is a 16-bit - * unsigned integer, whose high bit is set if it is a "full membership" - * P_Key. + * The InfiniBand p-key to use for this device. A value of -1 means to use + * the default p-key (aka "the p-key at index 0"). Otherwise, it is a + * 16-bit unsigned integer, whose high bit 0x8000 is set if it is a "full + * membership" p-key. The values 0 and 0x8000 are not allowed. + * + * With the p-key set, the interface name is always "$parent.$p_key". + * Setting "connection.interface-name" to another name is not supported. + * + * Note that kernel will internally always set the full membership bit, + * although the interface name does not reflect that. Usually the user + * would want to configure a full membership p-key with 0x8000 flag set. **/ /* ---ifcfg-rh--- * property: p-key - * variable: PKEY_ID (and PKEY=yes) + * variable: PKEY_ID or PKEY_ID_NM(*) (requires PKEY=yes) * default: PKEY=no * description: InfiniBand P_Key. The value can be a hex number prefixed with "0x" * or a decimal number. - * When PKEY_ID is specified, PHYSDEV and DEVICE also must be specified. + * When PKEY_ID is specified, PHYSDEV must be specified. + * Note that ifcfg-rh format will always automatically set the full membership + * flag 0x8000 for the PKEY_ID variable. To express IDs without the full membership + * flag, use PKEY_ID_NM. Note that kernel internally treats the interface as + * having the full membership flag set, this mainly affects the interface name. + * For the ifcfg file to be supported by initscripts' ifup-ib, the DEVICE= + * must always be set. NetworkManager does not require that. * example: PKEY=yes PKEY_ID=2 PHYSDEV=mlx4_ib0 DEVICE=mlx4_ib0.8002 * ---end--- */ diff --git a/src/libnm-core-impl/tests/test-general.c b/src/libnm-core-impl/tests/test-general.c index 8a98265a..87f7b042 100644 --- a/src/libnm-core-impl/tests/test-general.c +++ b/src/libnm-core-impl/tests/test-general.c @@ -6156,16 +6156,17 @@ test_connection_normalize_slave_type_2(void) } static void -test_connection_normalize_infiniband_mtu(void) +test_connection_normalize_infiniband(void) { gs_unref_object NMConnection *con = NULL; NMSettingInfiniband *s_infini; + NMSettingConnection *s_con; guint mtu_regular = nmtst_rand_select(2044, 2045, 65520); - con = nmtst_create_minimal_connection("test_connection_normalize_infiniband_mtu", + con = nmtst_create_minimal_connection("test_connection_normalize_infiniband", NULL, NM_SETTING_INFINIBAND_SETTING_NAME, - NULL); + &s_con); s_infini = nm_connection_get_setting_infiniband(con); g_object_set(s_infini, NM_SETTING_INFINIBAND_TRANSPORT_MODE, "connected", NULL); @@ -6213,6 +6214,57 @@ test_connection_normalize_infiniband_mtu(void) NM_CONNECTION_ERROR_INVALID_PROPERTY); nmtst_connection_normalize(con); g_assert_cmpint(65520, ==, nm_setting_infiniband_get_mtu(s_infini)); + + g_object_set(s_infini, + NM_SETTING_INFINIBAND_PARENT, + "foo", + NM_SETTING_INFINIBAND_P_KEY, + 0x005c, + NULL); + nmtst_assert_connection_verifies_without_normalization(con); + + g_object_set(s_con, NM_SETTING_CONNECTION_INTERFACE_NAME, "foo.005c", NULL); + nmtst_assert_connection_verifies_without_normalization(con); + + g_object_set(s_con, NM_SETTING_CONNECTION_INTERFACE_NAME, "foo", NULL); + nmtst_assert_connection_verifies_after_normalization(con, + NM_CONNECTION_ERROR, + NM_CONNECTION_ERROR_INVALID_PROPERTY); + + nmtst_connection_normalize(con); + g_assert_cmpstr(nm_connection_get_interface_name(con), ==, "foo.005c"); + + g_object_set(s_infini, + NM_SETTING_INFINIBAND_PARENT, + "x234567890123", + NM_SETTING_INFINIBAND_P_KEY, + 0x005c, + NULL); + nmtst_assert_connection_verifies_after_normalization(con, + NM_CONNECTION_ERROR, + NM_CONNECTION_ERROR_INVALID_PROPERTY); + + nmtst_connection_normalize(con); + g_assert_cmpstr(nm_connection_get_interface_name(con), ==, "x234567890123.0"); + +#define iface_name(parent, p_key, expected) \ + G_STMT_START \ + { \ + gs_free char *_s = nm_setting_infiniband_create_virtual_interface_name((parent), (p_key)); \ + \ + g_assert(nm_utils_ifname_valid_kernel(_s, NULL)); \ + g_assert_cmpstr(_s, ==, (expected)); \ + } \ + G_STMT_END + + iface_name("foo", 15, "foo.000f"); + iface_name("x23456789012345", 15, "x23456789012345"); + iface_name("x2345678901234", 15, "x2345678901234."); + iface_name("x234567890123", 15, "x234567890123.0"); + iface_name("x23456789012", 15, "x23456789012.00"); + iface_name("x2345678901", 15, "x2345678901.000"); + iface_name("x234567890", 15, "x234567890.000f"); + iface_name("x23456789", 15, "x23456789.000f"); } static void @@ -11511,8 +11563,8 @@ main(int argc, char **argv) test_connection_normalize_slave_type_1); g_test_add_func("/core/general/test_connection_normalize_slave_type_2", test_connection_normalize_slave_type_2); - g_test_add_func("/core/general/test_connection_normalize_infiniband_mtu", - test_connection_normalize_infiniband_mtu); + g_test_add_func("/core/general/test_connection_normalize_infiniband", + test_connection_normalize_infiniband); g_test_add_func("/core/general/test_connection_normalize_gateway_never_default", test_connection_normalize_gateway_never_default); g_test_add_func("/core/general/test_connection_normalize_may_fail", diff --git a/src/libnm-core-intern/nm-core-internal.h b/src/libnm-core-intern/nm-core-internal.h index 9e9d55aa..ce27e8e0 100644 --- a/src/libnm-core-intern/nm-core-internal.h +++ b/src/libnm-core-intern/nm-core-internal.h @@ -322,6 +322,8 @@ typedef gpointer (*NMUtilsCopyFunc)(gpointer); const char ** _nm_ip_address_get_attribute_names(const NMIPAddress *addr, gboolean sorted, guint *out_length); +char *nm_setting_infiniband_create_virtual_interface_name(const char *parent, int p_key); + #define NM_SETTING_WIRED_S390_OPTION_MAX_LEN 200u void _nm_setting_wired_clear_s390_options(NMSettingWired *setting); diff --git a/src/libnm-core-public/nm-setting-bond-port.h b/src/libnm-core-public/nm-setting-bond-port.h index 0b20e4a8..29b0beb0 100644 --- a/src/libnm-core-public/nm-setting-bond-port.h +++ b/src/libnm-core-public/nm-setting-bond-port.h @@ -29,6 +29,7 @@ G_BEGIN_DECLS #define NM_SETTING_BOND_PORT_SETTING_NAME "bond-port" #define NM_SETTING_BOND_PORT_QUEUE_ID "queue-id" +#define NM_SETTING_BOND_PORT_PRIO "prio" typedef struct _NMSettingBondPortClass NMSettingBondPortClass; @@ -41,6 +42,9 @@ NMSetting *nm_setting_bond_port_new(void); NM_AVAILABLE_IN_1_34 guint32 nm_setting_bond_port_get_queue_id(NMSettingBondPort *setting); +NM_AVAILABLE_IN_1_42_8 +gint32 nm_setting_bond_port_get_prio(NMSettingBondPort *setting); + G_END_DECLS #endif /* __NM_SETTING_BOND_PORT_H__ */ diff --git a/src/libnm-core-public/nm-version-macros.h b/src/libnm-core-public/nm-version-macros.h index 80e7f251..40c89169 100644 --- a/src/libnm-core-public/nm-version-macros.h +++ b/src/libnm-core-public/nm-version-macros.h @@ -30,7 +30,7 @@ * Evaluates to the micro version number of NetworkManager which this source * compiled against. */ -#define NM_MICRO_VERSION (6) +#define NM_MICRO_VERSION (8) /** * NM_CHECK_VERSION: @@ -73,6 +73,7 @@ #define NM_VERSION_1_40 (NM_ENCODE_VERSION(1, 40, 0)) #define NM_VERSION_1_42 (NM_ENCODE_VERSION(1, 42, 0)) #define NM_VERSION_1_42_2 (NM_ENCODE_VERSION(1, 42, 2)) +#define NM_VERSION_1_42_8 (NM_ENCODE_VERSION(1, 42, 8)) /* For releases, NM_API_VERSION is equal to NM_VERSION. * diff --git a/src/libnm-core-public/nm-version-macros.h.in b/src/libnm-core-public/nm-version-macros.h.in index 5cdba608..711b9e19 100644 --- a/src/libnm-core-public/nm-version-macros.h.in +++ b/src/libnm-core-public/nm-version-macros.h.in @@ -73,6 +73,7 @@ #define NM_VERSION_1_40 (NM_ENCODE_VERSION(1, 40, 0)) #define NM_VERSION_1_42 (NM_ENCODE_VERSION(1, 42, 0)) #define NM_VERSION_1_42_2 (NM_ENCODE_VERSION(1, 42, 2)) +#define NM_VERSION_1_42_8 (NM_ENCODE_VERSION(1, 42, 8)) /* For releases, NM_API_VERSION is equal to NM_VERSION. * diff --git a/src/libnm-core-public/nm-version.h b/src/libnm-core-public/nm-version.h index 249084ae..b963671c 100644 --- a/src/libnm-core-public/nm-version.h +++ b/src/libnm-core-public/nm-version.h @@ -361,6 +361,12 @@ #define NM_AVAILABLE_IN_1_42_2 #endif +#if NM_VERSION_MAX_ALLOWED < NM_VERSION_1_42_8 +#define NM_AVAILABLE_IN_1_42_8 G_UNAVAILABLE(1, 42.8) +#else +#define NM_AVAILABLE_IN_1_42_8 +#endif + /* * Synchronous API for calling D-Bus in libnm is deprecated. See * https://networkmanager.dev/docs/libnm/latest/usage.html#sync-api diff --git a/src/libnm-glib-aux/nm-shared-utils.h b/src/libnm-glib-aux/nm-shared-utils.h index 083ed137..d2e30504 100644 --- a/src/libnm-glib-aux/nm-shared-utils.h +++ b/src/libnm-glib-aux/nm-shared-utils.h @@ -93,6 +93,14 @@ G_STATIC_ASSERT(sizeof(int) == sizeof(gint32)); /*****************************************************************************/ +typedef enum _nm_packed { + /* No type, empty value */ + NM_PORT_KIND_NONE, + NM_PORT_KIND_BOND, +} NMPortKind; + +/*****************************************************************************/ + typedef enum { /* No type, used as error value */ diff --git a/src/libnm-platform/nm-linux-platform.c b/src/libnm-platform/nm-linux-platform.c index 049095b2..484087b9 100644 --- a/src/libnm-platform/nm-linux-platform.c +++ b/src/libnm-platform/nm-linux-platform.c @@ -177,6 +177,8 @@ G_STATIC_ASSERT(RTA_MAX == (__RTA_MAX - 1)); /*****************************************************************************/ +#define IFLA_BOND_SLAVE_PRIO 9 + #define IFLA_BOND_PEER_NOTIF_DELAY 28 #undef IFLA_BOND_MAX @@ -3347,9 +3349,11 @@ _new_from_nl_link(NMPlatform *platform, if (tb[IFLA_LINKINFO]) { static const struct nla_policy policy_link_info[] = { - [IFLA_INFO_KIND] = {.type = NLA_STRING}, - [IFLA_INFO_DATA] = {.type = NLA_NESTED}, - [IFLA_INFO_XSTATS] = {.type = NLA_NESTED}, + [IFLA_INFO_KIND] = {.type = NLA_STRING}, + [IFLA_INFO_DATA] = {.type = NLA_NESTED}, + [IFLA_INFO_XSTATS] = {.type = NLA_NESTED}, + [IFLA_INFO_SLAVE_KIND] = {.type = NLA_STRING}, + [IFLA_INFO_SLAVE_DATA] = {.type = NLA_NESTED}, }; struct nlattr *li[G_N_ELEMENTS(policy_link_info)]; @@ -3360,6 +3364,49 @@ _new_from_nl_link(NMPlatform *platform, nl_info_kind = nla_get_string(li[IFLA_INFO_KIND]); nl_info_data = li[IFLA_INFO_DATA]; + + if (li[IFLA_INFO_SLAVE_KIND]) { + const char *s = nla_get_string(li[IFLA_INFO_SLAVE_KIND]); + + if (nm_streq(s, "bond")) + obj->link.port_kind = NM_PORT_KIND_BOND; + } + + if (li[IFLA_INFO_SLAVE_DATA]) { + static const struct nla_policy policy_bond_port[] = { + [IFLA_BOND_SLAVE_QUEUE_ID] = {.type = NLA_U16}, + [IFLA_BOND_SLAVE_PRIO] = {.type = NLA_S32}, + }; + struct nlattr *bp[G_N_ELEMENTS(policy_bond_port)]; + + switch (obj->link.port_kind) { + case NM_PORT_KIND_BOND: + if (nla_parse_nested_arr(bp, li[IFLA_INFO_SLAVE_DATA], policy_bond_port) < 0) + return NULL; + + if (bp[IFLA_BOND_SLAVE_QUEUE_ID]) + obj->link.port_data.bond.queue_id = nla_get_u16(bp[IFLA_BOND_SLAVE_QUEUE_ID]); + + if (bp[IFLA_BOND_SLAVE_PRIO]) { + obj->link.port_data.bond.prio = nla_get_s32(bp[IFLA_BOND_SLAVE_PRIO]); + obj->link.port_data.bond.prio_has = TRUE; + if (!_nm_platform_kernel_support_detected( + NM_PLATFORM_KERNEL_SUPPORT_TYPE_IFLA_BOND_SLAVE_PRIO)) { + /* support for IFLA_BOND_SLAVE_PRIO was added in 0a2ff7cc8ad48a86939a91bd3457f38e59e741a1, + * kernel 6.0, 2 October 2022. + * + * We can only detect support if the attribute is present. A missing attribute + * is not conclusive. */ + _nm_platform_kernel_support_init( + NM_PLATFORM_KERNEL_SUPPORT_TYPE_IFLA_BOND_SLAVE_PRIO, + 1); + } + } + break; + case NM_PORT_KIND_NONE: + break; + } + } } if (tb[IFLA_STATS64]) { @@ -8277,7 +8324,7 @@ out: } static int -link_change(NMPlatform *platform, NMLinkType type, int ifindex, gconstpointer extra_data) +link_change_extra(NMPlatform *platform, NMLinkType type, int ifindex, gconstpointer extra_data) { nm_auto_nlmsg struct nl_msg *nlmsg = NULL; @@ -8355,6 +8402,51 @@ link_delete(NMPlatform *platform, int ifindex) } static gboolean +link_change(NMPlatform *platform, + int ifindex, + NMPortKind port_kind, + const NMPlatformLinkPortData *port_data) +{ + nm_auto_nlmsg struct nl_msg *nlmsg = NULL; + struct nlattr *nl_info; + struct nlattr *nl_port_data; + + nlmsg = _nl_msg_new_link(RTM_NEWLINK, 0, ifindex, NULL); + if (!nlmsg) + return FALSE; + + switch (port_kind) { + case NM_PORT_KIND_BOND: + + nm_assert(port_data); + + if (!(nl_info = nla_nest_start(nlmsg, IFLA_LINKINFO))) + goto nla_put_failure; + + nm_assert(nm_streq0("bond", nm_link_type_to_rtnl_type_string(NM_LINK_TYPE_BOND))); + NLA_PUT_STRING(nlmsg, IFLA_INFO_SLAVE_KIND, "bond"); + + if (!(nl_port_data = nla_nest_start(nlmsg, IFLA_INFO_SLAVE_DATA))) + goto nla_put_failure; + + NLA_PUT_U16(nlmsg, IFLA_BOND_SLAVE_QUEUE_ID, port_data->bond.queue_id); + + if (port_data->bond.prio_has) + NLA_PUT_S32(nlmsg, IFLA_BOND_SLAVE_PRIO, port_data->bond.prio); + + nla_nest_end(nlmsg, nl_port_data); + nla_nest_end(nlmsg, nl_info); + break; + case NM_PORT_KIND_NONE: + break; + } + + return do_change_link(platform, CHANGE_LINK_TYPE_UNSPEC, ifindex, nlmsg, NULL) == 0; +nla_put_failure: + g_return_val_if_reached(FALSE); +} + +static gboolean link_refresh(NMPlatform *platform, int ifindex) { do_request_link(platform, ifindex, NULL); @@ -11121,9 +11213,11 @@ nm_linux_platform_class_init(NMLinuxPlatformClass *klass) platform_class->sysctl_set_async = sysctl_set_async; platform_class->sysctl_get = sysctl_get; - platform_class->link_add = link_add; + platform_class->link_add = link_add; + platform_class->link_change_extra = link_change_extra; + platform_class->link_delete = link_delete; + platform_class->link_change = link_change; - platform_class->link_delete = link_delete; platform_class->link_refresh = link_refresh; diff --git a/src/libnm-platform/nm-platform.c b/src/libnm-platform/nm-platform.c index dc643ed2..1c495d60 100644 --- a/src/libnm-platform/nm-platform.c +++ b/src/libnm-platform/nm-platform.c @@ -62,6 +62,41 @@ G_STATIC_ASSERT(sizeof(((NMPlatformLink *) NULL)->l_perm_address.data) == _NM_UT G_STATIC_ASSERT(sizeof(((NMPlatformLink *) NULL)->l_broadcast.data) == _NM_UTILS_HWADDR_LEN_MAX); static const char * +_nmp_link_port_data_to_string(NMPortKind port_kind, + const NMPlatformLinkPortData *port_data, + char *sbuf, + gsize sbuf_len) +{ + const char *sbuf0 = sbuf; + char s0[120]; + + nm_assert(port_data); + + switch (port_kind) { + case NM_PORT_KIND_NONE: + nm_strbuf_append_c(&sbuf, &sbuf_len, '\0'); + goto out; + case NM_PORT_KIND_BOND: + nm_strbuf_append(&sbuf, + &sbuf_len, + "port bond queue-id %u%s", + port_data->bond.queue_id, + port_data->bond.prio_has || port_data->bond.prio != 0 + ? nm_sprintf_buf(s0, + " prio%s %u", + port_data->bond.prio_has ? "" : "?", + port_data->bond.prio) + : ""); + goto out; + } + + nm_strbuf_append(&sbuf, &sbuf_len, "invalid-port-type %d", (int) port_kind); + +out: + return sbuf0; +} + +static const char * _nmp_link_address_to_string(const NMPLinkAddress *addr, char buf[static(_NM_UTILS_HWADDR_LEN_MAX * 3)]) { @@ -1406,7 +1441,10 @@ nm_platform_link_add(NMPlatform *self, } int -nm_platform_link_change(NMPlatform *self, NMLinkType type, int ifindex, gconstpointer extra_data) +nm_platform_link_change_extra(NMPlatform *self, + NMLinkType type, + int ifindex, + gconstpointer extra_data) { char buf[512]; const char *name = nm_platform_link_get_name(self, ifindex); @@ -1447,7 +1485,7 @@ nm_platform_link_change(NMPlatform *self, NMLinkType type, int ifindex, gconstpo buf; })); - return klass->link_change(self, type, ifindex, extra_data); + return klass->link_change_extra(self, type, ifindex, extra_data); } /** @@ -2107,6 +2145,43 @@ nm_platform_link_set_name(NMPlatform *self, int ifindex, const char *name) return klass->link_set_name(self, ifindex, name); } +gboolean +nm_platform_link_change(NMPlatform *self, int ifindex, NMPlatformLinkBondPort *bond_port) +{ + char sbuf_prio[100]; + + _CHECK_SELF(self, klass, FALSE); + + g_return_val_if_fail(ifindex >= 0, FALSE); + + if (_LOGD_ENABLED()) { + nm_auto_free_gstring GString *str = g_string_new(""); + + if (bond_port) { + nm_assert(bond_port->prio_has || bond_port->prio == 0); + g_string_append_printf(str, + "bond-port queue-id %d %s", + bond_port->queue_id, + bond_port->prio_has || bond_port->prio != 0 + ? nm_sprintf_buf(sbuf_prio, + "prio%s %" G_GINT32_FORMAT, + !bond_port->prio_has ? "?" : "", + bond_port->prio) + : ""); + } + + if (str->len > 0 && str->str[str->len - 1] == ' ') + g_string_truncate(str, str->len - 1); + + _LOG3D("link: change: %s", str->str); + } + + return klass->link_change(self, + ifindex, + bond_port ? NM_PORT_KIND_BOND : NM_PORT_KIND_NONE, + (const NMPlatformLinkPortData *) bond_port); +} + /** * nm_platform_link_get_physical_port_id: * @self: platform instance @@ -5893,6 +5968,7 @@ nm_platform_link_to_string(const NMPlatformLink *link, char *buf, gsize len) char *s; gsize l; char str_addrmode[30]; + char str_port_data[200]; char str_address[_NM_UTILS_HWADDR_LEN_MAX * 3]; char str_perm_address[_NM_UTILS_HWADDR_LEN_MAX * 3]; char str_broadcast[_NM_UTILS_HWADDR_LEN_MAX * 3]; @@ -5936,6 +6012,11 @@ nm_platform_link_to_string(const NMPlatformLink *link, char *buf, gsize len) _nmp_link_address_to_string(&link->l_perm_address, str_perm_address); _nmp_link_address_to_string(&link->l_broadcast, str_broadcast); + _nmp_link_port_data_to_string(link->port_kind, + &link->port_data, + str_port_data, + sizeof(str_port_data)); + str_link_type = nm_link_type_to_string(link->type); g_snprintf( @@ -5957,6 +6038,7 @@ nm_platform_link_to_string(const NMPlatformLink *link, char *buf, gsize len) "%s%s" /* l_broadcast */ "%s%s" /* inet6_token */ "%s%s" /* driver */ + "%s%s" /* port_data */ " rx:%" G_GUINT64_FORMAT ",%" G_GUINT64_FORMAT " tx:%" G_GUINT64_FORMAT ",%" G_GUINT64_FORMAT, link->ifindex, @@ -5989,6 +6071,7 @@ nm_platform_link_to_string(const NMPlatformLink *link, char *buf, gsize len) : "", link->driver ? " driver " : "", link->driver ?: "", + NM_PRINT_FMT_QUOTED2(str_port_data[0] != '\0', " ", str_port_data, ""), link->rx_packets, link->rx_bytes, link->tx_packets, @@ -7821,6 +7904,7 @@ nm_platform_link_hash_update(const NMPlatformLink *obj, NMHashState *h) obj->arptype, obj->inet6_addr_gen_mode_inv, obj->inet6_token, + obj->port_kind, obj->rx_packets, obj->rx_bytes, obj->tx_packets, @@ -7839,6 +7923,20 @@ nm_platform_link_hash_update(const NMPlatformLink *obj, NMHashState *h) nm_hash_update_mem(h, obj->l_broadcast.data, NM_MIN(obj->l_broadcast.len, sizeof(obj->l_broadcast.data))); + + switch (obj->port_kind) { + case NM_PORT_KIND_NONE: + break; + case NM_PORT_KIND_BOND: + nm_platform_link_bond_port_hash_update(&obj->port_data.bond, h); + break; + } +} + +void +nm_platform_link_bond_port_hash_update(const NMPlatformLinkBondPort *obj, NMHashState *h) +{ + nm_hash_update_vals(h, obj->prio, obj->queue_id, NM_HASH_COMBINE_BOOLS(guint8, obj->prio_has)); } int @@ -7868,6 +7966,14 @@ nm_platform_link_cmp(const NMPlatformLink *a, const NMPlatformLink *b) if (a->l_broadcast.len) NM_CMP_FIELD_MEMCMP_LEN(a, b, l_broadcast.data, a->l_broadcast.len); NM_CMP_FIELD_MEMCMP(a, b, inet6_token); + NM_CMP_FIELD(a, b, port_kind); + switch (a->port_kind) { + case NM_PORT_KIND_NONE: + break; + case NM_PORT_KIND_BOND: + NM_CMP_RETURN(nm_platform_link_bond_port_cmp(&a->port_data.bond, &b->port_data.bond)); + break; + } NM_CMP_FIELD(a, b, rx_packets); NM_CMP_FIELD(a, b, rx_bytes); NM_CMP_FIELD(a, b, tx_packets); @@ -7948,6 +8054,17 @@ nm_platform_lnk_bond_hash_update(const NMPlatformLnkBond *obj, NMHashState *h) } int +nm_platform_link_bond_port_cmp(const NMPlatformLinkBondPort *a, const NMPlatformLinkBondPort *b) +{ + NM_CMP_SELF(a, b); + NM_CMP_FIELD(a, b, queue_id); + NM_CMP_FIELD(a, b, prio); + NM_CMP_FIELD_BOOL(a, b, prio_has); + + return 0; +} + +int nm_platform_lnk_bond_cmp(const NMPlatformLnkBond *a, const NMPlatformLnkBond *b) { NM_CMP_SELF(a, b); diff --git a/src/libnm-platform/nm-platform.h b/src/libnm-platform/nm-platform.h index ca6cdff8..d442ad9b 100644 --- a/src/libnm-platform/nm-platform.h +++ b/src/libnm-platform/nm-platform.h @@ -154,6 +154,16 @@ struct _NMPlatformObjWithIfindex { __NMPlatformObjWithIfindex_COMMON; } _nm_alignas(NMPlatformObject); +typedef struct { + gint32 prio; + guint16 queue_id; + bool prio_has : 1; +} NMPlatformLinkBondPort; + +typedef union { + NMPlatformLinkBondPort bond; +} NMPlatformLinkPortData; + struct _NMPlatformLink { __NMPlatformObjWithIfindex_COMMON; char name[NMP_IFNAMSIZ]; @@ -204,6 +214,12 @@ struct _NMPlatformLink { guint64 tx_packets; guint64 tx_bytes; + /* an interface can only hold IFLA_INFO_SLAVE_DATA for one link type */ + NMPlatformLinkPortData port_data; + + /* IFLA_INFO_SLAVE_KIND */ + NMPortKind port_kind; + /* @connected is mostly identical to (@n_ifi_flags & IFF_UP). Except for bridge/bond masters, * where we coerce the link as disconnect if it has no slaves. */ bool connected : 1; @@ -990,6 +1006,8 @@ typedef enum { * were added at the same time. */ NM_PLATFORM_KERNEL_SUPPORT_TYPE_FRA_IP_PROTO, + NM_PLATFORM_KERNEL_SUPPORT_TYPE_IFLA_BOND_SLAVE_PRIO, + _NM_PLATFORM_KERNEL_SUPPORT_NUM, } NMPlatformKernelSupportType; @@ -1086,9 +1104,14 @@ typedef struct { guint32 mtu, gconstpointer extra_data, const NMPlatformLink **out_link); - - int (*link_change)(NMPlatform *self, NMLinkType type, int ifindex, gconstpointer extra_data); - + int (*link_change_extra)(NMPlatform *self, + NMLinkType type, + int ifindex, + gconstpointer extra_data); + gboolean (*link_change)(NMPlatform *self, + int ifindex, + NMPortKind port_kind, + const NMPlatformLinkPortData *port_data); gboolean (*link_delete)(NMPlatform *self, int ifindex); gboolean (*link_refresh)(NMPlatform *self, int ifindex); gboolean (*link_set_netns)(NMPlatform *self, int ifindex, int netns_fd); @@ -1590,8 +1613,10 @@ int nm_platform_link_add(NMPlatform *self, gconstpointer extra_data, const NMPlatformLink **out_link); -int -nm_platform_link_change(NMPlatform *self, NMLinkType type, int ifindex, gconstpointer extra_data); +int nm_platform_link_change_extra(NMPlatform *self, + NMLinkType type, + int ifindex, + gconstpointer extra_data); static inline int nm_platform_link_veth_add(NMPlatform *self, @@ -1631,13 +1656,13 @@ nm_platform_link_bridge_add(NMPlatform *self, static inline int nm_platform_link_bridge_change(NMPlatform *self, int ifindex, const NMPlatformLnkBridge *props) { - return nm_platform_link_change(self, NM_LINK_TYPE_BRIDGE, ifindex, props); + return nm_platform_link_change_extra(self, NM_LINK_TYPE_BRIDGE, ifindex, props); } static inline int nm_platform_link_bond_change(NMPlatform *self, int ifindex, const NMPlatformLnkBond *props) { - return nm_platform_link_change(self, NM_LINK_TYPE_BOND, ifindex, props); + return nm_platform_link_change_extra(self, NM_LINK_TYPE_BOND, ifindex, props); } static inline int @@ -1914,6 +1939,8 @@ nm_platform_link_change_flags(NMPlatform *self, int ifindex, unsigned value, gbo return nm_platform_link_change_flags_full(self, ifindex, value, set ? value : 0u); } +gboolean nm_platform_link_change(NMPlatform *self, int ifindex, NMPlatformLinkBondPort *bond_port); + gboolean nm_platform_link_get_udev_property(NMPlatform *self, int ifindex, const char *name, @@ -2391,6 +2418,9 @@ int nm_platform_tfilter_cmp(const NMPlatformTfilter *a, const NMPlatformTfilter int nm_platform_mptcp_addr_cmp(const NMPlatformMptcpAddr *a, const NMPlatformMptcpAddr *b); void nm_platform_link_hash_update(const NMPlatformLink *obj, NMHashState *h); +void nm_platform_link_bond_port_hash_update(const NMPlatformLinkBondPort *obj, NMHashState *h); +int nm_platform_link_bond_port_cmp(const NMPlatformLinkBondPort *a, + const NMPlatformLinkBondPort *b); void nm_platform_ip4_route_hash_update(const NMPlatformIP4Route *obj, NMPlatformIPRouteCmpType cmp_type, NMHashState *h); diff --git a/src/libnmc-setting/nm-meta-setting-desc.c b/src/libnmc-setting/nm-meta-setting-desc.c index 0f67c9bd..e9185e34 100644 --- a/src/libnmc-setting/nm-meta-setting-desc.c +++ b/src/libnmc-setting/nm-meta-setting-desc.c @@ -5235,6 +5235,12 @@ static const NMMetaPropertyInfo *const property_infos_BOND_PORT[] = { .prompt = N_("Queue ID"), .property_type = &_pt_gobject_int, ), + PROPERTY_INFO_WITH_DESC (NM_SETTING_BOND_PORT_PRIO, + .is_cli_option = TRUE, + .property_alias = "prio", + .prompt = N_("Port Priority"), + .property_type= &_pt_gobject_int, + ), NULL }; diff --git a/src/libnmc-setting/settings-docs.h b/src/libnmc-setting/settings-docs.h index c10ece6a..0b2f8eca 100644 --- a/src/libnmc-setting/settings-docs.h +++ b/src/libnmc-setting/settings-docs.h @@ -153,7 +153,7 @@ #define DESCRIBE_DOC_NM_SETTING_GSM_USERNAME N_("The username used to authenticate with the network, if required. Many providers do not require a username, or accept any username. But if a username is required, it is specified here.") #define DESCRIBE_DOC_NM_SETTING_INFINIBAND_MAC_ADDRESS N_("If specified, this connection will only apply to the IPoIB device whose permanent MAC address matches. This property does not change the MAC address of the device (i.e. MAC spoofing).") #define DESCRIBE_DOC_NM_SETTING_INFINIBAND_MTU N_("If non-zero, only transmit packets of the specified size or smaller, breaking larger packets up into multiple frames.") -#define DESCRIBE_DOC_NM_SETTING_INFINIBAND_P_KEY N_("The InfiniBand P_Key to use for this device. A value of -1 means to use the default P_Key (aka \"the P_Key at index 0\"). Otherwise, it is a 16-bit unsigned integer, whose high bit is set if it is a \"full membership\" P_Key.") +#define DESCRIBE_DOC_NM_SETTING_INFINIBAND_P_KEY N_("The InfiniBand p-key to use for this device. A value of -1 means to use the default p-key (aka \"the p-key at index 0\"). Otherwise, it is a 16-bit unsigned integer, whose high bit 0x8000 is set if it is a \"full membership\" p-key. The values 0 and 0x8000 are not allowed. With the p-key set, the interface name is always \"$parent.$p_key\". Setting \"connection.interface-name\" to another name is not supported. Note that kernel will internally always set the full membership bit, although the interface name does not reflect that. Usually the user would want to configure a full membership p-key with 0x8000 flag set.") #define DESCRIBE_DOC_NM_SETTING_INFINIBAND_PARENT N_("The interface name of the parent device of this device. Normally NULL, but if the \"p_key\" property is set, then you must specify the base device by setting either this property or \"mac-address\".") #define DESCRIBE_DOC_NM_SETTING_INFINIBAND_TRANSPORT_MODE N_("The IP-over-InfiniBand transport mode. Either \"datagram\" or \"connected\".") #define DESCRIBE_DOC_NM_SETTING_IP4_CONFIG_ADDRESSES N_("A list of IPv4 addresses and their prefix length. Multiple addresses can be separated by comma. For example \"192.168.1.5/24, 10.1.0.5/24\". The addresses are listed in decreasing priority, meaning the first address will be the primary address.") @@ -436,6 +436,7 @@ #define DESCRIBE_DOC_NM_SETTING_WPAN_PAGE N_("IEEE 802.15.4 channel page. A positive integer or -1, meaning \"do not set, use whatever the device is already set to\".") #define DESCRIBE_DOC_NM_SETTING_WPAN_PAN_ID N_("IEEE 802.15.4 Personal Area Network (PAN) identifier.") #define DESCRIBE_DOC_NM_SETTING_WPAN_SHORT_ADDRESS N_("Short IEEE 802.15.4 address to be used within a restricted environment.") +#define DESCRIBE_DOC_NM_SETTING_BOND_PORT_PRIO N_("The port priority for bond active port re-selection during failover. A higher number means a higher priority in selection. The primary port has the highest priority. This option is only compatible with active-backup, balance-tlb and balance-alb modes.") #define DESCRIBE_DOC_NM_SETTING_BOND_PORT_QUEUE_ID N_("The queue ID of this bond port. The maximum value of queue ID is the number of TX queues currently active in device.") #define DESCRIBE_DOC_NM_SETTING_HOSTNAME_FROM_DHCP N_("Whether the system hostname can be determined from DHCP on this connection. When set to NM_TERNARY_DEFAULT (-1), the value from global configuration is used. If the property doesn't have a value in the global configuration, NetworkManager assumes the value to be NM_TERNARY_TRUE (1).") #define DESCRIBE_DOC_NM_SETTING_HOSTNAME_FROM_DNS_LOOKUP N_("Whether the system hostname can be determined from reverse DNS lookup of addresses on this device. When set to NM_TERNARY_DEFAULT (-1), the value from global configuration is used. If the property doesn't have a value in the global configuration, NetworkManager assumes the value to be NM_TERNARY_TRUE (1).") diff --git a/src/libnmc-setting/settings-docs.h.in b/src/libnmc-setting/settings-docs.h.in index c10ece6a..0b2f8eca 100644 --- a/src/libnmc-setting/settings-docs.h.in +++ b/src/libnmc-setting/settings-docs.h.in @@ -153,7 +153,7 @@ #define DESCRIBE_DOC_NM_SETTING_GSM_USERNAME N_("The username used to authenticate with the network, if required. Many providers do not require a username, or accept any username. But if a username is required, it is specified here.") #define DESCRIBE_DOC_NM_SETTING_INFINIBAND_MAC_ADDRESS N_("If specified, this connection will only apply to the IPoIB device whose permanent MAC address matches. This property does not change the MAC address of the device (i.e. MAC spoofing).") #define DESCRIBE_DOC_NM_SETTING_INFINIBAND_MTU N_("If non-zero, only transmit packets of the specified size or smaller, breaking larger packets up into multiple frames.") -#define DESCRIBE_DOC_NM_SETTING_INFINIBAND_P_KEY N_("The InfiniBand P_Key to use for this device. A value of -1 means to use the default P_Key (aka \"the P_Key at index 0\"). Otherwise, it is a 16-bit unsigned integer, whose high bit is set if it is a \"full membership\" P_Key.") +#define DESCRIBE_DOC_NM_SETTING_INFINIBAND_P_KEY N_("The InfiniBand p-key to use for this device. A value of -1 means to use the default p-key (aka \"the p-key at index 0\"). Otherwise, it is a 16-bit unsigned integer, whose high bit 0x8000 is set if it is a \"full membership\" p-key. The values 0 and 0x8000 are not allowed. With the p-key set, the interface name is always \"$parent.$p_key\". Setting \"connection.interface-name\" to another name is not supported. Note that kernel will internally always set the full membership bit, although the interface name does not reflect that. Usually the user would want to configure a full membership p-key with 0x8000 flag set.") #define DESCRIBE_DOC_NM_SETTING_INFINIBAND_PARENT N_("The interface name of the parent device of this device. Normally NULL, but if the \"p_key\" property is set, then you must specify the base device by setting either this property or \"mac-address\".") #define DESCRIBE_DOC_NM_SETTING_INFINIBAND_TRANSPORT_MODE N_("The IP-over-InfiniBand transport mode. Either \"datagram\" or \"connected\".") #define DESCRIBE_DOC_NM_SETTING_IP4_CONFIG_ADDRESSES N_("A list of IPv4 addresses and their prefix length. Multiple addresses can be separated by comma. For example \"192.168.1.5/24, 10.1.0.5/24\". The addresses are listed in decreasing priority, meaning the first address will be the primary address.") @@ -436,6 +436,7 @@ #define DESCRIBE_DOC_NM_SETTING_WPAN_PAGE N_("IEEE 802.15.4 channel page. A positive integer or -1, meaning \"do not set, use whatever the device is already set to\".") #define DESCRIBE_DOC_NM_SETTING_WPAN_PAN_ID N_("IEEE 802.15.4 Personal Area Network (PAN) identifier.") #define DESCRIBE_DOC_NM_SETTING_WPAN_SHORT_ADDRESS N_("Short IEEE 802.15.4 address to be used within a restricted environment.") +#define DESCRIBE_DOC_NM_SETTING_BOND_PORT_PRIO N_("The port priority for bond active port re-selection during failover. A higher number means a higher priority in selection. The primary port has the highest priority. This option is only compatible with active-backup, balance-tlb and balance-alb modes.") #define DESCRIBE_DOC_NM_SETTING_BOND_PORT_QUEUE_ID N_("The queue ID of this bond port. The maximum value of queue ID is the number of TX queues currently active in device.") #define DESCRIBE_DOC_NM_SETTING_HOSTNAME_FROM_DHCP N_("Whether the system hostname can be determined from DHCP on this connection. When set to NM_TERNARY_DEFAULT (-1), the value from global configuration is used. If the property doesn't have a value in the global configuration, NetworkManager assumes the value to be NM_TERNARY_TRUE (1).") #define DESCRIBE_DOC_NM_SETTING_HOSTNAME_FROM_DNS_LOOKUP N_("Whether the system hostname can be determined from reverse DNS lookup of addresses on this device. When set to NM_TERNARY_DEFAULT (-1), the value from global configuration is used. If the property doesn't have a value in the global configuration, NetworkManager assumes the value to be NM_TERNARY_TRUE (1).") diff --git a/src/nm-cloud-setup/main.c b/src/nm-cloud-setup/main.c index d6802634..630f26ef 100644 --- a/src/nm-cloud-setup/main.c +++ b/src/nm-cloud-setup/main.c @@ -16,6 +16,12 @@ /*****************************************************************************/ typedef struct { + GCancellable *cancellable; + gboolean enabled; + gboolean signal_received; +} SigTermData; + +typedef struct { GMainLoop *main_loop; GCancellable *cancellable; NMCSProvider *provider_result; @@ -443,7 +449,7 @@ _nmc_mangle_connection(NMDevice *device, /*****************************************************************************/ static gboolean -_config_one(GCancellable *sigterm_cancellable, +_config_one(SigTermData *sigterm_data, NMClient *nmc, const NMCSProviderGetConfigResult *result, guint idx) @@ -463,7 +469,7 @@ _config_one(GCancellable *sigterm_cancellable, g_main_context_iteration(NULL, FALSE); - if (g_cancellable_is_cancelled(sigterm_cancellable)) + if (g_cancellable_is_cancelled(sigterm_data->cancellable)) return FALSE; device = nm_g_object_ref(_nmc_get_device_by_hwaddr(nmc, hwaddr)); @@ -497,7 +503,7 @@ try_again: g_clear_error(&error); applied_connection = nmcs_device_get_applied_connection(device, - sigterm_cancellable, + sigterm_data->cancellable, &applied_version_id, &error); if (!applied_connection) { @@ -558,8 +564,12 @@ try_again: maybe_no_preserved_external_ip = (nmc_client_has_version_info_v(nmc) < NM_ENCODE_VERSION(1, 41, 6)); + /* Once we start reconfiguring the system, we cannot abort in the middle. From now on, + * any SIGTERM gets ignored until we are done. */ + sigterm_data->enabled = FALSE; + if (!nmcs_device_reapply(device, - sigterm_cancellable, + NULL, applied_connection, applied_version_id, maybe_no_preserved_external_ip, @@ -590,15 +600,13 @@ try_again: } static gboolean -_config_all(GCancellable *sigterm_cancellable, - NMClient *nmc, - const NMCSProviderGetConfigResult *result) +_config_all(SigTermData *sigterm_data, NMClient *nmc, const NMCSProviderGetConfigResult *result) { gboolean any_changes = FALSE; guint i; for (i = 0; i < result->n_iface_datas; i++) { - if (_config_one(sigterm_cancellable, nmc, result, i)) + if (_config_one(sigterm_data, nmc, result, i)) any_changes = TRUE; } @@ -610,13 +618,16 @@ _config_all(GCancellable *sigterm_cancellable, static gboolean sigterm_handler(gpointer user_data) { - GCancellable *sigterm_cancellable = user_data; + SigTermData *sigterm_data = user_data; - if (!g_cancellable_is_cancelled(sigterm_cancellable)) { - _LOGD("SIGTERM received"); - g_cancellable_cancel(user_data); - } else - _LOGD("SIGTERM received (again)"); + _LOGD("SIGTERM received (%s) (%s)", + sigterm_data->signal_received ? "first time" : "again", + sigterm_data->enabled ? "cancel operation" : "ignore"); + + sigterm_data->signal_received = TRUE; + + if (sigterm_data->enabled) + g_cancellable_cancel(sigterm_data->cancellable); return G_SOURCE_CONTINUE; } @@ -631,6 +642,7 @@ main(int argc, const char *const *argv) gs_unref_object NMClient *nmc = NULL; nm_auto_free_nmcs_provider_get_config_result NMCSProviderGetConfigResult *result = NULL; gs_free_error GError *error = NULL; + SigTermData sigterm_data; _nm_logging_enabled_init(g_getenv(NMCS_ENV_VARIABLE("NM_CLOUD_SETUP_LOG"))); @@ -643,7 +655,12 @@ main(int argc, const char *const *argv) sigterm_cancellable = g_cancellable_new(); - sigterm_source = nm_g_unix_signal_add_source(SIGTERM, sigterm_handler, sigterm_cancellable); + sigterm_data = (SigTermData){ + .cancellable = sigterm_cancellable, + .enabled = TRUE, + .signal_received = FALSE, + }; + sigterm_source = nm_g_unix_signal_add_source(SIGTERM, sigterm_handler, &sigterm_data); provider = _provider_detect(sigterm_cancellable); if (!provider) @@ -674,7 +691,7 @@ main(int argc, const char *const *argv) if (!result) goto done; - if (_config_all(sigterm_cancellable, nmc, result)) + if (_config_all(&sigterm_data, nmc, result)) _LOGI("some changes were applied for provider %s", nmcs_provider_get_name(provider)); else _LOGD("no changes were applied for provider %s", nmcs_provider_get_name(provider)); diff --git a/src/nm-cloud-setup/nm-cloud-setup-utils.c b/src/nm-cloud-setup/nm-cloud-setup-utils.c index cb8e9f55..fb4883b7 100644 --- a/src/nm-cloud-setup/nm-cloud-setup-utils.c +++ b/src/nm-cloud-setup/nm-cloud-setup-utils.c @@ -833,6 +833,8 @@ nmcs_device_reapply(NMDevice *device, NMDeviceReapplyFlags reapply_flags = NM_DEVICE_REAPPLY_FLAGS_PRESERVE_EXTERNAL_IP; again: + g_clear_error(&data.error); + nm_device_reapply_async(device, connection, version_id, diff --git a/src/nm-cloud-setup/nmcs-provider-aliyun.c b/src/nm-cloud-setup/nmcs-provider-aliyun.c index 86ecd76b..7f51f431 100644 --- a/src/nm-cloud-setup/nmcs-provider-aliyun.c +++ b/src/nm-cloud-setup/nmcs-provider-aliyun.c @@ -31,11 +31,12 @@ again: * This is mainly for testing, it's not usually supposed to be configured. * Consider this private API! */ base = g_getenv(NMCS_ENV_VARIABLE("NM_CLOUD_SETUP_ALIYUN_HOST")); + base = nmcs_utils_uri_complete_interned(base) ?: ("" NM_ALIYUN_HOST); if (!g_atomic_pointer_compare_and_exchange(&base_cached, NULL, base)) goto again; } - base = nmcs_utils_uri_complete_interned(base) ?: ("" NM_ALIYUN_BASE); + return base; } diff --git a/src/nmcli/gen-metadata-nm-settings-nmcli.xml.in b/src/nmcli/gen-metadata-nm-settings-nmcli.xml.in index a3409afb..e0fa54ef 100644 --- a/src/nmcli/gen-metadata-nm-settings-nmcli.xml.in +++ b/src/nmcli/gen-metadata-nm-settings-nmcli.xml.in @@ -271,6 +271,9 @@ <property name="queue-id" alias="queue-id" description="The queue ID of this bond port. The maximum value of queue ID is the number of TX queues currently active in device." /> + <property name="prio" + alias="prio" + description="The port priority for bond active port re-selection during failover. A higher number means a higher priority in selection. The primary port has the highest priority. This option is only compatible with active-backup, balance-tlb and balance-alb modes." /> </setting> <setting name="bridge" > <property name="mac-address" @@ -611,7 +614,7 @@ description="The IP-over-InfiniBand transport mode. Either "datagram" or "connected"." /> <property name="p-key" alias="p-key" - description="The InfiniBand P_Key to use for this device. A value of -1 means to use the default P_Key (aka "the P_Key at index 0"). Otherwise, it is a 16-bit unsigned integer, whose high bit is set if it is a "full membership" P_Key." /> + description="The InfiniBand p-key to use for this device. A value of -1 means to use the default p-key (aka "the p-key at index 0"). Otherwise, it is a 16-bit unsigned integer, whose high bit 0x8000 is set if it is a "full membership" p-key. The values 0 and 0x8000 are not allowed. With the p-key set, the interface name is always "$parent.$p_key". Setting "connection.interface-name" to another name is not supported. Note that kernel will internally always set the full membership bit, although the interface name does not reflect that. Usually the user would want to configure a full membership p-key with 0x8000 flag set." /> <property name="parent" alias="parent" description="The interface name of the parent device of this device. Normally NULL, but if the "p_key" property is set, then you must specify the base device by setting either this property or "mac-address"." /> |