4 Commits
v1.2 ... v1.3

Author SHA1 Message Date
Tore Anderson
2f2a59ddf3 v1.3: new licence => new release 2015-07-23 13:40:17 +02:00
Tore Anderson
b5725c093c relicence to MIT to make lrintel happy 2015-07-23 13:38:30 +02:00
Tore Anderson
ad114b18cf Update for siit-dc ietf changes
- the siit-dc drafts have been adopted by the v6ops wg
- host agent renamed to edge relay
2015-07-23 13:29:28 +02:00
Tore Anderson
c48ad644c0 Avoid a restart loop with NM dispatcher scripts
Newer NetworkManager versions will run the dispatcher scripts when new
unknown interfaces show up, including 'clat'. That will cause a clatd
restart right after startup, and we'll never get to fully initialise. So
ensure the dispatcher script does nothing if the device in question is
our own 'clat' to prevent this.
2014-10-05 20:27:07 +02:00
4 changed files with 60 additions and 26 deletions

22
LICENCE
View File

@@ -1,5 +1,19 @@
Copyright (c) 2014 Tore Anderson <tore@fud.no> Copyright (c) 2014-2015 Tore Anderson <tore@fud.no>
As long as you retain this notice, you may use this piece of software as Permission is hereby granted, free of charge, to any person obtaining a copy of
you wish. If you like it, and we happen to meet one day, you can buy me this software and associated documentation files (the "Software"), to deal in
a beer in return. If you really like it, make it an IPA. the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View File

