add fallback prefix

This commit is contained in:
satanist
2023-08-05 12:51:23 +02:00
committed by Tore Anderson
parent ff6aa57c4b
commit 8aa8bfa5d5
2 changed files with 7 additions and 0 deletions

View File

@@ -275,6 +275,11 @@ The IPv6 translation prefix into which the PLAT maps the IPv4 internet. See
I<RFC 6052> for a closer description. By default, this is auto-detected from I<RFC 6052> for a closer description. By default, this is auto-detected from
DNS64 answers using the method in I<RFC 7050>. DNS64 answers using the method in I<RFC 7050>.
=item B<plat-fallback-prefix> (no default)
The IPv6 translation prefix fallback. This is used if no plat-prefix is set
or auto detected.
=item B<proxynd-enable> (default: I<yes>) =item B<proxynd-enable> (default: I<yes>)
Controls whether or not B<clatd> should add a Proxy-ND entry for the CLAT IPv6 Controls whether or not B<clatd> should add a Proxy-ND entry for the CLAT IPv6

2
clatd
View File

@@ -47,6 +47,7 @@ $CFG{"forwarding-enable"} = 1; # enable ipv6 forwarding?
$CFG{"ip6tables-enable"} = undef; # allow clat<->plat traffic? $CFG{"ip6tables-enable"} = undef; # allow clat<->plat traffic?
$CFG{"plat-dev"} = undef; # PLAT-facing device, default detect $CFG{"plat-dev"} = undef; # PLAT-facing device, default detect
$CFG{"plat-prefix"} = undef; # detect using DNS64 by default $CFG{"plat-prefix"} = undef; # detect using DNS64 by default
$CFG{"plat-fallback-prefix"} = undef; # fallback prefix if no prefix is found
$CFG{"proxynd-enable"} = 1; # add proxy-nd entry for clat? $CFG{"proxynd-enable"} = 1; # add proxy-nd entry for clat?
$CFG{"tayga-conffile"} = undef; # make a temporary one by default $CFG{"tayga-conffile"} = undef; # make a temporary one by default
$CFG{"tayga-v4-addr"} = "192.0.0.2"; # from RFC 7335 $CFG{"tayga-v4-addr"} = "192.0.0.2"; # from RFC 7335
@@ -716,6 +717,7 @@ p("Starting clatd v$VERSION by Tore Anderson <tore\@fud.no>");
# Step 1: Fill in any essential blanks in the configuration by auto-detecting # Step 1: Fill in any essential blanks in the configuration by auto-detecting
# any missing values. # any missing values.
$CFG{"plat-prefix"} ||= get_plat_prefix(); $CFG{"plat-prefix"} ||= get_plat_prefix();
$CFG{"plat-prefix"} ||= $CFG{"plat-fallback-prefix"};
if(!$CFG{"plat-prefix"}) { if(!$CFG{"plat-prefix"}) {
w("No PLAT prefix was discovered or specified; 464XLAT cannot work."); w("No PLAT prefix was discovered or specified; 464XLAT cannot work.");
exit 0; exit 0;