dispatcher: introduce new env variables for gateway address (bgo #740363)
IP4_GATEWAY VPN_IP4_GATEWAY IP6_GATEWAY VPN_IP6_GATEWAY We still put gateway into IP[46]_ADDRESS_N for backward compatibility. https://bugzilla.gnome.org/show_bug.cgi?id=740363
This commit is contained in:
@@ -123,6 +123,10 @@ construct_ip4_items (GSList *items, GVariant *ip4_config, const char *prefix)
|
|||||||
}
|
}
|
||||||
if (addresses->len)
|
if (addresses->len)
|
||||||
items = g_slist_prepend (items, g_strdup_printf ("%sIP4_NUM_ADDRESSES=%d", prefix, 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_ptr_array_unref (addresses);
|
||||||
g_free (gateway);
|
g_free (gateway);
|
||||||
g_variant_unref (val);
|
g_variant_unref (val);
|
||||||
@@ -257,6 +261,10 @@ construct_ip6_items (GSList *items, GVariant *ip6_config, const char *prefix)
|
|||||||
}
|
}
|
||||||
if (addresses->len)
|
if (addresses->len)
|
||||||
items = g_slist_prepend (items, g_strdup_printf ("%sIP6_NUM_ADDRESSES=%d", prefix, 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_ptr_array_unref (addresses);
|
||||||
g_free (gateway);
|
g_free (gateway);
|
||||||
g_variant_unref (val);
|
g_variant_unref (val);
|
||||||
|
@@ -182,7 +182,8 @@
|
|||||||
<term><varname>IP4_ADDRESS_N</varname></term>
|
<term><varname>IP4_ADDRESS_N</varname></term>
|
||||||
<listitem><para>
|
<listitem><para>
|
||||||
The IPv4 address in the format "address/prefix gateway", where N is a number
|
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.
|
||||||
</para></listitem>
|
</para></listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
@@ -191,6 +192,12 @@
|
|||||||
The variable contains the number of IPv4 addresses the script may expect.
|
The variable contains the number of IPv4 addresses the script may expect.
|
||||||
</para></listitem>
|
</para></listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
<varlistentry>
|
||||||
|
<term><varname>IP4_GATEWAY</varname></term>
|
||||||
|
<listitem><para>
|
||||||
|
The gateway IPv4 address in traditional numbers-and-dots notation.
|
||||||
|
</para></listitem>
|
||||||
|
</varlistentry>
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><varname>IP4_ROUTE_N</varname></term>
|
<term><varname>IP4_ROUTE_N</varname></term>
|
||||||
<listitem><para>
|
<listitem><para>
|
||||||
|
Reference in New Issue
Block a user