<varlistentry>
<term><varname>RouteTable=<replaceable>num</replaceable></varname></term>
<listitem>
- <para>The table identifier for DHCP routes (a number between 1 and 4294967295, or 0 to
- unset). The table can be retrieved using
- <command>ip route show table <replaceable>num</replaceable></command>.</para>
+ <para>The table identifier for DHCP routes. Takes one of predefined names
+ <literal>default</literal>, <literal>main</literal>, and <literal>local</literal>, and names
+ defined in <varname>RouteTable=</varname> in
+ <citerefentry><refentrytitle>networkd.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
+ or a number between 1…4294967295.</para>
<para>When used in combination with <varname>VRF=</varname>, the VRF's routing table is
used when this parameter is not specified.</para>
<varlistentry>
<term><varname>RouteTable=<replaceable>num</replaceable></varname></term>
<listitem>
- <para>The table identifier for the routes received in the Router Advertisement
- (a number between 1 and 4294967295, or 0 to unset).
- The table can be retrieved using <command>ip route show table <replaceable>num</replaceable></command>.
- </para>
+ <para>The table identifier for the routes received in the Router Advertisement. Takes one of
+ predefined names <literal>default</literal>, <literal>main</literal>, and <literal>local</literal>,
+ and names defined in <varname>RouteTable=</varname> in
+ <citerefentry><refentrytitle>networkd.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
+ or a number between 1…4294967295.</para>
+
+ <para>When used in combination with <varname>VRF=</varname>, the VRF's routing table is
+ used when this parameter is not specified.</para>
</listitem>
</varlistentry>
#include "networkd-link.h"
#include "networkd-manager.h"
#include "networkd-network.h"
+#include "networkd-route-util.h"
#include "parse-util.h"
#include "socket-util.h"
#include "string-table.h"
assert(IN_SET(ltype, AF_INET, AF_INET6));
assert(rvalue);
- r = safe_atou32(rvalue, &rt);
+ r = manager_get_route_table_from_string(network->manager, rvalue, &rt);
if (r < 0) {
log_syntax(unit, LOG_WARNING, filename, line, r,
"Failed to parse RouteTable=%s, ignoring assignment: %m", rvalue);