Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f564300918 |
4
Makefile
4
Makefile
@@ -7,11 +7,9 @@ DNF_OR_YUM:=$(shell which dnf || which yum)
|
||||
SYSTEMCTL:=$(shell which systemctl)
|
||||
TAYGA:=$(shell which tayga)
|
||||
|
||||
all:
|
||||
|
||||
install:
|
||||
# Install the main script
|
||||
install -D -m0755 clatd $(DESTDIR)$(PREFIX)/sbin/clatd
|
||||
install -m0755 clatd $(DESTDIR)$(PREFIX)/sbin/clatd
|
||||
# Install manual page if pod2man is installed
|
||||
pod2man --name clatd --center "clatd - a CLAT implementation for Linux" --section 8 README.pod $(DESTDIR)$(PREFIX)/share/man/man8/clatd.8 && gzip -f9 $(DESTDIR)$(PREFIX)/share/man/man8/clatd.8 || echo "pod2man is required to generate manual page"
|
||||
# Install systemd service file if applicable for this system
|
||||
|
||||
11
clatd
11
clatd
@@ -27,7 +27,7 @@ use strict;
|
||||
use IPC::Cmd qw(can_run);
|
||||
use Net::IP;
|
||||
|
||||
my $VERSION = "2.1.0";
|
||||
my $VERSION = "2.0.0";
|
||||
|
||||
#
|
||||
# Populate the global config hash with the default values
|
||||
@@ -357,8 +357,7 @@ sub get_plat_prefix_from_dns64 {
|
||||
$res->nameservers(map {
|
||||
Net::IP->new($_)->version() == 4 ? "::ffff:$_" : $_;
|
||||
} $res->nameservers);
|
||||
d2("Nameservers after Net::DNS bug workaround: ",
|
||||
join(" ", $res->nameservers));
|
||||
d2("Nameservers after Net::DNS bug workaround: ", $res->nameservers);
|
||||
|
||||
my $pkt = $res->query('ipv4only.arpa', 'AAAA');
|
||||
if(!$pkt) {
|
||||
@@ -392,7 +391,7 @@ sub get_plat_prefix_from_dns64 {
|
||||
p("No PLAT prefix could be discovered, using fallback");
|
||||
return $CFG{"plat-fallback-prefix"};
|
||||
} else {
|
||||
p("No PLAT prefix could be discovered. Your connection probably doesn't provide",
|
||||
p("No PLAT prefix could be discovered. Your ISP probably doesn't provide",
|
||||
" NAT64/DNS64 PLAT service. Exiting.");
|
||||
cleanup_and_exit(0);
|
||||
}
|
||||
@@ -1056,13 +1055,13 @@ if(cfgint("ctmark")) {
|
||||
or err("'nft -f-' failed to execute");
|
||||
print $fd "add table ip6 clatd\n";
|
||||
print $fd "add chain ip6 clatd prerouting ",
|
||||
"{ type filter hook prerouting priority mangle; }\n";
|
||||
"{ type filter hook prerouting priority 0; }\n";
|
||||
print $fd "add rule ip6 clatd prerouting",
|
||||
" iif ", cfg("clat-dev"),
|
||||
" ip6 saddr ", cfg("clat-v6-addr"),
|
||||
" ip6 daddr ", cfg("plat-prefix"),
|
||||
" ct mark set ", cfgint("ctmark"),
|
||||
# set meta mark as well, to placate firewalld's IPv6_rpfilter and NixOS' rpfilter rules
|
||||
# set meta mark as well, to placate firewalld's IPv6_rpfilter
|
||||
" meta mark set ", cfgint("ctmark"), " counter\n";
|
||||
print $fd "add rule ip6 clatd prerouting",
|
||||
" iif ", cfg("plat-dev"),
|
||||
|
||||
Reference in New Issue
Block a user