@@ -1,6 +1,6 @@
=head1 NAME =head1 NAME
B<clatd> - a CLAT / SIIT-DC Host Agent implementation for Linux B<clatd> - a CLAT / SIIT-DC Edge Relay implementation for Linux
=head1 DESCRIPTION =head1 DESCRIPTION
@@ -13,12 +13,12 @@ local applications on the host requires actual IPv4 connectivity or cannot
make use of DNS64 (for example because they use legacy AF_INET socket calls, make use of DNS64 (for example because they use legacy AF_INET socket calls,
or if they are simply not using DNS64). or if they are simply not using DNS64).
It may also be used to implement an SIIT-DC Host Agent as defined by B<clatd> may also be used to implement an SIIT-DC Edge Relay as described in
I<I-D.anderson-v6ops-siit-dc-2xlat>. In this scenario, the PLAT is a SIIT-DC I<I-D.ietf-v6ops-siit-dc-2xlat>. In this scenario, the PLAT is in reality a
Gateway (see I<I-D.anderson-v6ops-siit-dc>) instead of a Stateful NAT64 (see SIIT-DC Border Relay (see I<I-D.ietf-v6ops-siit-dc>) instead of a Stateful
I<RFC6146>). When used as a SIIT-DC Host Agent, you will probably want to NAT64 (see I<RFC6146>). When used as a SIIT-DC Edge Relay, you will probably
manually configure the settings I<clat-v4-addr>, I<clat-v6-addr>, and want to manually configure the settings I<clat-v4-addr>, I<clat-v6-addr>, and
I<plat-prefix> to mirror the SIIT-DC Gateway's configuration. I<plat-prefix> to mirror the SIIT-DC Border Relay's configuration.
It relies on the software package TAYGA by Nathan Lutchansky for the actual It relies on the software package TAYGA by Nathan Lutchansky for the actual
translation of packets between IPv4 and IPv6 (I<RFC 6145>) TAYGA may be translation of packets between IPv4 and IPv6 (I<RFC 6145>) TAYGA may be
@@ -132,21 +132,20 @@ will bind to this address when communicating with external IPv4 destinations.
In a standard 464XLAT environment with a stateful NAT64 serving as the PLAT, In a standard 464XLAT environment with a stateful NAT64 serving as the PLAT,
there should be no need to change the default. there should be no need to change the default.
When using B<clatd> as an SIIT-DC Host Agent (cf. When using B<clatd> as an SIIT-DC Edge Relay (I<I-D.ietf-v6ops-siit-dc-2xlat>),
I-D.draft-anderson-v6ops-siit-dc-2xlat), you will want to set this to the you will want to set this to the IPv4 Service Address configured in the SIIT-DC
IPv4 Service Address configured in the SIIT-DC Gateway. This way, local Border Relay. This way, local applications can correctly identify which public
applications can correctly identify which public address they'll be using on address they'll be using on the IPv4 internet, and will be able to provide
the IPv4 internet, and will be able to provide fully functional references to fully functional references to it in application-level payload, and so on.
it in application-level payload, and so on.
The default address is one from I<RFC 7335>. The default address is one from I<RFC 7335>.
=item B<clat-v6-addr=ipv6-address> (default: auto-generated) =item B<clat-v6-addr=ipv6-address> (default: auto-generated)
The IPv6 address of the CLAT. Traffic to/from the B<clat-v4-addr> will be The IPv6 address of the CLAT. Traffic to/from the B<clat-v4-addr> will be
translated into this address. When using B<clatd> as an SIIT-DC Host Agent, translated into this address. When using B<clatd> as an SIIT-DC Edge Relay, you
you will want to set this to the IPv6 address in the Static Address Mapping will want to set this to the same IPv6 address in the Explicit Address Mapping
configured in the SIIT-DC Gateway. configured in the SIIT-DC Border Relay.
By default, B<clatd> will attempt to figure out which network device will be By default, B<clatd> will attempt to figure out which network device will be
used for traffic towards the PLAT, see if there is any SLAAC-based globally used for traffic towards the PLAT, see if there is any SLAAC-based globally
@@ -331,11 +330,25 @@ configuration file) when reporting a bug.
=head1 LICENCE =head1 LICENCE
Copyright (c) 2014 Tore Anderson <tore@fud.no> Copyright (c) 2014-2015 Tore Anderson <tore@fud.no>
As long as you retain this notice, you may use this piece of software as Permission is hereby granted, free of charge, to any person obtaining a copy of
you wish. If you like it, and we happen to meet one day, you can buy me this software and associated documentation files (the "Software"), to deal in
a beer in return. If you really like it, make it an IPA. the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
=head1 SEE ALSO =head1 SEE ALSO
@@ -343,6 +356,6 @@ ip(8), ip6tables(8), tayga(8), tayga.conf(5)
RFC 6052, RFC 6145, RFC 6146, RFC 6877, RFC 7050, RFC 7335 RFC 6052, RFC 6145, RFC 6146, RFC 6877, RFC 7050, RFC 7335
I-D.anderson-v6ops-siit-dc, I-D.anderson-v6ops-siit-dc-2xlat I-D.ietf-v6ops-siit-dc, I-D.ietf-v6ops-siit-dc-2xlat, I-D.ietf-v6ops-siit-eam
=cut =cut

2
clatd
View File

@@ -12,7 +12,7 @@
use strict; use strict;
use Net::IP; use Net::IP;
my $VERSION = "1.2"; my $VERSION = "1.3";
# #
# Populate the global config hash with the default values # Populate the global config hash with the default values

View File

@@ -7,6 +7,13 @@
# Written by Tore Anderson <tore@fud.no> # Written by Tore Anderson <tore@fud.no>
# #
# Newer NetworkManager versions will run the dispatcher scripts once
# a new unmanaged interface shows up, including the 'clat' interface
# created by clatd/TAYGA. So if we're being called due to our own
# interface showing up, do nothing, otherwise we will end up
# committing suicide from the restarts below
[ "$DEVICE_IFACE" = "clat" ] && exit 0
# We simply restart clatd in all situations, as no matter if an interface # We simply restart clatd in all situations, as no matter if an interface
# goes up or down, it may mean that the PLAT device changes, it may mean # goes up or down, it may mean that the PLAT device changes, it may mean
# native IPv4 appearing or disappearing, or it may mean that DNS64 became # native IPv4 appearing or disappearing, or it may mean that DNS64 became