diff --git a/callouts/nm-dispatcher-utils.c b/callouts/nm-dispatcher-utils.c index ab7fda660..5b1419db1 100644 --- a/callouts/nm-dispatcher-utils.c +++ b/callouts/nm-dispatcher-utils.c @@ -123,6 +123,10 @@ construct_ip4_items (GSList *items, GVariant *ip4_config, const char *prefix) } if (addresses->len) items = g_slist_prepend (items, g_strdup_printf ("%sIP4_NUM_ADDRESSES=%d", prefix, addresses->len)); + + /* Write gateway to a separate variable, too. */ + items = g_slist_prepend (items, g_strdup_printf ("%sIP4_GATEWAY=%s", prefix, gateway)); + g_ptr_array_unref (addresses); g_free (gateway); g_variant_unref (val); @@ -257,6 +261,10 @@ construct_ip6_items (GSList *items, GVariant *ip6_config, const char *prefix) } if (addresses->len) items = g_slist_prepend (items, g_strdup_printf ("%sIP6_NUM_ADDRESSES=%d", prefix, addresses->len)); + + /* Write gateway to a separate variable, too. */ + items = g_slist_prepend (items, g_strdup_printf ("%sIP6_GATEWAY=%s", prefix, gateway)); + g_ptr_array_unref (addresses); g_free (gateway); g_variant_unref (val); diff --git a/man/NetworkManager.xml b/man/NetworkManager.xml index 229c390cd..78b52e3b5 100644 --- a/man/NetworkManager.xml +++ b/man/NetworkManager.xml @@ -182,7 +182,8 @@ IP4_ADDRESS_N The IPv4 address in the format "address/prefix gateway", where N is a number - from 0 to (# IPv4 address \- 1). + from 0 to (# IPv4 address \- 1). gateway item in this variable is deprecated, + use IP4_GATEWAY instead. @@ -191,6 +192,12 @@ The variable contains the number of IPv4 addresses the script may expect. + + IP4_GATEWAY + + The gateway IPv4 address in traditional numbers-and-dots notation. + + IP4_ROUTE_N