public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/tayga] epel10: patch set for epel10, similar to requested in pr2
@ 2026-10-26 14:53 Ingvar Hagelund
  0 siblings, 0 replies; only message in thread
From: Ingvar Hagelund @ 2026-10-26 14:53 UTC (permalink / raw)
  To: git-commits

A new commit has been pushed.

Repo   : rpms/tayga
Branch : epel10
Commit : 9e62f52a44f572a613f4edd623daa7770bf1447b
Author : Ingvar Hagelund <ingvar@redpill-linpro.com>
Date   : 2026-10-26T15:51:36+01:00
Stats  : +4227/-0 in 4 file(s)
URL    : https://src.fedoraproject.org/rpms/tayga/c/9e62f52a44f572a613f4edd623daa7770bf1447b?branch=epel10

Log:
patch set for epel10, similar to requested in pr2

---
diff --git a/tayga-0.9.6_14830b60.patch b/tayga-0.9.6_14830b60.patch
new file mode 100644
index 0000000..029cb12
--- /dev/null
+++ b/tayga-0.9.6_14830b60.patch
@@ -0,0 +1,540 @@
+commit 14830b6027d8e8ceb7c671f989bee1ec8876c4e8
+Author: Andrew <apalrd@users.noreply.github.com>
+Date:   Mon Jan 26 11:08:01 2026 -0500
+
+    Big-Endian Checksum Calculation (#166)
+    
+    * Move BIT_LITTLE to the common header
+    
+    * Build taygabe as s390x for big-endian test cases
+    
+    * Big-endian test cases
+    
+    * Checksum calc fixes for big-endian
+
+diff --git a/.gitignore b/.gitignore
+index 469ca9e..dd61a3d 100644
+--- a/.gitignore
++++ b/.gitignore
+@@ -1,5 +1,6 @@
+ *.o
+ tayga
++taygabe
+ tayga.conf
+ *.tar
+ *.d
+diff --git a/Makefile b/Makefile
+index b079e3b..fb08cd2 100644
+--- a/Makefile
++++ b/Makefile
+@@ -68,6 +68,12 @@ tayga: $(SOURCES)
+ static: LDFLAGS += -static
+ static: tayga
+ 
++# Compile Tayga with big-endian s390x for big-endian checksum test cases
++# S390x was chosen as it is officially supported by Debian and is Big-Endian
++taygabe: $(SOURCES)
++	$(if test $(GIT) && git rev-parse,$(file > version.h,$(VERSION_HEADER)))
++	s390x-linux-gnu-gcc $(CFLAGS) -o taygabe $(SOURCES) $(LDFLAGS) $(LDLIBS)
++
+ # Test suite compiles with -Werror to detect compiler warnings
+ .PHONY: test
+ test: unit_conffile
+@@ -88,11 +94,15 @@ integration: tayga
+ 	$(IP) netns exec tayga-test python3 test/addressing.py
+ 	$(IP) netns exec tayga-test python3 test/mapping.py
+ 	$(IP) netns exec tayga-test python3 test/translate.py
++# Do not run big-endian tests by default
++ifdef WITH_BIG_ENDIAN
++	$(IP) netns exec tayga-test python3 test/bigendian.py
++endif
+ 	$(IP) netns del tayga-test
+ 
+ .PHONY: clean
+ clean:
+-	$(RM) tayga version.h tayga-nat64.tar tayga-clat.tar tayga.tar
++	$(RM) tayga taygabe version.h tayga-nat64.tar tayga-clat.tar tayga.tar
+ 	$(RM) unit_conffile *.gcda *.gcno
+ 
+ # Install tayga and man pages
+diff --git a/addrmap.c b/addrmap.c
+index 2537293..2125a90 100644
+--- a/addrmap.c
++++ b/addrmap.c
+@@ -18,14 +18,6 @@
+ 
+ #include "tayga.h"
+ 
+-#if __BYTE_ORDER == __BIG_ENDIAN
+-#  define BIG_LITTLE(x, y) (x)
+-#elif __BYTE_ORDER == __LITTLE_ENDIAN
+-#  define BIG_LITTLE(x, y) (y)
+-#else
+-# error Unsupported byte order
+-#endif
+-
+ /**
+  * @brief Check if an IPv4 address is valid
+  *
+diff --git a/nat64.c b/nat64.c
+index 92a9acd..9155da3 100644
+--- a/nat64.c
++++ b/nat64.c
+@@ -138,7 +138,7 @@ static uint16_t ip_checksum(void *d, uint32_t c)
+ 	}
+ 
+ 	if (c)
+-		sum += htons(*((uint8_t *)p) << 8);
++		sum += *((uint8_t *)p) << BIG_LITTLE(8,0);
+ 
+ 	while (sum > 0xffff)
+ 		sum = (sum & 0xffff) + (sum >> 16);
+@@ -313,10 +313,10 @@ static int xlate_payload_4to6(struct pkt *p, struct ip6 *ip6, int em)
+ 		cksum = ones_add(p->icmp->cksum, cksum);
+ 		if (p->icmp->type == 8) {
+ 			p->icmp->type = 128;
+-			p->icmp->cksum = ones_add(cksum, ~(128 - 8));
++			p->icmp->cksum = ones_add(cksum, ~((128 - 8)<<BIG_LITTLE(8,0)));
+ 		} else {
+ 			p->icmp->type = 129;
+-			p->icmp->cksum = ones_add(cksum, ~(129 - 0));
++			p->icmp->cksum = ones_add(cksum, ~((129 - 0)<<BIG_LITTLE(8,0)));
+ 		}
+ 		return ERROR_NONE;
+ 	/* UDP */
+@@ -908,10 +908,10 @@ static int xlate_payload_6to4(struct pkt *p, struct ip4 *ip4, int em)
+ 		cksum = ones_add(p->icmp->cksum, cksum);
+ 		if (p->icmp->type == 128) {
+ 			p->icmp->type = 8;
+-			p->icmp->cksum = ones_add(cksum, 128 - 8);
++			p->icmp->cksum = ones_add(cksum, (128 - 8)<<BIG_LITTLE(8,0));
+ 		} else {
+ 			p->icmp->type = 0;
+-			p->icmp->cksum = ones_add(cksum, 129 - 0);
++			p->icmp->cksum = ones_add(cksum, (129 - 0)<<BIG_LITTLE(8,0));
+ 		}
+ 		return ERROR_NONE;
+ 	/* UDP */
+diff --git a/tayga.h b/tayga.h
+index ff30c86..a1a78e4 100644
+--- a/tayga.h
++++ b/tayga.h
+@@ -369,6 +369,14 @@ enum {
+ 
+ /* Macros and static functions */
+ 
++#if __BYTE_ORDER == __BIG_ENDIAN
++#  define BIG_LITTLE(x, y) (x)
++#elif __BYTE_ORDER == __LITTLE_ENDIAN
++#  define BIG_LITTLE(x, y) (y)
++#else
++# error Unsupported byte order
++#endif
++
+ /* Get a pointer to the object containing x, which is of type "type" and
+  * embeds x as a field called "field" */
+ #define container_of(x, type, field) ({ \
+diff --git a/test/bigendian.py b/test/bigendian.py
+new file mode 100644
+index 0000000..93b0561
+--- /dev/null
++++ b/test/bigendian.py
+@@ -0,0 +1,398 @@
++#
++#   part of TAYGA <https://github.com/apalrd/tayga> test suite
++#   Copyright (C) 2025  Andrew Palardy <andrew@apalrd.net>
++# 
++#   test/bigendian.py
++#   Subset of RFC7915 tests for big-endian hosts
++#
++# Required packages to install for big-endian support:
++# sudo dpkg --add-architecture s390x
++# sudo apt update
++# sudo apt install gcc-s390x-linux-gnu qemu-user-static libc6:s390x
++
++from test_env import (
++    test_env,
++    test_result,
++    router,
++)
++from random import randbytes
++from scapy.all import IP, ICMP, UDP, IPv6, Raw, TCP
++from scapy.layers.inet6 import (
++    ICMPv6EchoRequest,
++    ICMPv6EchoReply,
++)
++from scapy.layers.inet import (
++    ICMPerror,
++    UDPerror
++)
++import time
++
++## Test Environment global
++test = test_env("test/bigendian")
++
++####
++#  Generic ICMPv4 Validator
++####
++expect_type = 0
++expect_code = 0
++expect_id = -1
++expect_seq = -1
++expect_mtu = -1
++expect_sa = ""
++expect_da = ""
++expect_csum = -1
++def icmp4_val(pkt):
++    res = test_result()
++    res.check("Contains IP",pkt.haslayer(IP))
++    res.check("Contains ICMP",pkt.haslayer(ICMP))
++    #Bail early so we don't get derefrence errors
++    if (not IP in pkt) or (not ICMP in pkt):
++        return res
++    #Validate packet stuff
++    res.compare("Src IP",pkt[IP].src,str(expect_sa))
++    res.compare("Dst IP",pkt[IP].dst,str(expect_da))
++    res.compare("Type",pkt[ICMP].type,expect_type)
++    res.compare("Code",pkt[ICMP].code,expect_code)
++    if expect_id >= 0:
++        res.compare("ID",pkt[ICMP].id,expect_id)
++    if expect_seq >= 0:
++        res.compare("Seq",pkt[ICMP].seq,expect_seq)
++    if expect_mtu >= 0:
++        res.compare("MTU",pkt[ICMP].nexthopmtu,expect_mtu)
++    if expect_ptr >= 0:
++        res.compare("PTR",pkt[ICMP].ptr,expect_ptr)
++    if expect_csum >= 0:
++        res.compare("Checksum",pkt[ICMP].chksum,expect_csum)
++    return res
++
++####
++#  Generic ICMPv6 Validator
++####
++expect_class = None
++expect_ptr = -1
++def icmp6_val(pkt):
++    res = test_result()
++    # layer 0 is LinuxTunInfo
++    res.check("Contains IPv6",isinstance(pkt.getlayer(1),IPv6))
++    res.compare("Expected Class",type(pkt.getlayer(2)),type(expect_class))
++    #Bail early so we don't get derefrence errors
++    if res.has_fail:
++        return res
++    #Validate packet stuff
++    res.compare("Src IP",pkt[IPv6].src,str(expect_sa))
++    res.compare("Dst IP",pkt[IPv6].dst,str(expect_da))
++    res.compare("Type",pkt.getlayer(2).type,expect_type)
++    res.compare("Code",pkt.getlayer(2).code,expect_code)
++    if expect_mtu >= 0:
++        res.compare("MTU",pkt.getlayer(2).mtu,expect_mtu)
++    if expect_ptr >= 0:
++        res.compare("PTR",pkt.getlayer(2).ptr,expect_ptr)
++    if expect_id >= 0:
++        res.compare("ID",pkt.getlayer(2).id,expect_id)
++    if expect_seq >= 0:
++        res.compare("SEQ",pkt.getlayer(2).seq,expect_seq)
++    return res
++####
++#  Generic IPv6 Validator
++####
++expect_fl = 0
++expect_frag = False
++expect_len = -1
++def ip6_val(pkt):
++    res = test_result()
++    # layer 0 is LinuxTunInfo
++    res.check("Contains IPv6",isinstance(pkt.getlayer(1),IPv6))
++    #Bail early so we don't get derefrence errors
++    if res.has_fail:
++        return res
++    #Field Comparison
++    res.compare("Src",pkt[IPv6].src,str(expect_sa))
++    res.compare("Dest",pkt[IPv6].dst,str(expect_da))
++    res.compare("Version",pkt[IPv6].version,6)
++    if expect_data is not None:
++        if expect_frag:
++            # Only compare first expect_len bytes
++            res.compare("Payload",pkt[Raw].load,expect_data[0:expect_len],print=False)
++        else:
++            res.compare("Payload",pkt[Raw].load,expect_data,print=False)
++    if expect_csum < 0:
++        pass
++    elif pkt.haslayer(TCP):
++        res.compare("Checksum TCP",pkt[TCP].chksum,expect_csum)
++    elif pkt.haslayer(UDP):
++        res.compare("Checksum UDP",pkt[UDP].chksum,expect_csum)
++    elif pkt.haslayer(ICMPv6EchoRequest):
++        res.compare("Checksum ICMPv6",pkt[ICMPv6EchoRequest].cksum,expect_csum)
++    elif pkt.haslayer(ICMPv6EchoReply):
++        res.compare("Checksum ICMPv6",pkt[ICMPv6EchoReply].cksum,expect_csum)
++    else:
++        res.expect("Checksum Non-TCP/UDP/ICMPv6",False,"Cannot check checksum on non-TCP/UDP/ICMPv6 packet")
++
++    if expect_ref is not None:
++        res.compare("TC",pkt[IPv6].tc,expect_ref.tos)
++        res.compare("FL",pkt[IPv6].fl,expect_fl)
++        if expect_frag:
++            #Length is total fragment, not including frag hdr
++            res.compare("Length",pkt[IPv6].plen,expect_len+8)
++        elif expect_len >= 0:
++            res.compare("Length",pkt[IPv6].plen,expect_len)
++        else:
++            res.compare("Length",pkt[IPv6].plen,expect_ref.len - 20)
++        if expect_frag:
++            res.compare("NH",pkt[IPv6].nh,44)
++            res.check("Contains Frag Hdr",isinstance(pkt.getlayer(2),IPv6ExtHdrFragment))
++            #Validate frag header
++            res.compare("[frag]NH",pkt[IPv6ExtHdrFragment].nh,expect_ref.proto)
++            res.compare("[frag]Offset",pkt[IPv6ExtHdrFragment].offset,0)
++            res.compare("[frag]M",pkt[IPv6ExtHdrFragment].m,1)
++            res.compare("[frag]id",pkt[IPv6ExtHdrFragment].id,expect_id)
++        else:
++            if expect_ref.proto == 1:
++                res.compare("NH",pkt[IPv6].nh,58)
++            else:
++                res.compare("NH",pkt[IPv6].nh,expect_ref.proto)
++        res.compare("HLIM",pkt[IPv6].hlim,expect_ref.ttl-3)
++    return res
++
++####
++#  Generic IPv4 Validator
++####
++expect_ref = None
++expect_da = test.public_ipv6_xlate
++def ip_val(pkt):
++    res = test_result()
++    # layer 0 is LinuxTunInfo
++    res.check("Contains IPv4",isinstance(pkt.getlayer(1),IP))
++    #Bail early so we don't get derefrence errors
++    if res.has_fail:
++        return res
++    #Field Comparison
++    res.compare("Version",pkt[IP].version,4)
++    res.compare("IHL",pkt[IP].ihl,5)
++    res.compare("TC",pkt[IP].tos,expect_ref[IPv6].tc)
++    #Expected next-header and packet lengths
++    expect_len = expect_ref[IPv6].plen+20
++    expect_nh = expect_ref[IPv6].nh
++    res.compare("Length",pkt[IP].len,expect_len)
++    res.compare("Proto",pkt[IP].proto,expect_nh)
++    #Flags are either DF or None depending on packet size
++    if expect_frag:
++        pass # Already checked these flags
++    elif expect_len > 1260:
++        res.compare("Flags",pkt[IP].flags,"DF")
++        res.compare("ID",pkt[IP].id,0)
++    else:
++        res.compare("Flags",pkt[IP].flags,0)
++        #ID is psuedo-randomly generated, but must not be zero
++        res.check("ID Nonzero",(pkt[IP].id != 0))
++    if not expect_frag:
++        res.compare("Frag",pkt[IP].frag,0)
++    res.compare("TTL",pkt[IP].ttl,expect_ref[IPv6].hlim-3) #test setup has 3 trips
++    res.compare("Src",pkt[IP].src,str(expect_sa))
++    res.compare("Dest",pkt[IP].dst,str(expect_da))
++    res.compare("Payload",pkt[Raw].load,expect_ref[Raw].load)
++    # If checksum expected, check it
++    if expect_csum < 0:
++        pass
++    elif pkt.haslayer(TCP):
++        res.compare("Checksum TCP",pkt[TCP].chksum,expect_csum)
++    elif pkt.haslayer(UDP):
++        res.compare("Checksum UDP",pkt[UDP].chksum,expect_csum)
++    else:
++        res.expect("Checksum Non-TCP/UDP/ICMP",False,"Cannot check checksum on non-TCP/UDP/ICMP packet")
++    return res
++
++
++#############################################
++# Transport-Layer Header (RFC 7915 4.5)
++#############################################
++def sec_4_5():
++    global test
++    global expect_sa
++    global expect_da
++    global expect_data
++    global expect_ref
++    global expect_len
++    global expect_frag
++    global expect_id
++    global expect_csum
++    # Setup config for this section
++    test.tayga_conf.default()
++    test.tayga_conf.udp_cksum_mode = "drop"
++    test.reload()
++
++    # TCP Header
++    # Using well-known TCP packet payloads and manually calculated checksums
++    expect_data = bytes([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15])
++    expect_sa = test.public_ipv4_xlate
++    expect_da = test.public_ipv6
++    expect_len = 20+16
++    expect_ref = IP(dst=str(test.public_ipv6_xlate),src=str(test.public_ipv4)) \
++        / TCP(sport=666,dport=667,flags="S",seq=420) \
++        / Raw(expect_data)
++    expect_csum = 48368 #manually calculated
++    test.send_and_check(expect_ref,ip6_val, "TCP Header")
++
++    # UDP Header w/ checksum
++    expect_len = 8+16
++    expect_ref = IP(dst=str(test.public_ipv6_xlate),src=str(test.public_ipv4)) \
++        / UDP(sport=666,dport=667) \
++        / Raw(expect_data)
++    expect_csum = 11904 #manually calculated
++    test.send_and_check(expect_ref,ip6_val, "UDP Header w/ checksum")
++    
++    # UDP Header w/o checksum w/ drop behavior
++    expect_ref = IP(dst=str(test.public_ipv6_xlate),src=str(test.public_ipv4)) \
++        / UDP(sport=666,dport=667,chksum=0) \
++        / Raw(expect_data)
++    test.send_and_none(expect_ref, "UDP Header w/o checksum, drop")
++
++    # UDP Header w/o checksum w/ forward behavior
++    test.tayga_conf.default()
++    test.tayga_conf.udp_cksum_mode = "fwd"
++    test.reload()
++    expect_ref = IP(dst=str(test.public_ipv6_xlate),src=str(test.public_ipv4)) \
++        / UDP(sport=666,dport=667,chksum=0) \
++        / Raw(expect_data)
++    expect_csum = 0
++    test.send_and_check(expect_ref, ip6_val,"UDP Header w/o checksum, forward")
++
++    # UDP Header w/o checksum w/ calculate behavior
++    test.tayga_conf.default()
++    test.tayga_conf.udp_cksum_mode = "calc"
++    test.reload()
++    expect_ref = IP(dst=str(test.public_ipv6_xlate),src=str(test.public_ipv4)) \
++        / UDP(sport=666,dport=667,chksum=0) \
++        / Raw(expect_data)
++    expect_csum = 11904
++    test.send_and_check(expect_ref, ip6_val,"UDP Header w/o checksum, calculate")
++
++    # ICMP Headers
++    expect_data = None
++    expect_len = 8
++    expect_proto = 58
++    expect_ref = IP(dst=str(test.public_ipv6_xlate),src=str(test.public_ipv4)) / ICMP(type=8,code=0,id=22,seq=9)
++    expect_csum = 60372
++    test.send_and_check(expect_ref, ip6_val,"ICMP Echo Request")
++    expect_ref = IP(dst=str(test.public_ipv6_xlate),src=str(test.public_ipv4)) / ICMP(type=0,code=0,id=23,seq=19)
++    expect_csum = 60105
++    test.send_and_check(expect_ref, ip6_val,"ICMP Echo Reply")
++
++    #Scapy was used with show2() which generates expected checksums, such as this:
++    #expect_equiv = IPv6(dst=str(test.public_ipv6),src=str(test.public_ipv4_xlate)) /ICMPv6EchoRequest(id=22,seq=9)
++    #expect_equiv.show2()
++
++    #clear expected
++    expect_csum = -1
++    expect_len = -1
++
++    test.section("Transport-Layer Header (RFC 7915 4.5)")
++    
++#############################################
++# Transport-Layer Header (RFC 7915 5.5)
++#############################################
++def sec_5_5():
++    global test
++    global expect_sa
++    global expect_da
++    global expect_data
++    global expect_ref
++    global expect_len
++    global expect_frag
++    global expect_id
++    global expect_csum
++    global expect_type
++    global expect_code
++
++    # Setup config for this section
++    test.tayga_conf.default()
++    test.tayga_conf.udp_cksum_mode = "drop"
++    test.reload()
++
++    # TCP Header
++    # Using well-known TCP packet payloads and manually calculated checksums
++    expect_data = bytes([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15])
++    expect_sa = test.public_ipv6_xlate
++    expect_da = test.public_ipv4
++    expect_ref = IPv6(dst=str(test.public_ipv4_xlate),src=str(test.public_ipv6),plen=20+16) \
++        / TCP(sport=666,dport=667,flags="S",seq=420) \
++        / Raw(expect_data)
++    expect_csum = 58108 #manually calculated
++    test.send_and_check(expect_ref,ip_val, "TCP Header")
++
++    # UDP Header w/ checksum
++    expect_ref = IPv6(dst=str(test.public_ipv4_xlate),src=str(test.public_ipv6),plen=8+16) \
++        / UDP(sport=666,dport=667) \
++        / Raw(expect_data)
++    expect_csum = 21644 #manually calculated
++    test.send_and_check(expect_ref,ip_val, "UDP Header w/ checksum")
++
++    # UDP Header w/o checksum w/ drop behavior
++    expect_ref = IPv6(dst=str(test.public_ipv4_xlate),src=str(test.public_ipv6),plen=8+16) \
++        / UDP(sport=666,dport=667,chksum=0) \
++        / Raw(expect_data)
++    expect_csum = 21644 #manually calculated
++    test.send_and_none(expect_ref, "UDP Header w/o checksum, drop")
++    
++    # UDP Header w/o checksum w/ forward behavior
++    test.tayga_conf.default()
++    test.tayga_conf.udp_cksum_mode = "fwd"
++    test.reload()
++    expect_ref = IPv6(dst=str(test.public_ipv4_xlate),src=str(test.public_ipv6),plen=8+16) \
++        / UDP(sport=666,dport=667,chksum=0) \
++        / Raw(expect_data)
++    expect_csum = 0 #manually calculated
++    test.send_and_check(expect_ref,ip_val, "UDP Header w/o checksum, forward")
++    
++    # UDP Header w/o checksum w/ calculate behavior
++    test.tayga_conf.default()
++    test.tayga_conf.udp_cksum_mode = "calc"
++    test.reload()
++    expect_ref = IPv6(dst=str(test.public_ipv4_xlate),src=str(test.public_ipv6),plen=8+16) \
++        / UDP(sport=666,dport=667,chksum=0) \
++        / Raw(expect_data)
++    expect_csum = 21644 #manually calculated
++    test.send_and_check(expect_ref,ip_val, "UDP Header w/o checksum, calculate")
++
++    # ICMP Header
++    expect_type = 8
++    expect_code = 0
++    expect_ref = IPv6(dst=str(test.public_ipv4_xlate),src=str(test.public_ipv6)) / ICMPv6EchoRequest(id=15,seq=21)
++    expect_csum = 63451 #manually calculated
++    test.send_and_check(expect_ref,icmp4_val, "ICMP Header Echo Request")
++
++    expect_ref = IPv6(dst=str(test.public_ipv4_xlate),src=str(test.public_ipv6)) / ICMPv6EchoReply(id=16,seq=22)
++    expect_csum = 65497 #manually calculated
++    expect_type = 0
++    test.send_and_check(expect_ref,icmp4_val, "ICMP Header Echo Reply")
++
++    #equiv packet used to generate checksums
++    #expect_equiv = IP(dst=expect_da,src=expect_sa) / ICMP(type=0,id=16,seq=22)
++    #expect_equiv.show2()
++
++    #reset expecteds
++    expect_type = -1
++    expect_code = -1
++    expect_csum = -1
++
++    # No other protocols are required, but we may want to test them   
++    test.section("Transport-Layer Header (RFC 7915 5.5)")
++
++# Test was created at top of file
++# Setup, call tests, etc.
++
++#test.debug = True
++test.timeout = 0.1
++test.setup()
++test.tayga_bin = "./taygabe"
++
++# Call all tests
++sec_4_5()
++sec_5_5()
++
++time.sleep(1)
++
++test.cleanup()
++#Print test report (expected pass/fail count)
++test.report(14,0)
++

diff --git a/tayga-0.9.6_38095ea4.patch b/tayga-0.9.6_38095ea4.patch
new file mode 100644
index 0000000..4652568
--- /dev/null
+++ b/tayga-0.9.6_38095ea4.patch
@@ -0,0 +1,1666 @@
+commit 38095ea4a1c1720f69627653426c7ee473eb2978
+Author: Andrew <apalrd@users.noreply.github.com>
+Date:   Mon Jan 26 07:55:02 2026 -0500
+
+    Basic interface configuration via Netlink (#163)
+    
+    * Move tunnel code to tun.c
+    
+    * conf file changes to add tun config
+    
+    * Netlink code to add ips + routes
+
+diff --git a/Makefile b/Makefile
+index 155f86e..b079e3b 100644
+--- a/Makefile
++++ b/Makefile
+@@ -2,7 +2,7 @@
+ CC ?= gcc
+ CFLAGS ?= -Wall -O2
+ LDFLAGS ?= -flto=auto
+-SOURCES := nat64.c addrmap.c dynamic.c tayga.c conffile.c log.c
++SOURCES := nat64.c addrmap.c dynamic.c tayga.c conffile.c log.c tun.c
+ 
+ #Default installation paths (may be overridden by environment variables)
+ prefix ?= /usr/local
+diff --git a/conffile.c b/conffile.c
+index 2129541..bb11743 100644
+--- a/conffile.c
++++ b/conffile.c
+@@ -249,6 +249,29 @@ static int config_udp_cksum_mode(int ln, int arg_count, char **args)
+ 	return ERROR_NONE;
+ }
+ 
++static int config_tun_up(int ln, int arg_count, char **args)
++{
++	//arg_count unused
++	(void)arg_count;
++
++	if (!strcasecmp(args[0], "true") ||
++	    !strcasecmp(args[0], "on") ||
++	    !strcasecmp(args[0], "yes") ||
++		!strcasecmp(args[0], "1")) {
++		gcfg->tun_up = 1;
++	} else if (!strcasecmp(args[0], "false") ||
++			   !strcasecmp(args[0], "off") ||
++			   !strcasecmp(args[0], "no") ||
++			   !strcasecmp(args[0], "0")) {
++		gcfg->tun_up = 0;
++	} else {
++		slog(LOG_CRIT, "Error: invalid value for tun-up on line %d\n",ln);
++		return ERROR_REJECT;
++	}
++	return ERROR_NONE;
++}
++
++
+ static int config_tun_device(int ln, int arg_count, char **args)
+ {
+ 	//arg_count unused
+@@ -268,6 +291,136 @@ static int config_tun_device(int ln, int arg_count, char **args)
+ 	return ERROR_NONE;
+ }
+ 
++
++static int config_tun_ip(int ln, int arg_count, char **args)
++{
++	//arg_count unused
++	(void)arg_count;
++
++	struct tun_ip6 *ip6 = malloc(sizeof(struct tun_ip6));
++	if(!ip6) {
++		slog(LOG_CRIT,"Failed to allocate ip memory\n");
++		return ERROR_REJECT;
++	}
++	//We will only use one of these two pointers
++	struct tun_ip4 *ip4 = (struct tun_ip4 *)ip6;
++
++	//Check if we have a slash, and get prefix length
++	char *slash;
++	slash = strchr(args[0], '/');
++	int prefix = -1;
++	if (slash) {
++		prefix = atoi(slash+1);
++		//Additional check on zero answer
++		if(slash[1] > '9' || slash[1] < '0' || (!prefix && slash[1] != '0')) {
++			slog(LOG_CRIT, "Invalid prefix length in %s for "
++			     "address on line %d\n", args[0], ln);
++			return ERROR_REJECT;
++		}
++		slash[0] = '\0';
++	}
++
++	//Try to decode as IPv6
++	if (inet_pton(AF_INET6, args[0], &ip6->addr)) {
++		//IP6 was valid, set prefix and insert into array
++		if(prefix < 0) prefix = 128;
++		if(prefix > 128) {
++			slog(LOG_CRIT, "Invalid prefix length %d for IPv6 "
++			     "address on line %d\n", prefix, ln);
++			free(ip6);
++			return ERROR_REJECT;
++		}
++		ip6->prefix_len = prefix;
++		INIT_LIST_HEAD(&ip6->list);
++		list_add(&ip6->list,&gcfg->tun_ip6_list);
++		return ERROR_NONE;
++	}
++	//Then try as IPv4
++	if(inet_pton(AF_INET, args[0], &ip4->addr)) {
++		//IP4 was valid, set prefix and insert into array
++		if(prefix < 0) prefix = 32;
++		if(prefix > 32) {
++			slog(LOG_CRIT, "Invalid prefix length %d for IPv4 "
++			     "address on line %d\n", prefix, ln);
++			free(ip4);
++			return ERROR_REJECT;
++		}
++		ip4->prefix_len = prefix;
++		INIT_LIST_HEAD(&ip4->list);
++		list_add(&ip4->list,&gcfg->tun_ip4_list);
++		return ERROR_NONE;
++	}
++	//Error handling
++	slog(LOG_CRIT, "Expected an IPv4 or IPv6 address but found \"%s\" on "
++		     "line %d\n", args[0], ln);
++	return ERROR_REJECT;
++}
++
++static int config_tun_route(int ln, int arg_count, char **args)
++{
++	//arg_count unused
++	(void)arg_count;
++
++	struct tun_ip6 *ip6 = malloc(sizeof(struct tun_ip6));
++	if(!ip6) {
++		slog(LOG_CRIT,"Failed to allocate route memory\n");
++		return ERROR_REJECT;
++	}
++	//We will only use one of these two pointers
++	struct tun_ip4 *ip4 = (struct tun_ip4 *)ip6;
++
++	//Check if we have a slash, and get prefix length
++	char *slash;
++	slash = strchr(args[0], '/');
++	int prefix = -1;
++	if (slash) {
++		prefix = atoi(slash+1);
++		//Additional check on zero answer
++		if(slash[1] > '9' || slash[1] < '0' || (!prefix && slash[1] != '0')) {
++			slog(LOG_CRIT, "Invalid prefix length in %s for "
++			     "route on line %d\n", args[0], ln);
++			return ERROR_REJECT;
++		}
++		slash[0] = '\0';
++	}
++
++	//Try to decode as IPv6
++	if (inet_pton(AF_INET6, args[0], &ip6->addr)) {
++		//IP6 was valid, set prefix and insert into array
++		if(prefix < 0) prefix = 128;
++		if(prefix > 128) {
++			slog(LOG_CRIT, "Invalid prefix length %d for IPv6 "
++			     "route on line %d\n", prefix, ln);
++			free(ip6);
++			return ERROR_REJECT;
++		}
++		ip6->prefix_len = prefix;
++		INIT_LIST_HEAD(&ip6->list);
++		list_add(&ip6->list,&gcfg->tun_rt6_list);
++		return ERROR_NONE;
++	}
++	//Then try as IPv4
++	if(inet_pton(AF_INET, args[0], &ip4->addr)) {
++		//IP4 was valid, set prefix and insert into array
++		if(prefix < 0) prefix = 32;
++		if(prefix > 32) {
++			slog(LOG_CRIT, "Invalid prefix length %d for IPv4 "
++			     "route on line %d\n", prefix, ln);
++			free(ip4);
++			return ERROR_REJECT;
++		}
++		ip4->prefix_len = prefix;
++		INIT_LIST_HEAD(&ip4->list);
++		list_add(&ip4->list,&gcfg->tun_rt4_list);
++		return ERROR_NONE;
++	}
++	//Error handling
++	slog(LOG_CRIT, "Expected an IPv4 or IPv6 route but found \"%s\" on "
++		     "line %d\n", args[0], ln);
++	return ERROR_REJECT;
++}
++
++
+ static int config_map(int ln, int arg_count, char **args)
+ {
+ 	//arg_count unused
+@@ -506,6 +659,9 @@ struct {
+ 	{ "prefix", 		config_prefix, 			1 },
+ 	{ "wkpf-strict", 	config_wkpf_strict, 	1 },
+ 	{ "udp-cksum-mode", config_udp_cksum_mode, 	1 },
++	{ "tun-up", 		config_tun_up, 			1 },
++	{ "tun-ip", 		config_tun_ip, 			1 },
++	{ "tun-route", 		config_tun_route, 		1 },
+ 	{ "tun-device", 	config_tun_device, 		1 },
+ 	{ "map", 			config_map, 			2 },
+ 	{ "dynamic-pool", 	config_dynamic_pool,	1 },
+@@ -537,6 +693,11 @@ int config_init(void)
+ 	INIT_LIST_HEAD(&gcfg->cache_active);
+ 	gcfg->wkpf_strict = 1;
+ 	gcfg->udp_cksum_mode = UDP_CKSUM_DROP;
++	INIT_LIST_HEAD(&gcfg->tun_ip4_list);
++	INIT_LIST_HEAD(&gcfg->tun_ip6_list);
++	INIT_LIST_HEAD(&gcfg->tun_rt4_list);
++	INIT_LIST_HEAD(&gcfg->tun_rt6_list);
++	gcfg->tun_up = 0;
+ 	return ERROR_NONE;
+ }
+ 
+diff --git a/tayga.c b/tayga.c
+index 32d0739..9a057f6 100644
+--- a/tayga.c
++++ b/tayga.c
+@@ -68,216 +68,6 @@ void die(const char *format, ...) {
+ 	exit(1);
+ }
+ 
+-static void set_nonblock(int fd)
+-{
+-	int flags;
+-
+-	flags = fcntl(fd, F_GETFL);
+-	if (flags < 0) {
+-		slog(LOG_CRIT, "fcntl F_GETFL returned %s\n", strerror(errno));
+-		exit(1);
+-	}
+-	flags |= O_NONBLOCK;
+-	if (fcntl(fd, F_SETFL, flags) < 0) {
+-		slog(LOG_CRIT, "fcntl F_SETFL returned %s\n", strerror(errno));
+-		exit(1);
+-	}
+-}
+-
+-#ifdef __linux__
+-static void tun_setup(int do_mktun, int do_rmtun)
+-{
+-	struct ifreq ifr;
+-	int fd;
+-
+-	gcfg->tun_fd = open("/dev/net/tun", O_RDWR);
+-	if (gcfg->tun_fd < 0) {
+-		slog(LOG_CRIT, "Unable to open /dev/net/tun, aborting: %s\n",
+-				strerror(errno));
+-		exit(1);
+-	}
+-
+-	memset(&ifr, 0, sizeof(ifr));
+-	ifr.ifr_flags = IFF_TUN;
+-	strcpy(ifr.ifr_name, gcfg->tundev);
+-	if (ioctl(gcfg->tun_fd, TUNSETIFF, &ifr) < 0) {
+-		slog(LOG_CRIT, "Unable to attach tun device %s, aborting: "
+-				"%s\n", gcfg->tundev, strerror(errno));
+-		exit(1);
+-	}
+-
+-	if (do_mktun) {
+-		if (ioctl(gcfg->tun_fd, TUNSETPERSIST, 1) < 0) {
+-			slog(LOG_CRIT, "Unable to set persist flag on %s, "
+-					"aborting: %s\n", gcfg->tundev,
+-					strerror(errno));
+-			exit(1);
+-		}
+-		if (ioctl(gcfg->tun_fd, TUNSETOWNER, 0) < 0) {
+-			slog(LOG_CRIT, "Unable to set owner on %s, "
+-					"aborting: %s\n", gcfg->tundev,
+-					strerror(errno));
+-			exit(1);
+-		}
+-		if (ioctl(gcfg->tun_fd, TUNSETGROUP, 0) < 0) {
+-			slog(LOG_CRIT, "Unable to set group on %s, "
+-					"aborting: %s\n", gcfg->tundev,
+-					strerror(errno));
+-			exit(1);
+-		}
+-		slog(LOG_NOTICE, "Created persistent tun device %s\n",
+-				gcfg->tundev);
+-		return;
+-	} else if (do_rmtun) {
+-		if (ioctl(gcfg->tun_fd, TUNSETPERSIST, 0) < 0) {
+-			slog(LOG_CRIT, "Unable to clear persist flag on %s, "
+-					"aborting: %s\n", gcfg->tundev,
+-					strerror(errno));
+-			exit(1);
+-		}
+-		slog(LOG_NOTICE, "Removed persistent tun device %s\n",
+-				gcfg->tundev);
+-		return;
+-	}
+-
+-	set_nonblock(gcfg->tun_fd);
+-
+-	fd = socket(PF_INET, SOCK_DGRAM, 0);
+-	if (fd < 0) {
+-		slog(LOG_CRIT, "Unable to create socket, aborting: %s\n",
+-				strerror(errno));
+-		exit(1);
+-	}
+-
+-	/* Query MTU from tun adapter */
+-	memset(&ifr, 0, sizeof(ifr));
+-	strcpy(ifr.ifr_name, gcfg->tundev);
+-	if (ioctl(fd, SIOCGIFMTU, &ifr) < 0) {
+-		slog(LOG_CRIT, "Unable to query MTU, aborting: %s\n",
+-				strerror(errno));
+-		exit(1);
+-	}
+-	close(fd);
+-
+-	/* MTU is less than 1280, not allowed */
+-	gcfg->mtu = ifr.ifr_mtu;
+-	if(gcfg->mtu < MTU_MIN) {
+-		slog(LOG_CRIT, "MTU of %d is too small, must be at least %d\n",
+-				gcfg->mtu, MTU_MIN);
+-		exit(1);
+-	}
+-
+-	slog(LOG_INFO, "Using tun device %s with MTU %d\n", gcfg->tundev,
+-			gcfg->mtu);
+-}
+-#endif
+-
+-#ifdef __FreeBSD__
+-static void tun_setup(int do_mktun, int do_rmtun)
+-{
+-	struct ifreq ifr;
+-	int fd, do_rename = 0, multi_af;
+-	char devname[64];
+-
+-	if (strncmp(gcfg->tundev, "tun", 3))
+-		do_rename = 1;
+-
+-	if ((do_mktun || do_rmtun) && do_rename)
+-	{
+-		slog(LOG_CRIT,
+-			"tunnel interface name needs to match tun[0-9]+ pattern "
+-				"for --mktun to work\n");
+-		exit(1);
+-	}
+-
+-	snprintf(devname, sizeof(devname), "/dev/%s", do_rename ? "tun" : gcfg->tundev);
+-
+-	gcfg->tun_fd = open(devname, O_RDWR);
+-	if (gcfg->tun_fd < 0) {
+-		slog(LOG_CRIT, "Unable to open %s, aborting: %s\n",
+-				devname, strerror(errno));
+-		exit(1);
+-	}
+-
+-	if (do_mktun) {
+-		slog(LOG_NOTICE, "Created persistent tun device %s\n",
+-				gcfg->tundev);
+-		return;
+-	} else if (do_rmtun) {
+-
+-		/* Close socket before removal */
+-		close(gcfg->tun_fd);
+-
+-		fd = socket(PF_INET, SOCK_DGRAM, 0);
+-		if (fd < 0) {
+-			slog(LOG_CRIT, "Unable to create control socket, aborting: %s\n",
+-					strerror(errno));
+-			exit(1);
+-		}
+-
+-		memset(&ifr, 0, sizeof(ifr));
+-		strcpy(ifr.ifr_name, gcfg->tundev);
+-		if (ioctl(fd, SIOCIFDESTROY, &ifr) < 0) {
+-			slog(LOG_CRIT, "Unable to destroy interface %s, aborting: %s\n",
+-					gcfg->tundev, strerror(errno));
+-			exit(1);
+-		}
+-
+-		close(fd);
+-
+-		slog(LOG_NOTICE, "Removed persistent tun device %s\n",
+-				gcfg->tundev);
+-		return;
+-	}
+-
+-	/* Set multi-AF mode */
+-	multi_af = 1;
+-	if (ioctl(gcfg->tun_fd, TUNSIFHEAD, &multi_af) < 0) {
+-			slog(LOG_CRIT, "Unable to set multi-AF on %s, "
+-					"aborting: %s\n", gcfg->tundev,
+-					strerror(errno));
+-			exit(1);
+-	}
+-
+-	slog(LOG_CRIT, "Multi-AF mode set on %s\n", gcfg->tundev);
+-
+-	set_nonblock(gcfg->tun_fd);
+-
+-	fd = socket(PF_INET, SOCK_DGRAM, 0);
+-	if (fd < 0) {
+-		slog(LOG_CRIT, "Unable to create socket, aborting: %s\n",
+-				strerror(errno));
+-		exit(1);
+-	}
+-
+-	if (do_rename) {
+-		memset(&ifr, 0, sizeof(ifr));
+-		strcpy(ifr.ifr_name, fdevname(gcfg->tun_fd));
+-		ifr.ifr_data = gcfg->tundev;
+-		if (ioctl(fd, SIOCSIFNAME, &ifr) < 0) {
+-			slog(LOG_CRIT, "Unable to rename interface %s to %s, aborting: %s\n",
+-					fdevname(gcfg->tun_fd), gcfg->tundev,
+-					strerror(errno));
+-			exit(1);
+-		}
+-	}
+-
+-	memset(&ifr, 0, sizeof(ifr));
+-	strcpy(ifr.ifr_name, gcfg->tundev);
+-	if (ioctl(fd, SIOCGIFMTU, &ifr) < 0) {
+-		slog(LOG_CRIT, "Unable to query MTU, aborting: %s\n",
+-				strerror(errno));
+-		exit(1);
+-	}
+-	close(fd);
+-
+-	gcfg->mtu = ifr.ifr_mtu;
+-
+-	slog(LOG_INFO, "Using tun device %s with MTU %d\n", gcfg->tundev,
+-			gcfg->mtu);
+-}
+-#endif
+-
+ static void signal_handler(int signal)
+ {
+ 	(void)!write(signalfds[1], &signal, sizeof(signal));
+@@ -292,8 +82,8 @@ static void signal_setup(void)
+ 				strerror(errno));
+ 		exit(1);
+ 	}
+-	set_nonblock(signalfds[0]);
+-	set_nonblock(signalfds[1]);
++	if(set_nonblock(signalfds[0])) exit(1);
++	if(set_nonblock(signalfds[1])) exit(1);
+ 	memset(&act, 0, sizeof(act));
+ 	act.sa_handler = signal_handler;
+ 	sigaction(SIGINT, &act, NULL);
+@@ -304,45 +94,6 @@ static void signal_setup(void)
+ 	sigaction(SIGTERM, &act, NULL);
+ }
+ 
+-static void read_from_tun(void)
+-{
+-	int ret;
+-	struct tun_pi *pi = (struct tun_pi *)gcfg->recv_buf;
+-	struct pkt pbuf, *p = &pbuf;
+-
+-	ret = read(gcfg->tun_fd, gcfg->recv_buf, gcfg->recv_buf_size);
+-	if (ret < 0) {
+-		if (errno == EAGAIN)
+-			return;
+-		slog(LOG_ERR, "received error when reading from tun "
+-				"device: %s\n", strerror(errno));
+-		return;
+-	}
+-	if ((size_t)ret < sizeof(struct tun_pi)) {
+-		slog(LOG_WARNING, "short read from tun device "
+-				"(%d bytes)\n", ret);
+-		return;
+-	}
+-	if ((uint32_t)ret == gcfg->recv_buf_size) {
+-		slog(LOG_WARNING, "dropping oversized packet\n");
+-		return;
+-	}
+-	memset(p, 0, sizeof(struct pkt));
+-	p->data = gcfg->recv_buf + sizeof(struct tun_pi);
+-	p->data_len = ret - sizeof(struct tun_pi);
+-	switch (TUN_GET_PROTO(pi)) {
+-	case ETH_P_IP:
+-		handle_ip4(p);
+-		break;
+-	case ETH_P_IPV6:
+-		handle_ip6(p);
+-		break;
+-	default:
+-		slog(LOG_WARNING, "Dropping unknown proto %04x from "
+-				"tun device\n", ntohs(pi->proto));
+-		break;
+-	}
+-}
+ 
+ static void read_from_signalfd(void)
+ {
+@@ -776,7 +527,7 @@ int main(int argc, char **argv)
+ 		if (pollfds[0].revents)
+ 			read_from_signalfd();
+ 		if (pollfds[1].revents)
+-			read_from_tun();
++			tun_read();
+ 		if (gcfg->cache_size && (gcfg->last_cache_maint +
+ 						CACHE_CHECK_INTERVAL < now ||
+ 					gcfg->last_cache_maint > now)) {
+diff --git a/tayga.conf.5 b/tayga.conf.5
+index 0b402d2..dae2114 100644
+--- a/tayga.conf.5
++++ b/tayga.conf.5
+@@ -244,6 +244,15 @@ IPv6 guarantees delivery of packets which are 1280 bytes or less. This behavior
+ Increasing this limit will allow Tayga to translate packets which are larger than 1280 bytes, which may increase performance if you can guarantee that your network can transport packets up to this MTU end to end.
+ .IP
+ .B Incorrectly setting this parameter may cause IPv4-translated packets to be dropped by IPv6 routers, in violation of expected IPv4 behavior. 
++.TP
++.BI "tun-up " yes|no
++Configure whether Tayga should bring up the TUN interface itself upon startup. If set to "no", the administrator is responsible for bringing up the interface and configuring its parameters (addresses, routes, etc) manually. Only supported on Linux.
++.TP
++.BI "tun-ip " ip_address/prefix
++Configure an IP address and prefix for the TUN interface. May be specified multiple times. Only supported on Linux.
++.TP
++.BI "tun-route " destination/prefix
++Configure a route for the TUN interface. May be specified multiple times. Only supported on Linux.
+ .IP
+ 
+ .SH "SEE ALSO"
+diff --git a/tayga.conf.example b/tayga.conf.example
+index e0d5d45..84a3cd7 100644
+--- a/tayga.conf.example
++++ b/tayga.conf.example
+@@ -163,4 +163,36 @@ dynamic-pool 192.168.255.0/24
+ # dropped by IPv6 routers, in violation of expected IPv4 behavior. 
+ #
+ # Default value: 1280
+-#offlink-mtu 1492
+\ No newline at end of file
++#offlink-mtu 1492
++
++
++#
++# If Tayga should bring up the tun device (Linux only)
++#
++# Default no, valid values are 'yes' or 'up'
++#
++#tun-up yes
++
++
++#
++# IP Address to add to the tun device (Linux only)
++#
++# Must be specified as a single address or CIDR notation
++# May be specified multiple times
++#
++# Equivalent to running `ip addr add <ip> dev <tun-device>`
++#
++#tun-ip 192.0.0.1/29
++#tun-ip 2001:db8::1/128
++
++
++#
++# IP Route to add to the tun device (Linux only)
++#
++# Must be specified as a single address or CIDR notation
++# May be specified multiple times
++#
++# Equivalent to running `ip route add <route> dev <tun-device>`
++#
++#tun-route 192.168.255.0/24
++#tun-route 64:ff9b::/96
+\ No newline at end of file
+diff --git a/tayga.h b/tayga.h
+index bba8fa4..ff30c86 100644
+--- a/tayga.h
++++ b/tayga.h
+@@ -38,12 +38,11 @@
+ #include <errno.h>
+ #include <time.h>
+ #include <stdarg.h>
++#include <net/if.h>
+ #if defined(__linux__)
+-#include <linux/if.h>
+ #include <linux/if_tun.h>
+ #include <linux/if_ether.h>
+ #elif defined(__FreeBSD__)
+-#include <net/if.h>
+ #include <net/if_tun.h>
+ #include <netinet/if_ether.h>
+ #include <net/ethernet.h>
+@@ -266,6 +265,20 @@ struct cache_entry {
+ 	struct list_head hash6; /* gcfg->hash_table6 */
+ };
+ 
++/// IP Address or Route Entry (IPv4)
++struct tun_ip4 {
++	struct in_addr addr;
++	int prefix_len;
++	struct list_head list; /* gcfg->tun_ip4_list and gcfg->tun_rt4_list */
++};
++
++/// IP Address or Route Entry (IPv6)
++struct tun_ip6 {
++	struct in6_addr addr;
++	int prefix_len;
++	struct list_head list; /* gcfg->tun_ip6_list and gcfg->tun_rt6_list */
++};
++
+ /// Cache flag bits
+ enum {
+ 	CACHE_F_SEEN_4TO6	= (1<<0),
+@@ -283,37 +296,48 @@ enum udp_cksum_mode {
+ 
+ /// Configuration structure
+ struct config {
++	// Tunnel parameters
+ 	char tundev[IFNAMSIZ];
+-	char data_dir[512];
++	int tun_fd;
++	uint16_t mtu;
++	int tun_up;
++	struct list_head tun_ip4_list;
++	struct list_head tun_ip6_list;
++	struct list_head tun_rt4_list;
++	struct list_head tun_rt6_list;
++
++	//Receive buffer parameters
++	uint8_t *recv_buf;
+ 	uint32_t recv_buf_size;
++
++	//Map paramters
+ 	struct in_addr local_addr4;
+ 	struct in6_addr local_addr6;
+ 	struct list_head map4_list;
+ 	struct list_head map6_list;
++
++	//Dynamic map parameters
++	char data_dir[512];
+ 	int dyn_min_lease;
+ 	int dyn_max_lease;
+ 	int max_commit_delay;
+ 	struct dynamic_pool *dynamic_pool;
++
++	//Cache
+ 	int hash_bits;
+ 	int cache_size;
+-	uint32_t ipv6_offlink_mtu;
+-
+-	int tun_fd;
+-
+-	uint16_t mtu;
+-	uint8_t *recv_buf;
+-
+ 	uint32_t rand[8];
+ 	struct list_head cache_pool;
+ 	struct list_head cache_active;
+ 	time_t last_cache_maint;
+ 	struct list_head *hash_table4;
+ 	struct list_head *hash_table6;
+-
+ 	time_t last_dynamic_maint;
+ 	time_t last_map_write;
+ 	int map_write_pending;
+ 
++	//Other config parameters
++	uint32_t ipv6_offlink_mtu;
+ 	int wkpf_strict;
+ 	int log_opts;
+ 	enum udp_cksum_mode udp_cksum_mode;	
+@@ -411,5 +435,10 @@ int journal_printv_with_location(
+         int priority, const char *file, const char *line, const char *func,
+         const char *format, va_list ap);
+ 
++/* tun.c */
++int tun_setup(int do_mktun, int do_rmtun);
++int set_nonblock(int fd);
++void tun_read();
++
+ 
+ #endif /* #ifndef __TAYGA_H__ */
+\ No newline at end of file
+diff --git a/test/unit_conffile.c b/test/unit_conffile.c
+index 76fd6f1..2447fab 100644
+--- a/test/unit_conffile.c
++++ b/test/unit_conffile.c
+@@ -25,6 +25,10 @@ static struct config tcfg;
+ static char *tmap4[100] = {0};
+ static char *tmap6[100] = {0};
+ 
++/* IP / Route lists as strings (IPv4 first) */
++static char *tun_ip[100] = {0};
++static char *tun_route[100] = {0};
++
+ /* assign_dynamic
+  * required for addrmap.c to link
+  * we need addrmap.c for this test
+@@ -93,6 +97,7 @@ void test_config_compare(void) {
+     expectl(gcfg->wkpf_strict, tcfg.wkpf_strict, "wkpf_strict");
+     expectl(gcfg->log_opts, tcfg.log_opts, "log_opts");
+     expectl(gcfg->udp_cksum_mode, tcfg.udp_cksum_mode, "udp_cksum_mode");
++    expectl(gcfg->tun_up, tcfg.tun_up, "tun_up");
+ 
+     /* Pointers in gcfg which are not touched by conffile.c */
+     expectl(gcfg->tun_fd, 0, "tun_fd");
+@@ -151,6 +156,86 @@ void test_config_compare(void) {
+         }
+ 	}
+ 
++
++    /* Iterate over ip4 + ip6 list and compare length */
++    count = 0;
++	list_for_each(entry, &gcfg->tun_ip4_list) {
++        count++;
++    }
++	list_for_each(entry, &gcfg->tun_ip6_list) {
++        count++;
++    }
++    for(expect_count = 0; tun_ip[expect_count];expect_count++) ;
++    expectl(count,expect_count,"tun_ip length");
++
++
++    /* If the lengths are equal, compare contents */
++    if(count == expect_count) {
++        count = 0;
++        /* Compare contents of ip4 list as strings */
++        list_for_each(entry, &gcfg->tun_ip4_list) {
++            struct tun_ip4 *ip4;
++            sprintf(namebuf,"tun_ip[%d]",count);
++            ip4 = list_entry(entry, struct tun_ip4, list);
++            sprintf(linebuf,"%s/%d",
++                inet_ntop(AF_INET,&ip4->addr,addrbuf,64),
++                ip4->prefix_len);
++            expects(linebuf,tun_ip[count],512,namebuf);
++            count++;
++        }
++
++        /* Compare contents of ip6 list as strings */
++        list_for_each(entry, &gcfg->tun_ip6_list) {
++            struct tun_ip6 *ip6;
++            sprintf(namebuf,"tun_ip[%d]",count);
++            ip6 = list_entry(entry, struct tun_ip6, list);
++            sprintf(linebuf,"%s/%d",
++                inet_ntop(AF_INET6,&ip6->addr,addrbuf,64),
++                ip6->prefix_len);
++            expects(linebuf,tun_ip[count],512,namebuf);
++            count++;
++        }
++    }
++
++    /* Iterate over rt4 and rt6 lists and compare length */
++    count = 0;
++	list_for_each(entry, &gcfg->tun_rt4_list) {
++        count++;
++    }
++	list_for_each(entry, &gcfg->tun_rt6_list) {
++        count++;
++    }
++    for(expect_count = 0; tun_route[expect_count];expect_count++) ;
++    expectl(count,expect_count,"tun_route length");
++
++    /* If the lengths are equal, compare contents */
++    if(count == expect_count) {
++        count = 0;
++        /* Compare contents of ip4 list as strings */
++        list_for_each(entry, &gcfg->tun_rt4_list) {
++            struct tun_ip4 *ip4;
++            sprintf(namebuf,"tun_route[%d]",count);
++            ip4 = list_entry(entry, struct tun_ip4, list);
++            sprintf(linebuf,"%s/%d",
++                inet_ntop(AF_INET,&ip4->addr,addrbuf,64),
++                ip4->prefix_len);
++            expects(linebuf,tun_route[count],512,namebuf);
++            count++;
++        }
++
++        /* Compare contents of ip6 list as strings */
++        list_for_each(entry, &gcfg->tun_rt6_list) {
++            struct tun_ip6 *ip6;
++            sprintf(namebuf,"tun_route[%d]",count);
++            ip6 = list_entry(entry, struct tun_ip6, list);
++            sprintf(linebuf,"%s/%d",
++                inet_ntop(AF_INET6,&ip6->addr,addrbuf,64),
++                ip6->prefix_len);
++            expects(linebuf,tun_route[count],512,namebuf);
++            count++;
++        }
++    }
++
+     /* Structs */
+     //expect(gcfg->map6_list == tcfg.map6_list, "map6_list");
+     //expect(gcfg->map4_list == tcfg.map4_list, "map4_list");
+@@ -178,12 +263,13 @@ void test_config_init(void) {
+     tcfg.hash_bits = 7;
+     tcfg.cache_size = 1<<13;
+     tcfg.wkpf_strict = 1;
++    tcfg.tun_up = 0;
+ 
+     /* Make sure config is the size we expect
+      * This ensures the test has been updated for new variables
+      */
+     printf("TEST CASE: config struct size\n");
+-    expectl(sizeof(struct config),768,"sizeof");
++    expectl(sizeof(struct config),832,"sizeof");
+ 
+     /* Compare to our initialized tcfg */
+     printf("TEST CASE: config_init\n");
+@@ -626,6 +712,237 @@ void test_config_read(void) {
+     config_init();
+     expect(config_read(conffile),"Failed");
+ 
++
++    /* Test Case - tun-up invalid  */
++    printf("TEST CASE: tun-up invalid\n");
++    fd = fopen(conffile,"w");
++    expect((long)fd,"fopen");
++    if(!fd) return;
++    testcase = "tun-up hello\n";
++    fwrite(testcase,strlen(testcase),1,fd);
++    fclose(fd);
++    free(gcfg);
++    config_init();
++    expect(config_read(conffile),"Failed");
++
++    /* Test Case - tun-up blank  */
++    printf("TEST CASE: tun-up blank\n");
++    fd = fopen(conffile,"w");
++    expect((long)fd,"fopen");
++    if(!fd) return;
++    testcase = "tun-up\n";
++    fwrite(testcase,strlen(testcase),1,fd);
++    fclose(fd);
++    free(gcfg);
++    config_init();
++    expect(config_read(conffile),"Failed");
++
++    /* Test Case - tun-ip blank */
++    printf("TEST CASE: tun-ip blank\n");
++    fd = fopen(conffile,"w");
++    expect((long)fd,"fopen");
++    if(!fd) return;
++    testcase = "tun-ip\n";
++    fwrite(testcase,strlen(testcase),1,fd);
++    fclose(fd);
++    free(gcfg);
++    config_init();
++    expect(config_read(conffile),"Failed");
++
++    /* Test Case - tun-ip garbage */
++    printf("TEST CASE: tun-ip garbage\n");
++    fd = fopen(conffile,"w");
++    expect((long)fd,"fopen");
++    if(!fd) return;
++    testcase = "tun-ip hello\n";
++    fwrite(testcase,strlen(testcase),1,fd);
++    fclose(fd);
++    free(gcfg);
++    config_init();
++    expect(config_read(conffile),"Failed");
++
++    /* Test Case - tun-ip invalid ipv6 too long */
++    printf("TEST CASE: tun-ip invalid ipv6 too long\n");
++    fd = fopen(conffile,"w");
++    expect((long)fd,"fopen");
++    if(!fd) return;
++    testcase = "tun-ip 2001:db8::1/129\n";
++    fwrite(testcase,strlen(testcase),1,fd);
++    fclose(fd);
++    free(gcfg);
++    config_init();
++    expect(config_read(conffile),"Failed");
++
++    /* Test Case - tun-ip invalid ipv6 too short */
++    printf("TEST CASE: tun-ip invalid ipv6 too short\n");
++    fd = fopen(conffile,"w");
++    expect((long)fd,"fopen");
++    if(!fd) return;
++    testcase = "tun-ip 2001:db8::1/-1\n";
++    fwrite(testcase,strlen(testcase),1,fd);
++    fclose(fd);
++    free(gcfg);
++    config_init();
++    expect(config_read(conffile),"Failed");
++
++    /* Test Case - tun-ip invalid ipv6 not a number */
++    printf("TEST CASE: tun-ip invalid ipv6 not a number\n");
++    fd = fopen(conffile,"w");
++    expect((long)fd,"fopen");
++    if(!fd) return;
++    testcase = "tun-ip 2001:db8::1/hello\n";
++    fwrite(testcase,strlen(testcase),1,fd);
++    fclose(fd);
++    free(gcfg);
++    config_init();
++    expect(config_read(conffile),"Failed");
++
++
++    /* Test Case - tun-ip invalid ipv4 hex*/
++    printf("TEST CASE: tun-ip invalid ipv4 hex\n");
++    fd = fopen(conffile,"w");
++    expect((long)fd,"fopen");
++    if(!fd) return;
++    testcase = "tun-ip 192.168.0.b\n";
++    fwrite(testcase,strlen(testcase),1,fd);
++    fclose(fd);
++    free(gcfg);
++    config_init();
++    expect(config_read(conffile),"Failed");
++
++    /* Test Case - tun-ip invalid ipv4 not enough digits*/
++    printf("TEST CASE: tun-ip invalid ipv4 not enough digits\n");
++    fd = fopen(conffile,"w");
++    expect((long)fd,"fopen");
++    if(!fd) return;
++    testcase = "tun-ip 192.168.0\n";
++    fwrite(testcase,strlen(testcase),1,fd);
++    fclose(fd);
++    free(gcfg);
++    config_init();
++    expect(config_read(conffile),"Failed");
++
++    /* Test Case - tun-ip invalid ipv4 prefix low*/
++    printf("TEST CASE: tun-ip invalid ipv4 prefix low\n");
++    fd = fopen(conffile,"w");
++    expect((long)fd,"fopen");
++    if(!fd) return;
++    testcase = "tun-ip 192.168.0.0/-1\n";
++    fwrite(testcase,strlen(testcase),1,fd);
++    fclose(fd);
++    free(gcfg);
++    config_init();
++    expect(config_read(conffile),"Failed");
++
++    /* Test Case - tun-ip invalid ipv4 prefix high*/
++    printf("TEST CASE: tun-ip invalid ipv4 prefix high\n");
++    fd = fopen(conffile,"w");
++    expect((long)fd,"fopen");
++    if(!fd) return;
++    testcase = "tun-ip 192.168.0.0/33\n";
++    fwrite(testcase,strlen(testcase),1,fd);
++    fclose(fd);
++    free(gcfg);
++    config_init();
++    expect(config_read(conffile),"Failed");
++
++    /* Test Case - tun-route garbage */
++    printf("TEST CASE: tun-route garbage\n");
++    fd = fopen(conffile,"w");
++    expect((long)fd,"fopen");
++    if(!fd) return;
++    testcase = "tun-route hello\n";
++    fwrite(testcase,strlen(testcase),1,fd);
++    fclose(fd);
++    free(gcfg);
++    config_init();
++    expect(config_read(conffile),"Failed");
++
++    /* Test Case - tun-route invalid ipv6 too long */
++    printf("TEST CASE: tun-route invalid ipv6 too long\n");
++    fd = fopen(conffile,"w");
++    expect((long)fd,"fopen");
++    if(!fd) return;
++    testcase = "tun-route 2001:db8::1/129\n";
++    fwrite(testcase,strlen(testcase),1,fd);
++    fclose(fd);
++    free(gcfg);
++    config_init();
++    expect(config_read(conffile),"Failed");
++
++    /* Test Case - tun-route invalid ipv6 too short */
++    printf("TEST CASE: tun-route invalid ipv6 too short\n");
++    fd = fopen(conffile,"w");
++    expect((long)fd,"fopen");
++    if(!fd) return;
++    testcase = "tun-route 2001:db8::1/-1\n";
++    fwrite(testcase,strlen(testcase),1,fd);
++    fclose(fd);
++    free(gcfg);
++    config_init();
++    expect(config_read(conffile),"Failed");
++
++    /* Test Case - tun-route invalid ipv6 not a number */
++    printf("TEST CASE: tun-route invalid ipv6 not a number\n");
++    fd = fopen(conffile,"w");
++    expect((long)fd,"fopen");
++    if(!fd) return;
++    testcase = "tun-route 2001:db8::1/hello\n";
++    fwrite(testcase,strlen(testcase),1,fd);
++    fclose(fd);
++    free(gcfg);
++    config_init();
++    expect(config_read(conffile),"Failed");
++
++
++    /* Test Case - tun-route invalid ipv4 hex*/
++    printf("TEST CASE: tun-route invalid ipv4 hex\n");
++    fd = fopen(conffile,"w");
++    expect((long)fd,"fopen");
++    if(!fd) return;
++    testcase = "tun-route 192.168.0.b\n";
++    fwrite(testcase,strlen(testcase),1,fd);
++    fclose(fd);
++    free(gcfg);
++    config_init();
++    expect(config_read(conffile),"Failed");
++
++    /* Test Case - tun-route invalid ipv4 not enough digits*/
++    printf("TEST CASE: tun-route invalid ipv4 not enough digits\n");
++    fd = fopen(conffile,"w");
++    expect((long)fd,"fopen");
++    if(!fd) return;
++    testcase = "tun-route 192.168.0\n";
++    fwrite(testcase,strlen(testcase),1,fd);
++    fclose(fd);
++    free(gcfg);
++    config_init();
++    expect(config_read(conffile),"Failed");
++
++    /* Test Case - tun-route invalid ipv4 prefix low*/
++    printf("TEST CASE: tun-route invalid ipv4 prefix low\n");
++    fd = fopen(conffile,"w");
++    expect((long)fd,"fopen");
++    if(!fd) return;
++    testcase = "tun-route 192.168.0.0/-1\n";
++    fwrite(testcase,strlen(testcase),1,fd);
++    fclose(fd);
++    free(gcfg);
++    config_init();
++    expect(config_read(conffile),"Failed");
++
++    /* Test Case - tun-route invalid ipv4 prefix high*/
++    printf("TEST CASE: tun-route invalid ipv4 prefix high\n");
++    fd = fopen(conffile,"w");
++    expect((long)fd,"fopen");
++    if(!fd) return;
++    testcase = "tun-route 192.168.0.0/33\n";
++    fwrite(testcase,strlen(testcase),1,fd);
++    fclose(fd);
++    free(gcfg);
++    config_init();
++    expect(config_read(conffile),"Failed");
++
+     /* Test Case - unknown option  */
+     printf("TEST CASE: unknown option\n");
+     fd = fopen(conffile,"w");
+@@ -662,6 +979,8 @@ void test_config_read(void) {
+     config_init();
+     expect(config_read(conffile),"Failed");
+ 
++    
++
+     /* Parse all config options */
+     testcase = "#config for tayga\n"
+         "tun-device nat64\n"
+@@ -675,7 +994,12 @@ void test_config_read(void) {
+         "map 192.168.6.0/24 2001:db8:1:4445::/120\n"
+         "udp-cksum-mode drop\n"
+         "log drop reject icmp self dyn \n"
+-        "offlink-mtu 1492\n";
++        "offlink-mtu 1492\n"
++        "tun-up yes\n"
++        "tun-ip 192.168.0.0/24\n"
++        "tun-ip 2001:db8:6969::/64\n"
++        "tun-route 192.168.255.0/24\n"
++        "tun-route 64:ff9b::/96\n";
+     printf("TEST CASE: all config options\n");
+     fd = fopen(conffile,"w");
+     expect((long)fd,"fopen");
+@@ -693,6 +1017,7 @@ void test_config_read(void) {
+     tcfg.local_addr6.s6_addr32[3] = htonl(0x00000002);
+     tcfg.ipv6_offlink_mtu = 1492;
+     tcfg.log_opts = (LOG_OPT_DROP | LOG_OPT_ICMP | LOG_OPT_REJECT | LOG_OPT_SELF | LOG_OPT_DYN | LOG_OPT_CONFIG);
++    tcfg.tun_up = 1;
+     tmap4[0] = "192.168.5.42/32 type 0 mask 255.255.255.255";
+     tmap4[1] = "192.168.255.0/24 type 2 mask 255.255.255.0";
+     tmap4[2] = "192.168.6.0/24 type 0 mask 255.255.255.0";
+@@ -702,6 +1027,12 @@ void test_config_read(void) {
+     tmap6[1] = "2001:db8:1:4445::/120 type 0 mask ffff:ffff:ffff:ffff:ffff:ffff:ffff:ff00";
+     tmap6[2] = "64:ff9b::/96 type 1 mask ffff:ffff:ffff:ffff:ffff:ffff::";
+     tmap6[3] = 0;
++    tun_ip[0] = "192.168.0.0/24";
++    tun_ip[1] = "2001:db8:6969::/64";
++    tun_ip[2] = 0;
++    tun_route[0] = "192.168.255.0/24";
++    tun_route[1] = "64:ff9b::/96";
++    tun_route[2] = 0;
+     test_config_compare();
+ }
+ 
+diff --git a/tun.c b/tun.c
+new file mode 100644
+index 0000000..89c676c
+--- /dev/null
++++ b/tun.c
+@@ -0,0 +1,574 @@
++/*
++ *  tun.c -- tunnel interface routines
++ *
++ *  part of TAYGA <https://github.com/apalrd/tayga>
++ *  Copyright (C) 2010  Nathan Lutchansky <lutchann@litech.org>
++ *  Copyright (C) 2025  Andrew Palardy <andrew@apalrd.net>
++ *
++ *  This program is free software; you can redistribute it and/or modify
++ *  it under the terms of the GNU General Public License as published by
++ *  the Free Software Foundation; either version 2 of the License, or
++ *  (at your option) any later version.
++ *
++ *  This program is distributed in the hope that it will be useful,
++ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
++ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++ *  GNU General Public License for more details.
++ */
++#include "tayga.h"
++#if defined(__linux__)
++#include <linux/netlink.h>
++#include <linux/rtnetlink.h>
++#endif
++
++int netlink_wait_for_ack(int fd)
++{
++    char buf[4096];
++    ssize_t len;
++    struct nlmsghdr *nh;
++	/* Receive ACK */
++    len = recv(fd, buf, sizeof(buf), 0);
++    if (len < 0) {
++		slog(LOG_CRIT,"NETLINK Receive Failed\n");
++        return ERROR_REJECT;
++    }
++
++    for (nh = (struct nlmsghdr *)buf; NLMSG_OK(nh, len); nh = NLMSG_NEXT(nh, len)) {
++        if (nh->nlmsg_type == NLMSG_ERROR) {
++            struct nlmsgerr *err = (struct nlmsgerr *)NLMSG_DATA(nh);
++
++			//Found our ack
++            if (err->error == 0) {
++                close(fd);
++                return 0;
++            }
++            close(fd);
++			slog(LOG_CRIT,"NETLINK Returned Error %d\n",err->error);
++            return ERROR_REJECT;
++        }
++    }
++
++    close(fd);
++	slog(LOG_CRIT,"NETLINK Response Not Received\n");
++	return ERROR_REJECT;
++}
++
++
++/**
++ * @brief Set interface flags via Netlink
++ *
++ * This function connects to the Netlink socket and sends a request to set
++ * the specified flags on the given network interface.
++ *
++ * @param ifidx The index of the network interface (e.g., 0).
++ * @param flags The flags to set on the interface (e.g., IFF_UP).
++ * @param change The flags that are changing (e.g., IFF_UP).
++ * @return 0 on success, ERROR_REJECT on failure.
++ */
++int netlink_set_if_flags(int ifidx,
++                         unsigned int flags,
++                         unsigned int change)
++{
++    int fd;
++    struct {
++        struct nlmsghdr nh;
++        struct ifinfomsg ifi;
++    } req;
++
++    fd = socket(AF_NETLINK, SOCK_RAW, NETLINK_ROUTE);
++    if (fd < 0) {
++		slog(LOG_CRIT,"NETLINK Socket Failed\n");
++        return ERROR_REJECT;
++	}
++
++    memset(&req, 0, sizeof(req));
++
++    req.nh.nlmsg_len   = NLMSG_LENGTH(sizeof(struct ifinfomsg));
++    req.nh.nlmsg_type  = RTM_NEWLINK;
++    req.nh.nlmsg_flags = NLM_F_REQUEST | NLM_F_ACK;
++    req.nh.nlmsg_seq   = 1;
++    req.nh.nlmsg_pid   = getpid();
++
++    req.ifi.ifi_family = AF_UNSPEC;
++    req.ifi.ifi_index  = ifidx;
++    req.ifi.ifi_flags  = flags;
++    req.ifi.ifi_change = change;
++
++    if (send(fd, &req, req.nh.nlmsg_len, 0) < 0) {
++        close(fd);
++		slog(LOG_CRIT,"NETLINK Send Failed\n");
++        return ERROR_REJECT;
++    }
++
++    /* Receive ACK */
++    return netlink_wait_for_ack(fd);
++}
++
++/**
++ * @brief Modyfy interface address via Netlink
++ * 
++ * This function connects to the Netlink socket and sends a request to add or
++ * delete an IP address on the specified network interface.
++ * 
++ * @param ifidx The index of the network interface
++ * @param af_family The address family (e.g., AF_INET or AF_INET6
++ * @param addr The IP address in in_addr or in6_addr format
++ * @param prefixlen The prefix length of the IP address
++ * @param add 1 to add or 0 to delete the address
++ */
++int netlink_addr_modify(int ifidx,
++                        int af_family,
++						const void *addr,
++                        int prefixlen,
++                        int add)
++{
++    int fd;
++    char buf[256];
++    struct nlmsghdr *nh;
++    struct ifaddrmsg *ifa;
++    struct rtattr *rta;
++    size_t addrlen;
++
++
++    if (af_family == AF_INET) addrlen = sizeof(struct in_addr);
++    else addrlen = sizeof(struct in6_addr);
++
++	/* Open socket */
++    fd = socket(AF_NETLINK, SOCK_RAW, NETLINK_ROUTE);
++    if (fd < 0) {
++		slog(LOG_CRIT,"NETLINK Socket Failed\n");
++        return ERROR_REJECT;
++	}
++
++    memset(buf, 0, sizeof(buf));
++
++	nh = (struct nlmsghdr *)buf;
++    nh->nlmsg_len   = NLMSG_LENGTH(sizeof(*ifa));
++    nh->nlmsg_type  = add ? RTM_NEWADDR : RTM_DELADDR;
++    nh->nlmsg_flags = NLM_F_REQUEST | NLM_F_ACK |
++                      (add ? NLM_F_CREATE | NLM_F_REPLACE : 0);
++    nh->nlmsg_seq   = 1;
++    nh->nlmsg_pid   = getpid();
++
++    ifa = NLMSG_DATA(nh);
++    ifa->ifa_family    = af_family;
++    ifa->ifa_prefixlen = prefixlen;
++    ifa->ifa_scope     = RT_SCOPE_UNIVERSE;
++    ifa->ifa_index     = ifidx;
++
++    /* IFA_ADDRESS */
++    rta = (struct rtattr *)((char *)nh + NLMSG_ALIGN(nh->nlmsg_len));
++    rta->rta_type = IFA_ADDRESS;
++    rta->rta_len  = RTA_LENGTH(addrlen);
++    memcpy(RTA_DATA(rta), addr, addrlen);
++    nh->nlmsg_len = NLMSG_ALIGN(nh->nlmsg_len) + rta->rta_len;
++
++    /* IFA_LOCAL only meaningful for IPv4 */
++    if (af_family == AF_INET) {
++        rta = (struct rtattr *)((char *)nh + NLMSG_ALIGN(nh->nlmsg_len));
++        rta->rta_type = IFA_LOCAL;
++        rta->rta_len  = RTA_LENGTH(addrlen);
++        memcpy(RTA_DATA(rta), addr, addrlen);
++        nh->nlmsg_len = NLMSG_ALIGN(nh->nlmsg_len) + rta->rta_len;
++    }
++
++    if (send(fd, nh, nh->nlmsg_len, 0) < 0) {
++        close(fd);
++		slog(LOG_CRIT,"NETLINK Send Failed\n");
++        return ERROR_REJECT;
++    }
++
++    /* Receive ACK */
++    return netlink_wait_for_ack(fd);
++}
++
++/**
++ * @brief Modyfy interface routes via Netlink
++ * 
++ * This function connects to the Netlink socket and sends a request to add or
++ * delete a route to the specified network interface.
++ * 
++ * @param ifidx The index of the network interface
++ * @param af_family The address family (e.g., AF_INET or AF_INET6
++ * @param dst The route destination in in_addr or in6_addr format
++ * @param prefixlen The prefix length of the route
++ * @param add 1 to add or 0 to delete the route
++ */
++int netlink_route_dev_modify(int ifidx,
++							 int af_family,
++                             const void *dst,
++                             int prefixlen,
++                             int add)
++{
++    int fd;
++	char buf[256];
++    struct nlmsghdr *nh;
++    struct rtmsg *rtm;
++    struct rtattr *rta;
++    size_t addrlen;
++
++    if (af_family == AF_INET) addrlen = sizeof(struct in_addr);
++    else addrlen = sizeof(struct in6_addr);
++
++    fd = socket(AF_NETLINK, SOCK_RAW, NETLINK_ROUTE);
++    if (fd < 0) {
++		slog(LOG_CRIT,"NETLINK Socket Failed\n");
++        return ERROR_REJECT;
++	}
++
++    memset(buf, 0, sizeof(buf));
++
++    /* Netlink header */
++    nh = (struct nlmsghdr *)buf;
++    nh->nlmsg_len   = NLMSG_LENGTH(sizeof(*rtm));
++    nh->nlmsg_type  = add ? RTM_NEWROUTE : RTM_DELROUTE;
++    nh->nlmsg_flags = NLM_F_REQUEST | NLM_F_ACK |
++                      (add ? NLM_F_CREATE | NLM_F_REPLACE : 0);
++    nh->nlmsg_seq   = 1;
++    nh->nlmsg_pid   = getpid();
++
++    /* Route message */
++    rtm = NLMSG_DATA(nh);
++    rtm->rtm_family   = af_family;
++    rtm->rtm_table    = RT_TABLE_MAIN;
++    rtm->rtm_protocol = RTPROT_BOOT;
++    rtm->rtm_scope    = RT_SCOPE_LINK;
++    rtm->rtm_type     = RTN_UNICAST;
++    rtm->rtm_dst_len  = prefixlen;
++
++	/* Destination */
++	rta = (struct rtattr *)((char *)nh + NLMSG_ALIGN(nh->nlmsg_len));
++	rta->rta_type = RTA_DST;
++	rta->rta_len  = RTA_LENGTH(addrlen);
++	memcpy(RTA_DATA(rta), dst, addrlen);
++	nh->nlmsg_len = NLMSG_ALIGN(nh->nlmsg_len) + rta->rta_len;
++
++    /* Output interface */
++    rta = (struct rtattr *)((char *)nh + NLMSG_ALIGN(nh->nlmsg_len));
++    rta->rta_type = RTA_OIF;
++    rta->rta_len  = RTA_LENGTH(sizeof(ifidx));
++    memcpy(RTA_DATA(rta), &ifidx, sizeof(ifidx));
++    nh->nlmsg_len = NLMSG_ALIGN(nh->nlmsg_len) + rta->rta_len;
++
++    /* Send */
++    if (send(fd, nh, nh->nlmsg_len, 0) < 0) {
++        close(fd);
++		slog(LOG_CRIT,"NETLINK Send Failed\n");
++        return ERROR_REJECT;
++    }
++
++    /* Receive ACK */
++	return netlink_wait_for_ack(fd);
++}
++
++
++
++int set_nonblock(int fd)
++{
++	int flags;
++
++	flags = fcntl(fd, F_GETFL);
++	if (flags < 0) {
++		slog(LOG_CRIT, "fcntl F_GETFL returned %s\n", strerror(errno));
++		return ERROR_REJECT;
++	}
++	flags |= O_NONBLOCK;
++	if (fcntl(fd, F_SETFL, flags) < 0) {
++		slog(LOG_CRIT, "fcntl F_SETFL returned %s\n", strerror(errno));
++		return ERROR_REJECT;
++	}
++    return 0;
++}
++
++#ifdef __linux__
++int tun_setup(int do_mktun, int do_rmtun)
++{
++	struct ifreq ifr;
++	int fd;
++
++	gcfg->tun_fd = open("/dev/net/tun", O_RDWR);
++	if (gcfg->tun_fd < 0) {
++		slog(LOG_CRIT, "Unable to open /dev/net/tun, aborting: %s\n",
++				strerror(errno));
++		return ERROR_REJECT;
++	}
++
++	memset(&ifr, 0, sizeof(ifr));
++	ifr.ifr_flags = IFF_TUN;
++	strcpy(ifr.ifr_name, gcfg->tundev);
++	if (ioctl(gcfg->tun_fd, TUNSETIFF, &ifr) < 0) {
++		slog(LOG_CRIT, "Unable to attach tun device %s, aborting: "
++				"%s\n", gcfg->tundev, strerror(errno));
++		return ERROR_REJECT;
++	}
++
++	if (do_mktun) {
++		if (ioctl(gcfg->tun_fd, TUNSETPERSIST, 1) < 0) {
++			slog(LOG_CRIT, "Unable to set persist flag on %s, "
++					"aborting: %s\n", gcfg->tundev,
++					strerror(errno));
++			return ERROR_REJECT;
++		}
++		if (ioctl(gcfg->tun_fd, TUNSETOWNER, 0) < 0) {
++			slog(LOG_CRIT, "Unable to set owner on %s, "
++					"aborting: %s\n", gcfg->tundev,
++					strerror(errno));
++			return ERROR_REJECT;
++		}
++		if (ioctl(gcfg->tun_fd, TUNSETGROUP, 0) < 0) {
++			slog(LOG_CRIT, "Unable to set group on %s, "
++					"aborting: %s\n", gcfg->tundev,
++					strerror(errno));
++			return ERROR_REJECT;
++		}
++		slog(LOG_NOTICE, "Created persistent tun device %s\n",
++				gcfg->tundev);
++		return 0;
++	} else if (do_rmtun) {
++		if (ioctl(gcfg->tun_fd, TUNSETPERSIST, 0) < 0) {
++			slog(LOG_CRIT, "Unable to clear persist flag on %s, "
++					"aborting: %s\n", gcfg->tundev,
++					strerror(errno));
++			return ERROR_REJECT;
++		}
++		slog(LOG_NOTICE, "Removed persistent tun device %s\n",
++				gcfg->tundev);
++		return 0;
++	}
++
++	if(set_nonblock(gcfg->tun_fd)) return ERROR_REJECT;
++
++	fd = socket(PF_INET, SOCK_DGRAM, 0);
++	if (fd < 0) {
++		slog(LOG_CRIT, "Unable to create socket, aborting: %s\n",
++				strerror(errno));
++		return ERROR_REJECT;
++	}
++
++	/* Query MTU from tun adapter */
++	memset(&ifr, 0, sizeof(ifr));
++	strcpy(ifr.ifr_name, gcfg->tundev);
++	if (ioctl(fd, SIOCGIFMTU, &ifr) < 0) {
++		slog(LOG_CRIT, "Unable to query MTU, aborting: %s\n",
++				strerror(errno));
++		return ERROR_REJECT;
++	}
++	close(fd);
++
++	/* MTU is less than 1280, not allowed */
++	gcfg->mtu = ifr.ifr_mtu;
++	if(gcfg->mtu < MTU_MIN) {
++		slog(LOG_CRIT, "MTU of %d is too small, must be at least %d\n",
++				gcfg->mtu, MTU_MIN);
++		return ERROR_REJECT;
++	}
++
++	slog(LOG_INFO, "Using tun device %s with MTU %d\n", gcfg->tundev,
++			gcfg->mtu);
++
++	/* Get our own device ID for the tun setup operations */
++	int ifidx = if_nametoindex(gcfg->tundev);
++
++    if (ifidx == 0) {
++		slog(LOG_INFO, "Failed to get if idx from tun device %s\n",gcfg->tundev);
++		return ERROR_REJECT;
++    }
++	/* Bring tun device up */
++	if(gcfg->tun_up) {
++		if(netlink_set_if_flags(ifidx,IFF_UP,IFF_UP)) return ERROR_REJECT;
++		slog(LOG_INFO, "Tun device %s is UP\n",gcfg->tundev);
++	}
++
++	/* Add IPs to the tun dev */
++	char addrbuf[64];
++	struct list_head *entry;
++	list_for_each(entry, &gcfg->tun_ip4_list) {
++		struct tun_ip4 *ip4;
++		ip4 = list_entry(entry, struct tun_ip4, list);
++		if(netlink_addr_modify(ifidx,AF_INET,&ip4->addr,
++				ip4->prefix_len,1)) return ERROR_REJECT;
++		slog(LOG_INFO, "Added IPv4 address %s/%d to tun device %s\n",
++			inet_ntop(AF_INET,&ip4->addr,addrbuf,64),
++			ip4->prefix_len,gcfg->tundev);
++	}
++	list_for_each(entry, &gcfg->tun_ip6_list) {
++		struct tun_ip6 *ip6;
++		ip6 = list_entry(entry, struct tun_ip6, list);
++		if(netlink_addr_modify(ifidx,AF_INET6,&ip6->addr,
++				ip6->prefix_len,1)) return ERROR_REJECT;
++		slog(LOG_INFO, "Added IPv6 address %s/%d to tun device %s\n",
++			inet_ntop(AF_INET6,&ip6->addr,addrbuf,128),
++			ip6->prefix_len,gcfg->tundev);
++	}
++
++	/* Add routes to the tun dev */
++	list_for_each(entry, &gcfg->tun_rt4_list) {
++		struct tun_ip4 *ip4;
++		ip4 = list_entry(entry, struct tun_ip4, list);
++		if(netlink_route_dev_modify(ifidx,AF_INET,&ip4->addr,
++				ip4->prefix_len,1)) return ERROR_REJECT;
++		slog(LOG_INFO, "Added IPv4 route %s/%d to tun device %s\n",
++			inet_ntop(AF_INET,&ip4->addr,addrbuf,64),
++			ip4->prefix_len,gcfg->tundev);
++	}
++	list_for_each(entry, &gcfg->tun_rt6_list) {
++		struct tun_ip6 *ip6;
++		ip6 = list_entry(entry, struct tun_ip6, list);
++		if(netlink_route_dev_modify(ifidx,AF_INET6,&ip6->addr,
++				ip6->prefix_len,1)) return ERROR_REJECT;
++		slog(LOG_INFO, "Added IPv6 route %s/%d to tun device %s\n",
++			inet_ntop(AF_INET6,&ip6->addr,addrbuf,128),
++			ip6->prefix_len,gcfg->tundev);
++	}
++
++    return 0;
++}
++#endif /* ifdef __linux__ */
++
++#ifdef __FreeBSD__
++int tun_setup(int do_mktun, int do_rmtun)
++{
++	struct ifreq ifr;
++	int fd, do_rename = 0, multi_af;
++	char devname[64];
++
++	if (strncmp(gcfg->tundev, "tun", 3))
++		do_rename = 1;
++
++	if ((do_mktun || do_rmtun) && do_rename)
++	{
++		slog(LOG_CRIT,
++			"tunnel interface name needs to match tun[0-9]+ pattern "
++				"for --mktun to work\n");
++		return ERROR_REJECT;
++	}
++
++	snprintf(devname, sizeof(devname), "/dev/%s", do_rename ? "tun" : gcfg->tundev);
++
++	gcfg->tun_fd = open(devname, O_RDWR);
++	if (gcfg->tun_fd < 0) {
++		slog(LOG_CRIT, "Unable to open %s, aborting: %s\n",
++				devname, strerror(errno));
++		return ERROR_REJECT;
++	}
++
++	if (do_mktun) {
++		slog(LOG_NOTICE, "Created persistent tun device %s\n",
++				gcfg->tundev);
++		return;
++	} else if (do_rmtun) {
++
++		/* Close socket before removal */
++		close(gcfg->tun_fd);
++
++		fd = socket(PF_INET, SOCK_DGRAM, 0);
++		if (fd < 0) {
++			slog(LOG_CRIT, "Unable to create control socket, aborting: %s\n",
++					strerror(errno));
++			return ERROR_REJECT;
++		}
++
++		memset(&ifr, 0, sizeof(ifr));
++		strcpy(ifr.ifr_name, gcfg->tundev);
++		if (ioctl(fd, SIOCIFDESTROY, &ifr) < 0) {
++			slog(LOG_CRIT, "Unable to destroy interface %s, aborting: %s\n",
++					gcfg->tundev, strerror(errno));
++			return ERROR_REJECT;
++		}
++
++		close(fd);
++
++		slog(LOG_NOTICE, "Removed persistent tun device %s\n",
++				gcfg->tundev);
++		return;
++	}
++
++	/* Set multi-AF mode */
++	multi_af = 1;
++	if (ioctl(gcfg->tun_fd, TUNSIFHEAD, &multi_af) < 0) {
++			slog(LOG_CRIT, "Unable to set multi-AF on %s, "
++					"aborting: %s\n", gcfg->tundev,
++					strerror(errno));
++			return ERROR_REJECT;
++	}
++
++	slog(LOG_CRIT, "Multi-AF mode set on %s\n", gcfg->tundev);
++
++	if(set_nonblock(gcfg->tun_fd)) return ERROR_REJECT;
++
++	fd = socket(PF_INET, SOCK_DGRAM, 0);
++	if (fd < 0) {
++		slog(LOG_CRIT, "Unable to create socket, aborting: %s\n",
++				strerror(errno));
++		return ERROR_REJECT;
++	}
++
++	if (do_rename) {
++		memset(&ifr, 0, sizeof(ifr));
++		strcpy(ifr.ifr_name, fdevname(gcfg->tun_fd));
++		ifr.ifr_data = gcfg->tundev;
++		if (ioctl(fd, SIOCSIFNAME, &ifr) < 0) {
++			slog(LOG_CRIT, "Unable to rename interface %s to %s, aborting: %s\n",
++					fdevname(gcfg->tun_fd), gcfg->tundev,
++					strerror(errno));
++			return ERROR_REJECT;
++		}
++	}
++
++	memset(&ifr, 0, sizeof(ifr));
++	strcpy(ifr.ifr_name, gcfg->tundev);
++	if (ioctl(fd, SIOCGIFMTU, &ifr) < 0) {
++		slog(LOG_CRIT, "Unable to query MTU, aborting: %s\n",
++				strerror(errno));
++		return ERROR_REJECT;
++	}
++	close(fd);
++
++	gcfg->mtu = ifr.ifr_mtu;
++
++	slog(LOG_INFO, "Using tun device %s with MTU %d\n", gcfg->tundev,
++			gcfg->mtu);
++    return 0;
++}
++#endif
++
++
++void tun_read(void)
++{
++	int ret;
++	struct tun_pi *pi = (struct tun_pi *)gcfg->recv_buf;
++	struct pkt pbuf, *p = &pbuf;
++
++	ret = read(gcfg->tun_fd, gcfg->recv_buf, gcfg->recv_buf_size);
++	if (ret < 0) {
++		if (errno == EAGAIN)
++			return;
++		slog(LOG_ERR, "received error when reading from tun "
++				"device: %s\n", strerror(errno));
++		return;
++	}
++	if ((size_t)ret < sizeof(struct tun_pi)) {
++		slog(LOG_WARNING, "short read from tun device "
++				"(%d bytes)\n", ret);
++		return;
++	}
++	if ((uint32_t)ret == gcfg->recv_buf_size) {
++		slog(LOG_WARNING, "dropping oversized packet\n");
++		return;
++	}
++	memset(p, 0, sizeof(struct pkt));
++	p->data = gcfg->recv_buf + sizeof(struct tun_pi);
++	p->data_len = ret - sizeof(struct tun_pi);
++	switch (TUN_GET_PROTO(pi)) {
++	case ETH_P_IP:
++		handle_ip4(p);
++		break;
++	case ETH_P_IPV6:
++		handle_ip6(p);
++		break;
++	default:
++		slog(LOG_WARNING, "Dropping unknown proto %04x from "
++				"tun device\n", ntohs(pi->proto));
++		break;
++	}
++}
+\ No newline at end of file

diff --git a/tayga-0.9.6_d0bb1a4a.patch b/tayga-0.9.6_d0bb1a4a.patch
new file mode 100644
index 0000000..aa1b466
--- /dev/null
+++ b/tayga-0.9.6_d0bb1a4a.patch
@@ -0,0 +1,348 @@
+commit d0bb1a4ad05a6d701fe70a80f1d0e651a8f53292
+Author: Andrew <apalrd@users.noreply.github.com>
+Date:   Mon Jan 26 10:03:05 2026 -0500
+
+    Transport Layer Checksum (#164)
+    
+    * add udp-cksum-mode to test environment
+    
+    * section 4.5 checksum adjustments
+    
+    * section 5.5 checksum adjustments
+    
+    * fix ipv4 + udp psuedo-checksum
+
+diff --git a/nat64.c b/nat64.c
+index 1d636f8..92a9acd 100644
+--- a/nat64.c
++++ b/nat64.c
+@@ -153,6 +153,25 @@ static inline uint16_t ones_add(uint16_t a, uint16_t b)
+ 	return ~((sum & 0xffff) + (sum >> 16));
+ }
+ 
++
++static uint16_t ip4_checksum(struct ip4 *ip4, uint32_t data_len, uint8_t proto)
++{
++	uint32_t sum = 0;
++	uint16_t *p;
++	int i;
++
++	for (i = 0, p = (uint16_t *)&ip4->src; i < 4; ++i)
++		sum += *p++;
++	sum += htonl(data_len) >> 16;
++	sum += htonl(data_len) & 0xffff;
++	sum += htons(proto);
++
++	while (sum > 0xffff)
++		sum = (sum & 0xffff) + (sum >> 16);
++
++	return ~sum;
++}
++
+ static uint16_t ip6_checksum(struct ip6 *ip6, uint32_t data_len, uint8_t proto)
+ {
+ 	uint32_t sum = 0;
+@@ -916,7 +935,7 @@ static int xlate_payload_6to4(struct pkt *p, struct ip4 *ip4, int em)
+ 			case UDP_CKSUM_CALC:
+ 				/* Calculate a real UDP checksum, now */
+ 				*tck = ones_add(ip_checksum(p->data,p->data_len), /* Body */
+-								ip_checksum(ip4,20));			  /* IP4 header */
++								ip4_checksum(ip4,p->data_len,p->data_proto));		/* IP4 psuedo-header */
+ 				return ERROR_NONE;
+ 			}
+ 		}
+diff --git a/test/test_env.py b/test/test_env.py
+index 1f6ae87..50338b2 100755
+--- a/test/test_env.py
++++ b/test/test_env.py
+@@ -130,6 +130,7 @@ class confgen:
+         self.map.append("172.16.0.2 2001:db8::2")
+         self.log = "drop reject icmp self"
+         self.offlink_mtu = 0
++        self.udp_cksum_mode = None
+ 
+     def generate(self):
+         with open("test/tayga.conf", 'w') as conf_file:
+@@ -153,6 +154,8 @@ class confgen:
+             if self.offlink_mtu > 0:
+                 print("Setting offlink MTU to "+str(self.offlink_mtu))
+                 conf_file.write("offlink-mtu "+str(self.offlink_mtu)+"\n")
++            if self.udp_cksum_mode is not None:
++                conf_file.write("udp-cksum-mode "+self.udp_cksum_mode+"\n")
+ 
+ 
+ 
+diff --git a/test/translate.py b/test/translate.py
+index 05ee4f5..0f8851d 100644
+--- a/test/translate.py
++++ b/test/translate.py
+@@ -12,7 +12,7 @@ from test_env import (
+     router,
+ )
+ from random import randbytes
+-from scapy.all import IP, ICMP, UDP, IPv6, Raw
++from scapy.all import IP, ICMP, UDP, IPv6, Raw, TCP
+ from scapy.layers.inet6 import (
+     ICMPv6DestUnreach,
+     ICMPv6PacketTooBig,
+@@ -50,6 +50,7 @@ expect_seq = -1
+ expect_mtu = -1
+ expect_sa = ""
+ expect_da = ""
++expect_csum = -1
+ def icmp4_val(pkt):
+     res = test_result()
+     res.check("Contains IP",pkt.haslayer(IP))
+@@ -70,6 +71,8 @@ def icmp4_val(pkt):
+         res.compare("MTU",pkt[ICMP].nexthopmtu,expect_mtu)
+     if expect_ptr >= 0:
+         res.compare("PTR",pkt[ICMP].ptr,expect_ptr)
++    if expect_csum >= 0:
++        res.compare("Checksum",pkt[ICMP].chksum,expect_csum)
+     return res
+ 
+ ####
+@@ -122,6 +125,19 @@ def ip6_val(pkt):
+             res.compare("Payload",pkt[Raw].load,expect_data[0:expect_len],print=False)
+         else:
+             res.compare("Payload",pkt[Raw].load,expect_data,print=False)
++    if expect_csum < 0:
++        pass
++    elif pkt.haslayer(TCP):
++        res.compare("Checksum TCP",pkt[TCP].chksum,expect_csum)
++    elif pkt.haslayer(UDP):
++        res.compare("Checksum UDP",pkt[UDP].chksum,expect_csum)
++    elif pkt.haslayer(ICMPv6EchoRequest):
++        res.compare("Checksum ICMPv6",pkt[ICMPv6EchoRequest].cksum,expect_csum)
++    elif pkt.haslayer(ICMPv6EchoReply):
++        res.compare("Checksum ICMPv6",pkt[ICMPv6EchoReply].cksum,expect_csum)
++    else:
++        res.expect("Checksum Non-TCP/UDP/ICMPv6",False,"Cannot check checksum on non-TCP/UDP/ICMPv6 packet")
++
+     if expect_ref is not None:
+         res.compare("TC",pkt[IPv6].tc,expect_ref.tos)
+         res.compare("FL",pkt[IPv6].fl,expect_fl)
+@@ -141,7 +157,10 @@ def ip6_val(pkt):
+             res.compare("[frag]M",pkt[IPv6ExtHdrFragment].m,1)
+             res.compare("[frag]id",pkt[IPv6ExtHdrFragment].id,expect_id)
+         else:
+-            res.compare("NH",pkt[IPv6].nh,expect_ref.proto)
++            if expect_ref.proto == 1:
++                res.compare("NH",pkt[IPv6].nh,58)
++            else:
++                res.compare("NH",pkt[IPv6].nh,expect_ref.proto)
+         res.compare("HLIM",pkt[IPv6].hlim,expect_ref.ttl-3)
+     return res
+ 
+@@ -255,6 +274,15 @@ def ip_val(pkt):
+     res.compare("Src",pkt[IP].src,str(expect_sa))
+     res.compare("Dest",pkt[IP].dst,str(expect_da))
+     res.compare("Payload",pkt[Raw].load,expect_ref[Raw].load)
++    # If checksum expected, check it
++    if expect_csum < 0:
++        pass
++    elif pkt.haslayer(TCP):
++        res.compare("Checksum TCP",pkt[TCP].chksum,expect_csum)
++    elif pkt.haslayer(UDP):
++        res.compare("Checksum UDP",pkt[UDP].chksum,expect_csum)
++    else:
++        res.expect("Checksum Non-TCP/UDP/ICMP",False,"Cannot check checksum on non-TCP/UDP/ICMP packet")
+     return res
+ 
+ 
+@@ -1138,28 +1166,83 @@ def sec_4_4():
+ #############################################
+ def sec_4_5():
+     global test
++    global expect_sa
++    global expect_da
++    global expect_data
++    global expect_ref
++    global expect_len
++    global expect_frag
++    global expect_id
++    global expect_csum
+     # Setup config for this section
+     test.tayga_conf.default()
++    test.tayga_conf.udp_cksum_mode = "drop"
+     test.reload()
+ 
+     # TCP Header
+-    test.tfail("TCP Header","Not Implemented")
++    # Using well-known TCP packet payloads and manually calculated checksums
++    expect_data = bytes([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15])
++    expect_sa = test.public_ipv4_xlate
++    expect_da = test.public_ipv6
++    expect_len = 20+16
++    expect_ref = IP(dst=str(test.public_ipv6_xlate),src=str(test.public_ipv4)) \
++        / TCP(sport=666,dport=667,flags="S",seq=420) \
++        / Raw(expect_data)
++    expect_csum = 48368 #manually calculated
++    test.send_and_check(expect_ref,ip6_val, "TCP Header")
+ 
+     # UDP Header w/ checksum
+-    test.tfail("UDP Header w/ checksum","Not Implemented")
+-
++    expect_len = 8+16
++    expect_ref = IP(dst=str(test.public_ipv6_xlate),src=str(test.public_ipv4)) \
++        / UDP(sport=666,dport=667) \
++        / Raw(expect_data)
++    expect_csum = 11904 #manually calculated
++    test.send_and_check(expect_ref,ip6_val, "UDP Header w/ checksum")
++    
+     # UDP Header w/o checksum w/ drop behavior
+-    test.tfail("UDP Header w/o checksum, drop","Not Implemented")
++    expect_ref = IP(dst=str(test.public_ipv6_xlate),src=str(test.public_ipv4)) \
++        / UDP(sport=666,dport=667,chksum=0) \
++        / Raw(expect_data)
++    test.send_and_none(expect_ref, "UDP Header w/o checksum, drop")
++
+     # UDP Header w/o checksum w/ forward behavior
+-    test.tfail("UDP Header w/o checksum, forward","Not Implemented")
+-    # UDP Header w/o checksum w/ calculate behavior
+-    test.tfail("UDP Header w/o checksum, calculate","Not Implemented")
++    test.tayga_conf.default()
++    test.tayga_conf.udp_cksum_mode = "fwd"
++    test.reload()
++    expect_ref = IP(dst=str(test.public_ipv6_xlate),src=str(test.public_ipv4)) \
++        / UDP(sport=666,dport=667,chksum=0) \
++        / Raw(expect_data)
++    expect_csum = 0
++    test.send_and_check(expect_ref, ip6_val,"UDP Header w/o checksum, forward")
+ 
+-    # ICMP Header
+-    test.tfail("ICMP Header","Not Implemented")
++    # UDP Header w/o checksum w/ calculate behavior
++    test.tayga_conf.default()
++    test.tayga_conf.udp_cksum_mode = "calc"
++    test.reload()
++    expect_ref = IP(dst=str(test.public_ipv6_xlate),src=str(test.public_ipv4)) \
++        / UDP(sport=666,dport=667,chksum=0) \
++        / Raw(expect_data)
++    expect_csum = 11904
++    test.send_and_check(expect_ref, ip6_val,"UDP Header w/o checksum, calculate")
+ 
+-    # No other protocols are required, but we may want to test them
+-    test.tfail("Other Protocols","Not Implemented")
++    # ICMP Headers
++    expect_data = None
++    expect_len = 8
++    expect_proto = 58
++    expect_ref = IP(dst=str(test.public_ipv6_xlate),src=str(test.public_ipv4)) / ICMP(type=8,code=0,id=22,seq=9)
++    expect_csum = 60372
++    test.send_and_check(expect_ref, ip6_val,"ICMP Echo Request")
++    expect_ref = IP(dst=str(test.public_ipv6_xlate),src=str(test.public_ipv4)) / ICMP(type=0,code=0,id=23,seq=19)
++    expect_csum = 60105
++    test.send_and_check(expect_ref, ip6_val,"ICMP Echo Reply")
++
++    #Scapy was used with show2() which generates expected checksums, such as this:
++    #expect_equiv = IPv6(dst=str(test.public_ipv6),src=str(test.public_ipv4_xlate)) /ICMPv6EchoRequest(id=22,seq=9)
++    #expect_equiv.show2()
++
++    #clear expected
++    expect_csum = -1
++    expect_len = -1
+ 
+     test.section("Transport-Layer Header (RFC 7915 4.5)")
+ #############################################
+@@ -1720,25 +1803,87 @@ def sec_5_4():
+ #############################################
+ def sec_5_5():
+     global test
++    global expect_sa
++    global expect_da
++    global expect_data
++    global expect_ref
++    global expect_len
++    global expect_frag
++    global expect_id
++    global expect_csum
++    global expect_type
++    global expect_code
++
+     # Setup config for this section
+     test.tayga_conf.default()
++    test.tayga_conf.udp_cksum_mode = "drop"
+     test.reload()
+ 
+     # TCP Header
+-    test.tfail("TCP Header","Not Implemented")
++    # Using well-known TCP packet payloads and manually calculated checksums
++    expect_data = bytes([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15])
++    expect_sa = test.public_ipv6_xlate
++    expect_da = test.public_ipv4
++    expect_ref = IPv6(dst=str(test.public_ipv4_xlate),src=str(test.public_ipv6),plen=20+16) \
++        / TCP(sport=666,dport=667,flags="S",seq=420) \
++        / Raw(expect_data)
++    expect_csum = 58108 #manually calculated
++    test.send_and_check(expect_ref,ip_val, "TCP Header")
+ 
+     # UDP Header w/ checksum
+-    test.tfail("UDP Header w/ checksum","Not Implemented")
++    expect_ref = IPv6(dst=str(test.public_ipv4_xlate),src=str(test.public_ipv6),plen=8+16) \
++        / UDP(sport=666,dport=667) \
++        / Raw(expect_data)
++    expect_csum = 21644 #manually calculated
++    test.send_and_check(expect_ref,ip_val, "UDP Header w/ checksum")
+ 
+     # UDP Header w/o checksum w/ drop behavior
+-    test.tfail("UDP Header w/o checksum, drop","Not Implemented")
++    expect_ref = IPv6(dst=str(test.public_ipv4_xlate),src=str(test.public_ipv6),plen=8+16) \
++        / UDP(sport=666,dport=667,chksum=0) \
++        / Raw(expect_data)
++    expect_csum = 21644 #manually calculated
++    test.send_and_none(expect_ref, "UDP Header w/o checksum, drop")
++    
+     # UDP Header w/o checksum w/ forward behavior
+-    test.tfail("UDP Header w/o checksum, forward","Not Implemented")
++    test.tayga_conf.default()
++    test.tayga_conf.udp_cksum_mode = "fwd"
++    test.reload()
++    expect_ref = IPv6(dst=str(test.public_ipv4_xlate),src=str(test.public_ipv6),plen=8+16) \
++        / UDP(sport=666,dport=667,chksum=0) \
++        / Raw(expect_data)
++    expect_csum = 0 #manually calculated
++    test.send_and_check(expect_ref,ip_val, "UDP Header w/o checksum, forward")
++    
+     # UDP Header w/o checksum w/ calculate behavior
+-    test.tfail("UDP Header w/o checksum, calculate","Not Implemented")
++    test.tayga_conf.default()
++    test.tayga_conf.udp_cksum_mode = "calc"
++    test.reload()
++    expect_ref = IPv6(dst=str(test.public_ipv4_xlate),src=str(test.public_ipv6),plen=8+16) \
++        / UDP(sport=666,dport=667,chksum=0) \
++        / Raw(expect_data)
++    expect_csum = 21644 #manually calculated
++    test.send_and_check(expect_ref,ip_val, "UDP Header w/o checksum, calculate")
+ 
+     # ICMP Header
+-    test.tfail("ICMP Header","Not Implemented")
++    expect_type = 8
++    expect_code = 0
++    expect_ref = IPv6(dst=str(test.public_ipv4_xlate),src=str(test.public_ipv6)) / ICMPv6EchoRequest(id=15,seq=21)
++    expect_csum = 63451 #manually calculated
++    test.send_and_check(expect_ref,icmp4_val, "ICMP Header Echo Request")
++
++    expect_ref = IPv6(dst=str(test.public_ipv4_xlate),src=str(test.public_ipv6)) / ICMPv6EchoReply(id=16,seq=22)
++    expect_csum = 65497 #manually calculated
++    expect_type = 0
++    test.send_and_check(expect_ref,icmp4_val, "ICMP Header Echo Reply")
++
++    #equiv packet used to generate checksums
++    #expect_equiv = IP(dst=expect_da,src=expect_sa) / ICMP(type=0,id=16,seq=22)
++    #expect_equiv.show2()
++
++    #reset expecteds
++    expect_type = -1
++    expect_code = -1
++    expect_csum = -1
+ 
+     # No other protocols are required, but we may want to test them   
+     test.section("Transport-Layer Header (RFC 7915 5.5)")
+@@ -1801,5 +1946,5 @@ time.sleep(1)
+ 
+ test.cleanup()
+ #Print test report (expected pass/fail count)
+-test.report(232,14)
++test.report(246,1)
+ 

diff --git a/tayga-0.9.6_ee5f898e.patch b/tayga-0.9.6_ee5f898e.patch
new file mode 100644
index 0000000..7245a17
--- /dev/null
+++ b/tayga-0.9.6_ee5f898e.patch
@@ -0,0 +1,1673 @@
+commit ee5f898e28f1439f7b28112f1bcfff6ec71e6a0f
+Author: Götz Görisch <47734341+GoetzGoerisch@users.noreply.github.com>
+Date:   Mon Jan 5 13:36:07 2026 +0100
+
+    linting of documentation (#160)
+    
+    * linting of documentation
+    
+    Fixes links and lints the markdown files
+    
+    Signed-off-by: Goetz Goerisch <ggoerisch@gmail.com>
+    
+    * refactor: align casing of TAYGA and tayga
+    
+    Signed-off-by: Goetz Goerisch <ggoerisch@gmail.com>
+    
+    * refactor: linting of documentation
+    
+    Signed-off-by: Goetz Goerisch <ggoerisch@gmail.com>
+    
+    * refactor: align DS-Lite wording
+    
+    Signed-off-by: Goetz Goerisch <ggoerisch@gmail.com>
+    
+    ---------
+    
+    Signed-off-by: Goetz Goerisch <ggoerisch@gmail.com>
+
+diff --git a/README.md b/README.md
+index 44e19b9..d774734 100644
+--- a/README.md
++++ b/README.md
+@@ -1,18 +1,18 @@
+ # TAYGA
+ 
+-TAYGA is an out-of-kernel stateless NAT64 implementation for Linux and FreeBSD.  It uses the TUN driver to exchange packets with the kernel, which is the same driver used by OpenVPN and QEMU/KVM.  TAYGA needs no kernel patches or out-of-tree modules on either Linux or FreeBSD. 
++TAYGA is an out-of-kernel stateless NAT64 implementation for Linux and FreeBSD.  It uses the TUN driver to exchange packets with the kernel, which is the same driver used by OpenVPN and QEMU/KVM.  TAYGA needs no kernel patches or out-of-tree modules on either Linux or FreeBSD.
+ 
+-Tayga was originally developed by Nathan Lutchansky (litech.org) through version 0.9.2. Following the last release in 2011, Tayga was mainatined by several Linux distributions independently, including patches from the Debian project, and FreeBSD. These patches have been collected and merged together, and is now maintained from @apalrd and from contributors here on Github. 
++TAYGA was originally developed by Nathan Lutchansky [(litech.org)](http://www.litech.org/tayga/) through version `0.9.2`. Following the last release in 2011, TAYGA was mainatined by several Linux distributions independently, including patches from the Debian project, and FreeBSD. These patches have been collected and merged together, and is now maintained from [@apalrd](https://github.com/apalrd) and from contributors here on Github.
+ 
+-If you are interested in the mechanics of NAT64 and Stateless IP / ICMP Translation, see the [overview on the docs page](docs/index.md). 
++If you are interested in the mechanics of NAT64 and Stateless IP / ICMP Translation, see the [overview on the docs page](docs/README.md).
+ 
+-# Installation & Basic Configuration
++## Installation & Basic Configuration
+ 
+-Pre-built statically linked binaries are available from the [Releases] for amd64 and arm64 architectures. Container images are also available.
++Pre-built statically linked binaries are available from [Releases](https://github.com/apalrd/tayga/releases) for `amd64` and `arm64` architectures. Container images are also available.
+ 
+-# Compiling
++## Compiling
+ 
+-TAYGA requires GNU make to build. If you would like to run the test suite, see [Test Documentation](test/index.md) for additional dependencies. 
++`tayga` requires GNU `make` to build. If you would like to run the test suite, see [Test Documentation](test/index.md) for additional dependencies.
+ 
+ ```sh
+ git clone git@github.com:apalrd/tayga.git
+@@ -22,21 +22,21 @@ make
+ 
+ This will build the `tayga` executable in the current directory.
+ 
+-Next, if you would like dynamic maps to be persistent between TAYGA restarts, create a directory to store the dynamic.map file:
++Next, if you would like dynamic maps to be persistent between `tayga` restarts, create a directory to store the dynamic.map file:
+ 
+ ```sh
+ mkdir -p /var/db/tayga
+ ```
+ 
+-Now create your site-specific tayga.conf configuration file.  The installed tayga.conf.example file can be copied to tayga.conf and modified to suit your site. Additionally, many example configurations are available in the [docs](docs/index.md)
++Now create your site-specific `tayga.conf` configuration file.  The installed `tayga.conf.example` file can be copied to `tayga.conf` and modified to suit your site. Additionally, many example configurations are available in the [docs](docs/README.md))
+ 
+-Before starting the TAYGA daemon, the routing setup on your system will need to be changed to send IPv4 and IPv6 packets to TAYGA.  First create the TUN network interface:
++Before starting the `tayga` daemon, the routing setup on your system will need to be changed to send IPv4 and IPv6 packets to `tayga`.  First create the TUN network interface:
+ 
+ ```sh
+ tayga --mktun
+ ```
+ 
+-If TAYGA prints any errors, you will need to fix your config file before continuing. Otherwise, the new interface (`nat64` in this example) can be configured and the proper routes can be added to your system. 
++If `tayga` prints any errors, you will need to fix your config file before continuing. Otherwise, the new interface (`nat64` in this example) can be configured and the proper routes can be added to your system.
+ 
+ Firewalling your NAT64 prefix from outside access is highly recommended:
+ 
+@@ -45,7 +45,7 @@ ip6tables -A FORWARD -s 2001:db8:1::/48 -d 2001:db8:1:ffff::/96 -j ACCEPT
+ ip6tables -A FORWARD -d 2001:db8:1:ffff::/96 -j DROP
+ ```
+ 
+-At this point, you may start the tayga process:
++At this point, you may start the `tayga` process:
+ 
+ ```sh
+ tayga
+@@ -54,8 +54,8 @@ tayga
+ Check your system log (`/var/log/syslog` or `/var/log/messages`) for status
+ information.
+ 
+-If you are having difficulty configuring TAYGA, use the -d option to run the
+-tayga process in the foreground and send all log messages to stdout:
++If you are having difficulty configuring `tayga`, use the `-d` option to run the
++`tayga` process in the foreground and send all log messages to stdout:
+ 
+ ```sh
+ tayga -d
+diff --git a/docs/README.md b/docs/README.md
+index 8891a6c..6c1bc8f 100644
+--- a/docs/README.md
++++ b/docs/README.md
+@@ -1,6 +1,6 @@
+-# How to use Tayga
++# How to use TAYGA
+ 
+-If you just want to install / use Tayga, skip down to [Installation](#installation--basic-configuration)
++If you just want to install / use TAYGA, skip down to [Installation](#installation--basic-configuration)
+ 
+ ## Stateless versus Stateful NAT64
+ 
+@@ -84,9 +84,9 @@ carved out of the NAT64 prefix.)
+ The `log dyn` option allows the dynamic mapping assignments to be printed to the
+ service log, if your network requires this information
+ 
+-# Installation & Basic Configuration
++## Installation & Basic Configuration
+ 
+-TAYGA requires GNU make to build.
++`tayga` requires GNU `make` to build.
+ 
+ ```sh
+ git clone git@github.com:apalrd/tayga.git
+@@ -104,8 +104,8 @@ create a directory to store the dynamic.map file:
+ mkdir -p /var/db/tayga
+ ```
+ 
+-Now create your site-specific tayga.conf configuration file.  The installed
+-tayga.conf.example file can be copied to tayga.conf and modified to suit your
++Now create your site-specific `tayga.conf` configuration file.  The installed
++`tayga.conf.example` file can be copied to `tayga.conf` and modified to suit your
+ site.  Here is a sample minimal configuration:
+ 
+ ```ini
+@@ -118,16 +118,16 @@ data-dir /var/db/tayga          # omit if you do not need persistent
+                                 # dynamic address maps
+ ```
+ 
+-Before starting the TAYGA daemon, the routing setup on your system will need
+-to be changed to send IPv4 and IPv6 packets to TAYGA.  First create the TUN
++Before starting the `tayga` daemon, the routing setup on your system will need
++to be changed to send IPv4 and IPv6 packets to `tayga`.  First create the TUN
+ network interface:
+ 
+ ```sh
+ tayga --mktun
+ ```
+ 
+-If TAYGA prints any errors, you will need to fix your config file before
+-continuing.  Otherwise, the new nat64 interface can be configured and the
++If `tayga` prints any errors, you will need to fix your config file before
++continuing.  Otherwise, the new `nat64` interface can be configured and the
+ proper routes can be added to your system:
+ 
+ ```sh
+@@ -145,7 +145,7 @@ ip6tables -A FORWARD -s 2001:db8:1::/48 -d 2001:db8:1:ffff::/96 -j ACCEPT
+ ip6tables -A FORWARD -d 2001:db8:1:ffff::/96 -j DROP
+ ```
+ 
+-At this point, you may start the tayga process:
++At this point, you may start the `tayga` process:
+ 
+ ```sh
+ tayga
+@@ -154,17 +154,18 @@ tayga
+ Check your system log (`/var/log/syslog` or `/var/log/messages`) for status
+ information.
+ 
+-If you are having difficulty configuring TAYGA, use the -d option to run the
+-tayga process in the foreground and send all log messages to stdout:
++If you are having difficulty configuring `tayga`, use the `-d` option to run the
++`tayga` process in the foreground and send all log messages to stdout:
+ 
+ ```sh
+ tayga -d
+ ```
+ 
+-# Usage Guides
++## Usage Guides
++
+ Many example configurations are provided, each with an example `tayga.conf` as well as a shell script to launch the configuraton on Linux (assuming basic `iproute2` network setup and `iptables`). Feel free to reference all of these examples for your own configuration.
+ 
+ * [Stateful NAT64 and 464XLAT PLAT](nat64/README.md)
+ * [Stateless 464XLAT CLAT](clat/README.md)
+ * [Statelsss IP/ICMP Translation (SIIT-DC)](siit/README.md)
+-* [Container Docs](container/README.md) for using prebuilt Tayga containers
++* [Container Docs](container/README.md) for using prebuilt TAYGA containers
+diff --git a/docs/clat/README.md b/docs/clat/README.md
+index 1427b31..4567f4b 100644
+--- a/docs/clat/README.md
++++ b/docs/clat/README.md
+@@ -1,51 +1,59 @@
+ # Client-Side Translator (CLAT)
+ 
+-This example configures Tayga to perform stateless CLAT function, used in 464xlat. This provides IPv4 functionality to the local system, relying on the network to provide NAT64. 
++This example configures `tayga` to perform stateless CLAT function, used in 464xlat. This provides IPv4 functionality to the local system, relying on the network to provide NAT64.
+ 
+ None of these scripts are intended to be utilized as a best practice for actually running a CLAT. Details such as generaing random SLAAC addresses, duplicate address discovery, etc. are skipped to demonstrate the function of the CLAT.
+ 
+-In all cases, we require two addresses - one is used along with Tayga's `map` directive to map IPv4 user traffic to IPv6, the other is used by Tayga as its own address as the source of ICMPv6 error messages. For simplicity, all examples use two addresses in a `/127` pair (i.e. two addresses which differ only by their last bit).
++In all cases, we require two addresses - one is used along with `tayga`'s `map` directive to map IPv4 user traffic to IPv6, the other is used by `tayga` as its own address as the source of ICMPv6 error messages. For simplicity, all examples use two addresses in a `/127` pair (i.e. two addresses which differ only by their last bit).
+ 
+ ## 464XLAT Architecture
+-CLAT functionality may be seen as a specialized form of SIIT with exactly one mapping usable only by the local system. The translator (Tayga) performs address translation for exactly one IPv4 address, usually taken from the DSLite range (192.0.0.0/29) to exactly one IPv6 address. The local system is assigned an IP in the DSLite range, and uses this IP to communicate with Tayga and therefore the rest of the IPv4 internet. 464xlat is only designed to provide access to outgoing connections over IPv4, it is not designed for unsolicited incoming traffic, but traditional NAT traversal methods do work. Generally NAT64 devices can also be configured with explicit address mappings, allowing 464xlat to be used to carry unsolicited incoming traffic as well.
++
++CLAT functionality may be seen as a specialized form of SIIT with exactly one mapping usable only by the local system. The translator (TAYGA) performs address translation for exactly one IPv4 address, usually taken from the DS-Lite range (192.0.0.0/29) to exactly one IPv6 address. The local system is assigned an IP in the DS-Lite range, and uses this IP to communicate with `tayga` and therefore the rest of the IPv4 internet. 464xlat is only designed to provide access to outgoing connections over IPv4, it is not designed for unsolicited incoming traffic, but traditional NAT traversal methods do work. Generally NAT64 devices can also be configured with explicit address mappings, allowing 464xlat to be used to carry unsolicited incoming traffic as well.
+ 
+ ## Data Path
++
+ In this example, one interface is used:
++
+ * `eth0` represents the physical interface of the system, which is likely IPv6-only
+-* `clat` is the name of the tunnel interface created by Tayga
++* `clat` is the name of the tunnel interface created by `tayga`
+ 
+ In this example, the following IP addresses are used internally:
++
+ * `64:ff9b::/96` is used as the NAT64 prefix `pref64`
+ * `2001:db8:feed::/64` is used as the LAN subnet on `eth0`
+-* `192.0.0.0/29` is used as the translation subnet for the local system, as it is reserved for IPv4 to IPv6 transition technologies 
++* `192.0.0.0/29` is used as the translation subnet for the local system, as it is reserved for IPv4 to IPv6 transition technologies
+ * `192.0.0.1/29` is used as the IPv4 address of the local system
+-* `192.0.0.2/29` is used as the IPv4 address of Tayga itself
+-* The address of the IPv6-translated user traffic as well as IPv6 address of Tayga itself varies by implementation
++* `192.0.0.2/29` is used as the IPv4 address of tayga itself
++* The address of the IPv6-translated user traffic as well as IPv6 address of tayga itself varies by implementation
+ 
+ The architecture for all methods is the same (this figure uses example addresses from Proxy NDP)
+ ![CLAT Architecture](clat1.png)
+ 
+ ## Incoming Connections
+-The Proxy NDP or Dynamic Routing methods both allow incoming connections to IPv4-only software on the host, however, incoming connections must themselves be from IPv4-translated addresses, as Tayga has no way of translating the source address otherwise. 
+ 
+-# Proxy NDP
+-In this approach, a new address on the LAN subnet is generated for use by Tayga. To allow access to the LAN subnet by Tayga, this address is configured for NDP Proxying on the LAN interface, and routed to the Tayga translation interface. This scenario works well if the LAN addresses are assigned via SLAAC, allowing the host to generate additional address(es) for use by the translator. In this scenario, we generate two sequential address (within a /127 subnet), one for Tayga itself and one for user traffic. These addresses MUST be generated from your LAN subnet and MUST be unique, as they are used within your LAN network.
++The Proxy NDP or Dynamic Routing methods both allow incoming connections to IPv4-only software on the host, however, incoming connections must themselves be from IPv4-translated addresses, as `tayga` has no way of translating the source address otherwise.
+ 
+-* `2001:db8:feed::6` is used as the IPv6 address of Tayga itself
++## Proxy NDP
++
++In this approach, a new address on the LAN subnet is generated for use by `tayga`. To allow access to the LAN subnet by `tayga`, this address is configured for NDP Proxying on the LAN interface, and routed to the `tayga` translation interface. This scenario works well if the LAN addresses are assigned via SLAAC, allowing the host to generate additional address(es) for use by the translator. In this scenario, we generate two sequential address (within a /127 subnet), one for `tayga` itself and one for user traffic. These addresses MUST be generated from your LAN subnet and MUST be unique, as they are used within your LAN network.
++
++* `2001:db8:feed::6` is used as the IPv6 address of `tayga` itself
+ * `2001:db8:feed::7` is used as the IPv6 address for translated user traffic
+ 
+-# NAT66 (Masquerade)
++## NAT66 (Masquerade)
++
+ If the translator is unable to assign an additional address (for example, if the host is forced to use DHCPv6 IA_NA addressing), we can instead use NAT66 to masquerade traffic from the translator to the address already assigned to the host. In this scenario, the prefix `fd64::/64` is used for translation only and is not accessible outside of the local system, as packets on the network will appear from the hosts's LAN address (via NAT66).
+ 
+ * `fd64::/64` is used as the IPv6 range of the translator (masqueraded)
+ * `fd64::0` is (implicitly) used as the IPv6 address of the host on the translation network
+-* `fd64::1` is used as the IPv6 address of Tayga itself
++* `fd64::1` is used as the IPv6 address of `tayga` itself
+ * `fd64::2` is used as the IPv6 address for translated user traffic
+ 
+-# Dynamic Routing
++## Dynamic Routing
++
+ If the host participates in dynamic routing, we can instead assign a routed address to the translator, and rely on the dynamic routing algorithm to route traffic. This approach can also be used where the host has requested a dedicated prefix using DHCPv6 IA_PD, for example, some container hosts may allocate a /64 to each host. The addresses in this case were chosen randomly, and may be any addresses within the prefix
+ 
+ * `2001:db8:abcd::/64` is the IPv6 prefix assumed to be routed to the host
+ * `2001:db8:abcd::64/127` is reserved for translation (any /127 may be used)
+-* `2001:db8:abcd::65` is used as the IPv6 address of Tayga itself
+-* `2001:db8:abcd::64` is used as the IPv6 address for translated user traffic
+\ No newline at end of file
++* `2001:db8:abcd::65` is used as the IPv6 address of `tayga` itself
++* `2001:db8:abcd::64` is used as the IPv6 address for translated user traffic
+diff --git a/docs/clat/clat-masq.sh b/docs/clat/clat-masq.sh
+index 2b2f3cc..3fbec61 100755
+--- a/docs/clat/clat-masq.sh
++++ b/docs/clat/clat-masq.sh
+@@ -20,5 +20,5 @@ ip route add default dev clat mtu 1260
+ # Add IPv6 address (implicitly adds /64 route)
+ ip addr add fd64::/64 dev clat
+ 
+-# Start Tayga
++# Start tayga
+ tayga -c clat-masq.conf 
+\ No newline at end of file
+diff --git a/docs/clat/clat-proxynd.sh b/docs/clat/clat-proxynd.sh
+index 88928f8..2760734 100755
+--- a/docs/clat/clat-proxynd.sh
++++ b/docs/clat/clat-proxynd.sh
+@@ -8,7 +8,7 @@ echo 2 > /proc/sys/net/ipv6/conf/eth0/accept_ra
+ #Proxy NDP the CLAT address
+ echo 1 > /proc/sys/net/ipv6/conf/eth0/proxy_ndp
+ 
+-#Proxy both Tayga's address and mapped address
++#Proxy both tayga's address and mapped address
+ #You will need to genreate two addresses in your LAN subnet!
+ ip neigh add proxy 2001:db8:feed::6 dev eth0
+ ip neigh add proxy 2001:db8:feed::7 dev eth0
+@@ -25,5 +25,5 @@ ip route add default dev clat mtu 1260
+ # Add IPv6 route (/127 adds both ::7 and ::6)
+ ip route add 2001:db8:feed::6/127 dev clat 
+ 
+-# Start Tayga
++# Start tayga
+ tayga -c clat-proxynd.conf
+\ No newline at end of file
+diff --git a/docs/clat/clat-route.sh b/docs/clat/clat-route.sh
+index 2e185f5..bf11221 100755
+--- a/docs/clat/clat-route.sh
++++ b/docs/clat/clat-route.sh
+@@ -18,5 +18,5 @@ ip route add default dev clat mtu 1260
+ # Add IPv6 route (/127 adds both ::64 and ::65)
+ ip route add 2001:db8:feed::64/127 dev clat 
+ 
+-# Start Tayga
++# Start tayga
+ tayga -c clat-route.conf 
+\ No newline at end of file
+diff --git a/docs/container/README.md b/docs/container/README.md
+index 8c172a3..5bdbc28 100644
+--- a/docs/container/README.md
++++ b/docs/container/README.md
+@@ -1,23 +1,28 @@
+ 
+ # Container Usage
+-Tayga provides a `Containerfile` which may be used in containerized environments. Tayga relies on the kernel tun/tap interface, as such, the container environment must provide access to `/dev/net/tun` with adequate permissions. 
+ 
+-Three container images are provided: `tayga-nat64`, `tayga-clat`, and `tayga`. These differ only in their default launch script and `tayga.conf` configuration file. `tayga-nat64` and `tayga-clat` are pre-configured using environment variables for these common use cases, and `tayga` requires the user to supply a custom launch script which configures the system using `iproute2`. 
++TAYGA provides a `Containerfile` which may be used in containerized environments. TAYGA relies on the kernel tun/tap interface, as such, the container environment must provide access to `/dev/net/tun` with adequate permissions.
+ 
+-To run Tayga containers on Mikrotik RouterOS, see the [Mikrotik Tutorial](mikrotik.md)
++Three container images are provided: `tayga-nat64`, `tayga-clat`, and `tayga`. These differ only in their default launch script and `tayga.conf` configuration file. `tayga-nat64` and `tayga-clat` are pre-configured using environment variables for these common use cases, and `tayga` requires the user to supply a custom launch script which configures the system using `iproute2`.
++
++To run TAYGA containers on Mikrotik RouterOS, see the [Mikrotik Tutorial](mikrotik.md)
+ 
+ ## NAT64 Container
++
+ The NAT64 container launch script relies on the following environment variables:
+ 
+-| Environment Variable | Default |Description                                                                 |
+-|-----------------------|-------|-----------------------------------------------------------------------------|
+-| `TAYGA_POOL4`     | `192.168.240.0/20` | IPv4 pool for dynamic use by Tayga (CIDR notation)            |
+-| `TAYGA_PREF64`   | `64:ff9b::/96` | IPv6 prefix to be used for NAT64 translation (CIDR notation)                    |
+-| `TAYGA_WKPF_STRICT`   | `no` | Select if the RFC6052 limitations on use of the well-known prefix (`64:ff9b::/96`) along with non-global IPv4 addresses should be enforced                   |
+-| `TAYGA_LOG`   | `drop reject icmp self dyn` | List of log functions to enable in Tayga. See `man 5 tayga.conf` for full description of options.                     |
+-| `TAYGA_ADDR4`   | `192.168.240.1`| The IPv4 address used by Tayga to source ICMPv4 packets. Tayga's IPv6 address is generated from this and `PREF64`. |
++| Environment Variable  | Default                     | Description                                                                                                                                |
++|-----------------------|-----------------------------|--------------------------------------------------------------------------------------------------------------------------------------------|
++| `TAYGA_POOL4`         | `192.168.240.0/20`          | IPv4 pool for dynamic use by tayga (CIDR notation)                                                                                         |
++| `TAYGA_PREF64`        | `64:ff9b::/96`              | IPv6 prefix to be used for NAT64 translation (CIDR notation)                                                                               |
++| `TAYGA_WKPF_STRICT`   | `no`                        | Select if the RFC6052 limitations on use of the well-known prefix (`64:ff9b::/96`) along with non-global IPv4 addresses should be enforced |
++| `TAYGA_LOG`           | `drop reject icmp self dyn` | List of log functions to enable in tayga. See `man 5 tayga.conf` for full description of options.                                          |
++| `TAYGA_ADDR4`         | `192.168.240.1`             | The IPv4 address used by tayga to source ICMPv4 packets. tayga's IPv6 address is generated from this and `PREF64`.                         |
++
+ ## CLAT Container
++
+ The CLAT container launch script is not yet completed.
+ 
+ ## Base Container
+-Using the base container, you must either override `/app/launch.sh` with your own, or set the `ENTRYPOINT` of the container to your own script. Tayga is available at `/app/tayga`, and `iproute2` is also available. The script must enable IP forwarding, configure routes within the container, and start Tayga. You must also provide a `tayga.conf` file or generate it using the launch script. 
+\ No newline at end of file
++
++Using the base container, you must either override `/app/launch.sh` with your own, or set the `ENTRYPOINT` of the container to your own script. `tayga` is available at `/app/tayga`, and `iproute2` is also available. The script must enable IP forwarding, configure routes within the container, and start `tayga`. You must also provide a `tayga.conf` file or generate it using the launch script.
+diff --git a/docs/container/mikrotik.md b/docs/container/mikrotik.md
+index 9497e4e..fc5430c 100644
+--- a/docs/container/mikrotik.md
++++ b/docs/container/mikrotik.md
+@@ -1,15 +1,18 @@
+-## Tayga on Mikrotik RouterOS
+-Using Tayga on Mikrotik RouterOS is currently supported for NAT64. CLAT functionality ('NAT46') is not completely documented yet. 
++# TAYGA on Mikrotik RouterOS
+ 
+-This requires Mikrotik RouterOS 7 with the container package enabled. Tayga container images are built for all platforms supported by Alpine, which does not include arm32v5 required by some older Mikrotik hardware. 
++Using TAYGA on Mikrotik RouterOS is currently supported for NAT64. CLAT functionality ('NAT46') is not completely documented yet.
++
++This requires Mikrotik RouterOS 7 with the container package enabled. TAYGA container images are built for all platforms supported by Alpine, which does not include `arm32v5` required by some older Mikrotik hardware.
+ 
+ ## Speedrun NAT64 Container
++
+ Assumptions used in this guide:
+-- Bridge `nat64`is created only to route packets to/from Tayga
+-- You are using 64:ff9b::/96 as your translation prefix
+-- 192.168.240.0/20 is to used for dynamic clients (max 4093 clients)
+-- 192.168.230.0/30 is used for Tayga itself
+-- You must ensure masquerade srcnat is configured for 192.168.240.0/20
++
++- Bridge `nat64`is created only to route packets to/from `tayga`
++- You are using `64:ff9b::/96` as your translation prefix
++- `192.168.240.0/20` is to used for dynamic clients (max 4093 clients)
++- `192.168.230.0/30` is used for `tayga` itself
++- You must ensure masquerade srcnat is configured for `192.168.240.0/20`
+ 
+ ```sh
+ #Create a bridge for nat64 container
+@@ -20,12 +23,12 @@ Assumptions used in this guide:
+ #Create veth setup for nat64
+ /interface/veth add name=veth-nat64 address=192.168.239.2/30,fc64::2/126 comment="nat64 veth" dhcp=no gateway=192.168.239.1 gateway6=fc64::1
+ /interface/bridge port add bridge=nat64 interface=veth-nat64
+-#Add routes to Tayga via veth
++#Add routes to tayga via veth
+ /ip/route add dst=192.168.240.0/20 gateway=192.168.239.2  comment="nat64 dynamic pool"
+ /ipv6/route add dst=64:ff9b::/96 gateway=fc64::2%nat64 comment="nat64 translation prefix"
+ #Add our dynamic pool to interface list
+ /interface/list/member add interface=nat64 list=LAN
+-#Create Tayga container
++#Create tayga container
+ /container/add remote-image=ghcr.io/apalrd/tayga-nat64 interface=veth-nat64 name=tayga-nat64 workdir=/app
+ #Now, start the container
+-```
+\ No newline at end of file
++```
+diff --git a/docs/mapt/README.md b/docs/mapt/README.md
+index a251f95..60462b7 100644
+--- a/docs/mapt/README.md
++++ b/docs/mapt/README.md
+@@ -3,38 +3,42 @@
+ TBD
+ 
+ ## MAP Architecture
+-The Stateful NAT64 architecture (described in RFC xxxx) permits multiple IPv6-only clients to access IPv4-only servers, via a stateful NAPT (Network Address and Port Translator) function. Multiple clients will be mapped to the same pubilc IPv4 address(s) using port translation, as is common with NAT44. 
+ 
+-Two different implementations are shown here, both rely on the Linux kernel to perform NAPT, as Tayga is a stateless translator. 
++The Stateful NAT64 architecture (described in RFC xxxx) permits multiple IPv6-only clients to access IPv4-only servers, via a stateful NAPT (Network Address and Port Translator) function. Multiple clients will be mapped to the same pubilc IPv4 address(s) using port translation, as is common with NAT44.
+ 
++Two different implementations are shown here, both rely on the Linux kernel to perform NAPT, as `tayga` is a stateless translator.
+ 
+-# MAP-T BR (Border Router)
+-
++## MAP-T BR (Border Router)
+ 
+ ## Data Path
++
+ In this example, two interfaces are used:
++
+ * `eth0` represents the WAN interface, where the public IPv4(s) are assigned
+ * `eth1` represents the LAN interface, which receives traffic for the translation prefix
+-* `nat64` is the name of the tunnel interface created by Tayga
+-This configuration does not require two interfaces, Tayga may use the same interface for both functions. This example restricts nat64 functions to only clients on the LAN interface.
+-
+-# MAP-T CPE (Customer Premises Equipment)
++* `nat64` is the name of the tunnel interface created by `tayga`
++This configuration does not require two interfaces, `tayga` may use the same interface for both functions. This example restricts nat64 functions to only clients on the LAN interface.
+ 
++## MAP-T CPE (Customer Premises Equipment)
+ 
+ ## Data Path
++
+ In this example, two interfaces are used:
++
+ * `eth0` represents the WAN interface, where the public IPv4(s) are assigned
+ * `eth1` represents the LAN interface, which receives traffic for the translation prefix
+-* `nat64` is the name of the tunnel interface created by Tayga
+-This configuration does not require two interfaces, Tayga may use the same interface for both functions. This example restricts nat64 functions to only clients on the LAN interface.
++* `nat64` is the name of the tunnel interface created by `tayga`
++This configuration does not require two interfaces, `tayga` may use the same interface for both functions. This example restricts nat64 functions to only clients on the LAN interface.
+ 
+-# MAP-T to 464XLAT CE
+-When the MAP-T architecture, a (fractional) public IPv4 address is indirectly provided to the CPE. Ordinarily, the CPE would perform stateful NAPT from the internal dual stack clients to the MAP port range, and then translate resulting packets to IPv6. However, if we would like to then deploy NAT64 and/or 464xlat to internal clients (instead of or in addition to dual stack), we may 'shortcut' this process by simplifying the NAT64, NAPT44, and NAT46 into a single NAPT66 process. 
++## MAP-T to 464XLAT CE
+ 
++When the MAP-T architecture, a (fractional) public IPv4 address is indirectly provided to the CPE. Ordinarily, the CPE would perform stateful NAPT from the internal dual stack clients to the MAP port range, and then translate resulting packets to IPv6. However, if we would like to then deploy NAT64 and/or 464xlat to internal clients (instead of or in addition to dual stack), we may 'shortcut' this process by simplifying the NAT64, NAPT44, and NAT46 into a single NAPT66 process.
+ 
+ ## Data Path
++
+ In this example, two interfaces are used:
++
+ * `eth0` represents the WAN interface, where the public IPv4(s) are assigned
+ * `eth1` represents the LAN interface, which receives traffic for the translation prefix
+-* `nat64` is the name of the tunnel interface created by Tayga
+-This configuration does not require two interfaces, Tayga may use the same interface for both functions. This example restricts nat64 functions to only clients on the LAN interface.
+\ No newline at end of file
++* `nat64` is the name of the tunnel interface created by `tayga`
++This configuration does not require two interfaces, `tayga` may use the same interface for both functions. This example restricts nat64 functions to only clients on the LAN interface.
+diff --git a/docs/nat64/README.md b/docs/nat64/README.md
+index 8e67577..d5adea0 100644
+--- a/docs/nat64/README.md
++++ b/docs/nat64/README.md
+@@ -1,40 +1,47 @@
+ # Stateful NAT64
+ 
+-This example configures Tayga to perform stateful NAT64. These commands assume a recent Linux system (using `iproute2` and `nftables`), but not a specific distribution.
++This example configures `tayga` to perform stateful NAT64. These commands assume a recent Linux system (using `iproute2` and `nftables`), but not a specific distribution.
+ 
+ ## NAT64 Architecture
++
+ The Stateful NAT64 architecture (described in RFC xxxx) permits multiple IPv6-only clients to access IPv4-only servers, via a stateful NAPT (Network Address and Port Translator) function. Multiple IPv6 clients will be mapped to the same pubilc IPv4 address(s) using port translation, as is common with NAT44. NAT64 may be used in several IPv6-only deployment scenarions, including DNS64 and 464XLAT.
+ 
+-Two different implementations are shown here, both rely on the Linux kernel to perform NA(P)T, as Tayga is a stateless translator. 
++Two different implementations are shown here, both rely on the Linux kernel to perform NA(P)T, as `tayga` is a stateless translator.
+ 
+ In these examples, two interfaces are used:
++
+ * `eth0` represents the WAN-side interface, where the public IPv4(s) are routed
+ * `eth1` represents the LAN-side interface, which receives traffic for the translation prefix
+-* `nat64` is the name of the tunnel interface created by Tayga
+-This configuration does not require two interfaces, Tayga may use the same interface for both functions. This example restricts nat64 functions to only clients on the LAN interface.
++* `nat64` is the name of the tunnel interface created by `tayga`
++This configuration does not require two interfaces, `tayga` may use the same interface for both functions. This example restricts nat64 functions to only clients on the LAN interface.
+ 
++## Dynamic Pool / Dynamic Address-Port Mapping
+ 
+-# Dynamic Pool / Dynamic Address-Port Mapping
+-This implementation uses Tayga's dynamic pool mapping functionality. This relies on allocating a translation network of private IPv4 address space, containing sufficient addresses for the number of active IPv6-only clients. Each IPv6-only client will be dynamically assigned an IPv4 address in the translation network by Tayga. The Linux kernel will then perform NAPT (Masquerade) from the translation network to a shared IPv4 address or address pool. This approach is recommended for all networks which are not service providers as it provides a high level of address and port reuse and also allows the same public IPv4 to be used for traditional NAT44 on the same router, for networks which provide dual-stack.
++This implementation uses `tayga`'s dynamic pool mapping functionality. This relies on allocating a translation network of private IPv4 address space, containing sufficient addresses for the number of active IPv6-only clients. Each IPv6-only client will be dynamically assigned an IPv4 address in the translation network by `tayga`. The Linux kernel will then perform NAPT (Masquerade) from the translation network to a shared IPv4 address or address pool. This approach is recommended for all networks which are not service providers as it provides a high level of address and port reuse and also allows the same public IPv4 to be used for traditional NAT44 on the same router, for networks which provide dual-stack.
++
++### Addressing
+ 
+-## Addressing
+ The following IP addresses are used in this example:
++
+ * `64:ff9b::/96` as the translation prefix `pref64`
+ * `192.168.240.0/20` as the dynamic address pool sufficient for up to 4093 active IPv6 clients.
+-* `192.168.240.1` is used by Tayga itself to source ICMPv4 messages (this IP is not required to be within the dynamic address pool)
++* `192.168.240.1` is used by `tayga` itself to source ICMPv4 messages (this IP is not required to be within the dynamic address pool)
+ * `203.0.113.69` is the public IPv6 address of the translator
+ * `2001:db8:beef::/48` is the public IPv6 prefix assigned to this site, of which, `2001:db8:beef:6464::/64` is (arbitrarily) reserved for the translator itself
+ 
+-# Static Pool / Fixed Address-Port Mapping
+-For applications such as service providers which require fine control of the mapping of users to public IPv4 addresses and port ranges, another approach may be taken. This approach instead assigns the public IP range directly to Tayga (instead of Linux), and uses an IPv6 translation network. NAPT is performed on the IPv6 side, where all traffic from a single subscriber may be represented as a single address on the translation network. This prevents a single subscriber from utilizing the entire translation network space if they are randomizing the source address with each connection, for example. You may also control the port sharing between subscribers in the IPv6 NAPT translation. Following IPv6 NAPT, packets are statelessly translated from the translation network to the public IPv4 address space, and further NAT and connection tracking is not performed by Linux. 
++## Static Pool / Fixed Address-Port Mapping
++
++For applications such as service providers which require fine control of the mapping of users to public IPv4 addresses and port ranges, another approach may be taken. This approach instead assigns the public IP range directly to `tayga` (instead of Linux), and uses an IPv6 translation network. NAPT is performed on the IPv6 side, where all traffic from a single subscriber may be represented as a single address on the translation network. This prevents a single subscriber from utilizing the entire translation network space if they are randomizing the source address with each connection, for example. You may also control the port sharing between subscribers in the IPv6 NAPT translation. Following IPv6 NAPT, packets are statelessly translated from the translation network to the public IPv4 address space, and further NAT and connection tracking is not performed by Linux.
++
++### Addressing
+ 
+-## Addressing
+ The following IP addresses are used in this example:
++
+ * `64:ff9b::/96` as the translation prefix `pref64`
+ * `203.0.113.0/24` is the public IPv4 address range for customers assigned to the translator
+ * `192.0.2.0` is the public IPv4 address of the translator (for sourcing ICMP errors)
+ * `2001:db8::/32` is the prefix assigned to this ISP
+-*  `2001:db8:1000::/36` is assumed to be assigned to customers, each customer receives a /48 out of this range, with customers sharing public IPv4 addresses at a fixed ratio of 16:1 with fixed mapping of subscribers to IP+port ranges (as is common with CGNAT)
++* `2001:db8:1000::/36` is assumed to be assigned to customers, each customer receives a /48 out of this range, with customers sharing public IPv4 addresses at a fixed ratio of 16:1 with fixed mapping of subscribers to IP+port ranges (as is common with CGNAT)
+ * `2001:db8::/48` is reserved for the ISP's routers, including the range `2001:db8:0:6464::/64` for the translator itself (for sourcing ICMP errors).
+-* `fd64::/120` is used between NAT66 and Tayga in the translator, and is not routed outside of the system. It directly maps to `203.0.113.24`.
+-* In this example, this router is assumed to be a purely layer 3 device, with routes distributed via a dynamic routing protocol. `203.0.113.0/24`, `192.0.2.0/32`, `2001:db8:0:6464::/64`, and `64:ff9b::/96` (or `/64`, for FIB efficiency) are to be routed to this host. 
+\ No newline at end of file
++* `fd64::/120` is used between NAT66 and `tayga` in the translator, and is not routed outside of the system. It directly maps to `203.0.113.24`.
++* In this example, this router is assumed to be a purely layer 3 device, with routes distributed via a dynamic routing protocol. `203.0.113.0/24`, `192.0.2.0/32`, `2001:db8:0:6464::/64`, and `64:ff9b::/96` (or `/64`, for FIB efficiency) are to be routed to this host.
+diff --git a/docs/nat64/nat64-dynpool.conf b/docs/nat64/nat64-dynpool.conf
+index ae3fdfd..0819de0 100644
+--- a/docs/nat64/nat64-dynpool.conf
++++ b/docs/nat64/nat64-dynpool.conf
+@@ -2,10 +2,10 @@
+ tun-device nat64
+ # Dynamic pool range for clients
+ dynamic-pool 192.168.240.0/20
+-# IPv4 address of Tayga (may be within dynamic pool)
++# IPv4 address of tayga (may be within dynamic pool)
+ ipv4-addr 192.168.240.1
+-# IPv6 address of Tayga
+-# If not provided, Tayga calculates from ipv4-addr + prefix=
++# IPv6 address of tayga
++# If not provided, tayga calculates from ipv4-addr + prefix=
+ ipv6-addr 2001:db8:beef:6464::1
+ # Data Dir to store dynamic pool mappings
+ data-dir /var/lib/tayga
+diff --git a/docs/nat64/nat64-dynpool.sh b/docs/nat64/nat64-dynpool.sh
+index 7b57bb9..214f032 100755
+--- a/docs/nat64/nat64-dynpool.sh
++++ b/docs/nat64/nat64-dynpool.sh
+@@ -21,7 +21,7 @@ ip addr add 2001:db8:beef:6464::/64 dev nat64
+ # Add pref64 route (distribute this via your routing protocol)
+ ip route add 64:ff9b::/96 dev nat64
+ 
+-# Start Tayga
++# Start tayga
+ tayga -c nat64-dynpool.conf 
+ # Alternatively, start the service with systmed
+ #systemctl start tayga@nat64-dynpool
+\ No newline at end of file
+diff --git a/docs/nat64/nat64-static.conf b/docs/nat64/nat64-static.conf
+index fcd99e6..fb9ef8d 100644
+--- a/docs/nat64/nat64-static.conf
++++ b/docs/nat64/nat64-static.conf
+@@ -1,8 +1,8 @@
+ # For BSD systems, tun-devide must be named tun[0-9]
+ tun-device nat64
+-# IPv4 address of Tayga
++# IPv4 address of tayga
+ ipv4-addr 192.0.2.0
+-# IPv6 address of Tayga (may only be within pref64 if pref64 is not the well-known prefix)
++# IPv6 address of tayga (may only be within pref64 if pref64 is not the well-known prefix)
+ ipv6-addr 2001:db8:0:6464::1
+ # Mapping of public IPv4 addresses to the internal translation prefix
+ map 203.0.113.0/24 fd64::/120
+diff --git a/docs/nat64/nat64-static.sh b/docs/nat64/nat64-static.sh
+index fa59411..70070d4 100755
+--- a/docs/nat64/nat64-static.sh
++++ b/docs/nat64/nat64-static.sh
+@@ -43,5 +43,5 @@ ip route add fd64::/64 dev nat64
+ # Add pref64 route (distribute this via your routing protocol)
+ ip route add 64:ff9b::/96 dev nat64
+ 
+-# Start Tayga
++# Start tayga
+ tayga -c nat64-static.conf 
+\ No newline at end of file
+diff --git a/docs/rfc.md b/docs/rfc.md
+index 6747320..85fe591 100644
+--- a/docs/rfc.md
++++ b/docs/rfc.md
+@@ -1,43 +1,58 @@
+ 
+ # RFC Compliance
+-Tayga aims to be fully compliant with all relevant RFCs. The following errata / noncompliances are documented:
++
++TAYGA aims to be fully compliant with all relevant RFCs. The following errata / noncompliances are documented:
+ 
+ ## RFC7915
++
+ [Reference Document](https://datatracker.ietf.org/doc/html/rfc7915)
+ 
+-RFC7915 describes the fundamental IP/ICMP Translation Algorithm used by Tayga. This obsoletes the previous guidance (RFC6791, RFC6145, RFC2765).
++RFC7915 describes the fundamental IP/ICMP Translation Algorithm used by TAYGA. This obsoletes the previous guidance (RFC6791, RFC6145, RFC2765).
+ 
+ ### ICMP Extensions
+-RFC 7915 implies that we should translate IPv6 addresses in ICMP extensions. Tayga does not do this. See [Issue #20](https://github.com/apalrd/tayga/issues/20)
++
++RFC7915 implies that we should translate IPv6 addresses in ICMP extensions. TAYGA does not do this. See [Issue #20](https://github.com/apalrd/tayga/issues/20)
+ 
+ ## RFC7757
++
+ [Reference Document](https://datatracker.ietf.org/doc/html/rfc7757)
+ 
+-RFC7757 describes 'Explicit Address Mapping' for stateless IP/ICMP Translation. Tayga supports EAM mappings using the `map` configuration directive. 
++RFC7757 describes 'Explicit Address Mapping' for stateless IP/ICMP Translation. TAYGA supports EAM mappings using the `map` configuration directive.
+ 
+ ### Hairpin
+-RFC7757 specifies cases where a packet may 'hairpin' (IPv6->IPv4->IPv6), and an algorithm to correct this. Tayga does not implement this. See [Issue #9](https://github.com/apalrd/tayga/issues/9). Tayga does detect packets which will hairpin and *WILL DROP THESE PACKETS*.
++
++RFC7757 specifies cases where a packet may 'hairpin' (IPv6->IPv4->IPv6), and an algorithm to correct this. TAYGA does not implement this. See [Issue #9](https://github.com/apalrd/tayga/issues/9). TAYGA does detect packets which will hairpin and *WILL DROP THESE PACKETS*.
+ 
+ ### Unequal Suffix Lenghts
+-Per RFC7757, the translator should support cases where the number of suffix bits in the MAP6 entry is equal to or greater than the MAP4 entry. Tayga requires that these be exactly equal (i.e. IPv4/24 corresponds to IPv6/120, not IPv6/64). Tayga will fail to start if such maps are configured. See [Issue #37](https://github.com/apalrd/tayga/issues/37)
++
++Per RFC7757, the translator should support cases where the number of suffix bits in the MAP6 entry is equal to or greater than the MAP4 entry. TAYGA requires that these be exactly equal (i.e. IPv4/24 corresponds to IPv6/120, not IPv6/64). TAYGA will fail to start if such maps are configured. See [Issue #37](https://github.com/apalrd/tayga/issues/37)
+ 
+ ### Overlapping EAM Regions
+-RFC7757 specifies that a packet should follow the EAM region according to a longest prefix match, but notest that overlapping regions are likely to cause asymmetric or broken return path routing. Tayga will correctly handle overlapping IPV4 regions but not IPv6 regions. See [Issue #38](https://github.com/apalrd/tayga/issues/38)
++
++RFC7757 specifies that a packet should follow the EAM region according to a longest prefix match, but notest that overlapping regions are likely to cause asymmetric or broken return path routing. TAYGA will correctly handle overlapping IPV4 regions but not IPv6 regions. See [Issue #38](https://github.com/apalrd/tayga/issues/38)
+ 
+ ## RFC6791
++
+ [Reference Document](https://datatracker.ietf.org/doc/html/rfc6791)
+ 
+ This document specifies how to translate ICMPv6 packets where the source address cannot be translated to IPv4.
+ 
+-Tayga partially implements this RFC. Tayga will always use its own `ipv4_addr` under these scenarios. There are currently RFC drafts which will expand this. Additionally, Tayga does not generate an ICMP extension indicating the original IPv6 address, but would pass an extension if it already exists. 
++TAYGA partially implements this RFC. TAYGA will always use its own `ipv4_addr` under these scenarios. There are currently RFC drafts which will expand this. Additionally, TAYGA does not generate an ICMP extension indicating the original IPv6 address, but would pass an extension if it already exists.
+ 
+ ## RFC6052
++
+ [Reference Document](https://datatracker.ietf.org/doc/html/rfc6052)
+ 
+ RFC6052 describes methods of encoding IPv4 addresses into IPv6 prefixes.
++
+ ### Support for non/96 prefixes
+-RFC6052 specifies several prefix lengths and mapping formats. While Tayga supports all of these, for prefixes other than /96, there are unused suffix bits in the translated addresses. RFC6052 specifies that we `SHOULD` ignore these bits, as future extensions may utilize them. Tayga will drop packets if these bits are not zero. See [Issue #10](https://github.com/apalrd/tayga/issues/10).
++
++RFC6052 specifies several prefix lengths and mapping formats. While TAYGA supports all of these, for prefixes other than /96, there are unused suffix bits in the translated addresses. RFC6052 specifies that we `SHOULD` ignore these bits, as future extensions may utilize them. TAYGA will drop packets if these bits are not zero. See [Issue #10](https://github.com/apalrd/tayga/issues/10).
++
+ ### Strict RFC6052 Well-Known Prefix Compliance
+-Tayga by default will drop packets containing non-global IPv4 addresses when using the well-known prefix (`64:ff9b::/96`) as required by RFC6052. This restriction may be disabled by using the `wkpf-strict no` option in the configuration file, as may be required in testing environments or if your network will ensure RFC6052 compliance on your own. This restriction does not apply to the well-known local-use space (`64:ff9b:1::/48`) per RFC8215.
++
++TAYGA by default will drop packets containing non-global IPv4 addresses when using the well-known prefix (`64:ff9b::/96`) as required by RFC6052. This restriction may be disabled by using the `wkpf-strict no` option in the configuration file, as may be required in testing environments or if your network will ensure RFC6052 compliance on your own. This restriction does not apply to the well-known local-use space (`64:ff9b:1::/48`) per RFC8215.
++
+ ### Private Addressing (RFC5735)
+-RFC6052 calls out RFC5735 as a list of non-global IPv4 prefixes which must not be translated. This reference has been obsoleted by RFC6890, and this list has been [migrated to IANA](https://www.iana.org/assignments/iana-ipv4-special-registry/iana-ipv4-special-registry.xhtml). Tayga follows the IANA registry last updated 2021-02-04. Additionally, as the Class E space is not prohibited by Tayga, and may be translated. 
++
++RFC6052 calls out RFC5735 as a list of non-global IPv4 prefixes which must not be translated. This reference has been obsoleted by RFC6890, and this list has been [migrated to IANA](https://www.iana.org/assignments/iana-ipv4-special-registry/iana-ipv4-special-registry.xhtml). TAYGA follows the IANA registry last updated 2021-02-04. Additionally, as the Class E space is not prohibited by TAYGA, and may be translated.
+diff --git a/docs/siit/README.md b/docs/siit/README.md
+index 6545899..4c0f389 100644
+--- a/docs/siit/README.md
++++ b/docs/siit/README.md
+@@ -1,45 +1,55 @@
+ # Stateless IP/ICMP Translation - Data Center
+ 
+-This example configures Tayga to perform SIIT. In this mode, public IPv4 addresses can be translated to IPv6 addresses, allowing a data center to be IPv6-only while still allowing traffic to and from IPv4 clients (via the border router). In addition, SIIT may also be used to build 'IPv4 Islands' within an IPv6-only datacenter, using additional 'edge relays'. These 'edge relays' may be implemented by the network (providing a small IPv4 subnet) or on the host itself (providing a single address). 
++This example configures `tayga` to perform SIIT. In this mode, public IPv4 addresses can be translated to IPv6 addresses, allowing a data center to be IPv6-only while still allowing traffic to and from IPv4 clients (via the border router). In addition, SIIT may also be used to build 'IPv4 Islands' within an IPv6-only datacenter, using additional 'edge relays'. These 'edge relays' may be implemented by the network (providing a small IPv4 subnet) or on the host itself (providing a single address).
+ 
+ ## SIIT Architecture
+-The Stateless SIIT architecture allows translation of individual IPv4 and IPv6 resources when configured explicitly. It is commonly used to provide access to IPv6-only servers by IPv4-only clients. Each server retains its existing IPv6 GUA, and an explicit mapping is performed in Tayga from each representative IPv4 to the corresponding IPv6. The IPv4 range used for these explicit mappings may be either public or private depending on the overall network architecture. 
+ 
+-# Border Router
+-The Border Router function maps a pool of public IPv4 addresses to internal servers. The public IPv4 pool is routed to the translator from the IPv4 internet via your favorite dynamic routing protocol, and the `pref64` translation prefix is routed to the translator. 
++The Stateless SIIT architecture allows translation of individual IPv4 and IPv6 resources when configured explicitly. It is commonly used to provide access to IPv6-only servers by IPv4-only clients. Each server retains its existing IPv6 GUA, and an explicit mapping is performed in `tayga` from each representative IPv4 to the corresponding IPv6. The IPv4 range used for these explicit mappings may be either public or private depending on the overall network architecture.
+ 
+-As the Border Router is completely stateless, it is possible to run multiple border routers with identical configuration and load balance using equal-cost multipath (or other tweaks in your favorite dynamic routing protocol). There is no session state to synchronize as we are not performing address and port translation, and we are not using the dynamic pool facilities which would require synchronization. 
++## Border Router
++
++The Border Router function maps a pool of public IPv4 addresses to internal servers. The public IPv4 pool is routed to the translator from the IPv4 internet via your favorite dynamic routing protocol, and the `pref64` translation prefix is routed to the translator.
++
++As the Border Router is completely stateless, it is possible to run multiple border routers with identical configuration and load balance using equal-cost multipath (or other tweaks in your favorite dynamic routing protocol). There is no session state to synchronize as we are not performing address and port translation, and we are not using the dynamic pool facilities which would require synchronization.
++
++### Addressing
+ 
+-## Addressing
+ The following IP addresses are used in this example:
++
+ * `64:ff9b::/96` as the translation prefix `pref64`, routed to the translator via the datacenter's IPv6 fabric
+ * `192.51.0.0/24` as the public IPv4 space used by this datacenter, routed to the translator (not on-link)
+-* `192.51.0.0` is used by Tayga itself to source ICMPv4 messages
++* `192.51.0.0` is used by `tayga` itself to source ICMPv4 messages
+ * `2001:db8:beef::/48` is the public IPv6 prefix assigned to this site
+ * Many random addresses within the v4/v6 space are used to show explicit address mappings
+ 
+-# Edge Relay (Network Based)
+-The Edge Relay provides native IPv4 service to IPv4-only islands within an IPv6-only network. The IPv6 addresses of the edge relays are configured in the Border Router. In this example, Tayga is operated as a router, providing native IPv4 connectivity 'on the wire' to devices which may not implement IPv6 at all. As is tradition, by assigning a /29 on-link (not routed) we completely waste two valuable IPv4 addresses for the network and broadcast, plus one more address as the on-link gateway, but that is to be expected with legacy IP.
++## Edge Relay (Network Based)
++
++The Edge Relay provides native IPv4 service to IPv4-only islands within an IPv6-only network. The IPv6 addresses of the edge relays are configured in the Border Router. In this example, tayga is operated as a router, providing native IPv4 connectivity 'on the wire' to devices which may not implement IPv6 at all. As is tradition, by assigning a /29 on-link (not routed) we completely waste two valuable IPv4 addresses for the network and broadcast, plus one more address as the on-link gateway, but that is to be expected with legacy IP.
+ 
+ Similar to the Border Router, the Edge Relay itself is completely stateless and may be replicated without any special synchronization. However, if the IPv4 Island is utilizing on-link addressing, this would require the use of a first-hop redundancy protocol such as VRRP, which is out of the scope of this document.
+ 
+-## Addressing
++### Addressing
++
+ The following IP addresses are used in this example:
++
+ * `64:ff9b::/96` as the translation prefix `pref64`
+ * `192.51.0.64/29` as the public IPv4 space provided on-link by the edge relay to legacy devices
+ * `192.51.0.65` is used by the translator as the on-link gateway for legacy devices, and you may host services such as DHCP on this link
+-* `192.0.0.2` is used by Tayga itself to source ICMPv4 messages
++* `192.0.0.2` is used by `tayga` itself to source ICMPv4 messages
+ * `2001:db8:beef::420/125` is the public IPv6 range assigned to this /29 subnet, which must be routed to the translator across the IPv6 network
+ 
+-# Edge Relay (Node Based)
+-This is a simplified version of the Edge Relay in which Tayga is run on the host itself, providing an interface with native IPv4 connectivity for scenarios where software requires native IPv4 but the host operating system supports IPv6
++## Edge Relay (Node Based)
++
++This is a simplified version of the Edge Relay in which `tayga` is run on the host itself, providing an interface with native IPv4 connectivity for scenarios where software requires native IPv4 but the host operating system supports IPv6
+ 
+ While this Edge Relay is stateless, it would be pointless to replicate it as it only provides services to its own node.
+ 
+-## Addressing
++### Addressing
++
+ The following IP addresses are used in this example:
++
+ * `64:ff9b::/96` as the translation prefix `pref64`
+ * `192.51.0.27` as the public IPv4 address of the node
+-* `192.0.0.2` is used by Tayga itself to source ICMPv4 messages
++* `192.0.0.2` is used by `tayga` itself to source ICMPv4 messages
+ * `2001:db8:beef::ff92` is the public IPv6 address of the node, which must be mapped to 192.51.0.27 by the border router
+-* For this example, Proxy ND is used so that the public IPv6 address of the node and of Tayga itself appear on-link on `eth0`, however, a dynamic routing protocol may be used instead
+\ No newline at end of file
++* For this example, Proxy ND is used so that the public IPv6 address of the node and of `tayga` itself appear on-link on `eth0`, however, a dynamic routing protocol may be used instead
+diff --git a/docs/siit/siit-br.conf b/docs/siit/siit-br.conf
+index 746e546..52225fe 100644
+--- a/docs/siit/siit-br.conf
++++ b/docs/siit/siit-br.conf
+@@ -1,8 +1,8 @@
+ # For BSD systems, tun-devide must be named tun[0-9]
+ tun-device nat64
+-# IPv4 address of Tayga (may be within siit range)
++# IPv4 address of tayga (may be within siit range)
+ ipv4-addr 192.51.0.0
+-# IPv6 address of Tayga (may only be within pref64 if pref64 is not the well-known prefix)
++# IPv6 address of tayga (may only be within pref64 if pref64 is not the well-known prefix)
+ ipv6-addr 2001:db8:beef:6464::1
+ # Disable strict well-known prefix checking to use example IPs
+ #wkpf-strict no
+diff --git a/docs/siit/siit-br.sh b/docs/siit/siit-br.sh
+index b06bc04..7e5b718 100755
+--- a/docs/siit/siit-br.sh
++++ b/docs/siit/siit-br.sh
+@@ -16,5 +16,5 @@ ip addr add 2001:db8:beef:6464::/64 dev nat64
+ # Add pref64 route (distribute this via your routing protocol)
+ ip route add 64:ff9b::/96 dev nat64
+ 
+-# Start Tayga
++# Start tayga
+ tayga -c siit-br.conf 
+\ No newline at end of file
+diff --git a/docs/siit/siit-er-node.conf b/docs/siit/siit-er-node.conf
+index f844953..c59b1c2 100644
+--- a/docs/siit/siit-er-node.conf
++++ b/docs/siit/siit-er-node.conf
+@@ -1,8 +1,8 @@
+ # For BSD systems, tun-devide must be named tun[0-9]
+ tun-device siit
+-# IPv4 address of Tayga (only used to send ICMP Errors to the node)
++# IPv4 address of tayga (only used to send ICMP Errors to the node)
+ ipv4-addr 192.0.0.2
+-# IPv6 address of Tayga (only used to send ICMPv6 errors from the node)
++# IPv6 address of tayga (only used to send ICMPv6 errors from the node)
+ ipv6-addr 2001:db8:beef::1679
+ # Disable strict well-known prefix checking to use example IPs
+ #wkpf-strict no
+diff --git a/docs/siit/siit-er-node.sh b/docs/siit/siit-er-node.sh
+index 0883ff9..eda577c 100755
+--- a/docs/siit/siit-er-node.sh
++++ b/docs/siit/siit-er-node.sh
+@@ -11,7 +11,7 @@ ip link set dev siit up
+ ip route add default dev siit
+ # Add global IPv4 address 
+ ip addr add 192.51.0.27/32 dev siit
+-# Add route to Tayga's v6 address, and the node's v4-translated address
++# Add route to tayga's v6 address, and the node's v4-translated address
+ ip route add 2001:db8:beef::1679/128 dev siit
+ ip route add 2001:db8:beef::ff92/128 dev siit
+ 
+@@ -21,5 +21,5 @@ echo 1 > /proc/sys/net/ipv6/conf/eth0/proxy_ndp
+ ip neigh add proxy 2001:db8:beef::1679 dev eth0
+ ip neigh add proxy 2001:db8:beef::ff92 dev eth0
+ 
+-# Start Tayga
++# Start tayga
+ tayga -c siit-er-node.conf 
+\ No newline at end of file
+diff --git a/docs/siit/siit-er.conf b/docs/siit/siit-er.conf
+index 70c2260..4e5b853 100644
+--- a/docs/siit/siit-er.conf
++++ b/docs/siit/siit-er.conf
+@@ -1,8 +1,8 @@
+ # For BSD systems, tun-devide must be named tun[0-9]
+ tun-device siit
+-# IPv4 address of Tayga (only used to send ICMP Errors to the node)
++# IPv4 address of tayga (only used to send ICMP Errors to the node)
+ ipv4-addr 192.0.0.2
+-# IPv6 address of Tayga (only used to send ICMPv6 errors from the node)
++# IPv6 address of tayga (only used to send ICMPv6 errors from the node)
+ ipv6-addr 2001:db8:beef::420
+ # Disable strict well-known prefix checking to use example IPs
+ #wkpf-strict no
+diff --git a/docs/siit/siit-er.sh b/docs/siit/siit-er.sh
+index 6c1d154..ecaf770 100755
+--- a/docs/siit/siit-er.sh
++++ b/docs/siit/siit-er.sh
+@@ -10,7 +10,7 @@ tayga -c siit-er.conf --mktun
+ ip link set dev siit up
+ # Add IPv4 default route to the world
+ ip route add default dev siit
+-# Add route to Tayga, and the v4-translated address space
++# Add route to tayga, and the v4-translated address space
+ # Distribute this (or an aggregate) via your dynamic routing protocol
+ # OR use proxy-ND for these 8 addresses
+ ip route add 2001:db8:beef::420/125 dev siit
+@@ -20,5 +20,5 @@ ip route add 2001:db8:beef::420/125 dev siit
+ # and run DHCP or whatever
+ ip addr add 192.51.0.65/29 dev eth1 
+ 
+-# Start Tayga
++# Start tayga
+ tayga -c siit-er.conf 
+\ No newline at end of file
+diff --git a/dynamic.c b/dynamic.c
+index 82b846a..3d0ab3d 100644
+--- a/dynamic.c
++++ b/dynamic.c
+@@ -338,9 +338,9 @@ static void write_to_file(struct dynamic_pool *pool)
+ 				strerror(errno));
+ 		return;
+ 	}
+-	fprintf(out, "###\n###\n### TAYGA dynamic map database\n###\n"
++	fprintf(out, "###\n###\n### tayga dynamic map database\n###\n"
+ 			"### You can edit this (carefully!) as long as "
+-			"you shut down TAYGA first\n###\n###\n"
++			"you shut down tayga first\n###\n###\n"
+ 			"### Last written: %s###\n###\n\n",
+ 			asctime(gmtime(&now)));
+ 	entry = pool->mapped_list.next;
+diff --git a/scripts/launch-clat.sh b/scripts/launch-clat.sh
+index aaef764..3222b64 100755
+--- a/scripts/launch-clat.sh
++++ b/scripts/launch-clat.sh
+@@ -1,4 +1,4 @@
+-## Launch Tayga within a container
++## Launch tayga within a container
+ 
+ 
+ # Enable Forwarding
+@@ -12,7 +12,7 @@ TAYGA_PREF64="${TAYGA_PREF64:-64:ff9b::/96}"
+ TAYGA_WKPF_STRICT="${TAYGA_WKPF_STRICT:-no}"
+ TAYGA_MTU="${TAYGA_MTU:-65535}"
+ TAYGA_LOG="${TAYGA_LOG:-drop reject icmp self dyn}"
+-#Default address for Tayga s in the DS-Lite range for CLAT use
++#Default address for tayga s in the DS-Lite range for CLAT use
+ TAYGA_ADDR4="${TAYGA_ADDR:-192.0.0.2}"
+ #Must specify ADDR6 for clat
+ WILLEXIT=""
+diff --git a/scripts/launch-nat64.sh b/scripts/launch-nat64.sh
+index 034331f..a7a1852 100644
+--- a/scripts/launch-nat64.sh
++++ b/scripts/launch-nat64.sh
+@@ -1,4 +1,4 @@
+-## Launch Tayga within a container
++## Launch tayga within a container
+ 
+ # Enable Forwarding
+ echo "Enabling IPv4 and IPv6 forwarding"
+@@ -9,7 +9,7 @@ echo 1 > /proc/sys/net/ipv6/conf/all/forwarding
+ TAYGA_PREF64="${TAYGA_PREF64:-64:ff9b::/96}"
+ TAYGA_POOL4="${TAYGA_POOL4:-192.168.240.0/20}"
+ TAYGA_ADDR4="${TAYGA_ADDR:-192.168.240.1}"
+-#Addr6 not set, Tayga will choose on its own
++#Addr6 not set, tayga will choose on its own
+ TAYGA_WKPF_STRICT="${TAYGA_WKPF_STRICT:-no}"
+ TAYGA_LOG="${TAYGA_LOG:-drop reject icmp self dyn}"
+ 
+diff --git a/scripts/tayga.confd b/scripts/tayga.confd
+index 51f37be..64f40a3 100644
+--- a/scripts/tayga.confd
++++ b/scripts/tayga.confd
+@@ -1,7 +1,7 @@
+ # This file is sourced by tayga's init.d script
+ # You may use it to custom configure the tun device
+ # At this point, the tun device has been created by tayga
+-# but Tayga has not yet started
++# but tayga has not yet started
+ 
+ tayga_pre() {
+     #ip link set up dev nat64
+diff --git a/tayga.8 b/tayga.8
+index 713de37..1b4d75e 100644
+--- a/tayga.8
++++ b/tayga.8
+@@ -45,14 +45,14 @@ The
+ .B \-\-mktun
+ and
+ .B \-\-rmtun
+-options instruct TAYGA to create or destroy, respectively, its configured TUN
++options instruct `tayga` to create or destroy, respectively, its configured TUN
+ device as a "persistent" interface and then immediately exit.
+ .P
+-Persistent TUN devices remain present on the host system even when TAYGA is
++Persistent TUN devices remain present on the host system even when `tayga` is
+ not running.  This allows host-side network parameters and firewall rules to
+ be configured prior to commencement of packet translation.  This may simplify
+ network configuration on the host; for example, systems which use a
+-Debian-style /etc/network/interfaces file may configure TAYGA's TUN device at
++Debian-style /etc/network/interfaces file may configure tayga's TUN device at
+ boot by running `tayga \-\-mktun` as a "pre-up" command and then configuring the
+ TUN device as any other network interface.
+ 
+diff --git a/tayga.c b/tayga.c
+index 6f97800..32d0739 100644
+--- a/tayga.c
++++ b/tayga.c
+@@ -377,9 +377,9 @@ static void print_op_info(void)
+ 	char addrbuf[64],addrbuf2[64];
+ 
+ 	inet_ntop(AF_INET, &gcfg->local_addr4, addrbuf, sizeof(addrbuf));
+-	slog(LOG_INFO, "TAYGA's IPv4 address: %s\n", addrbuf);
++	slog(LOG_INFO, "tayga's IPv4 address: %s\n", addrbuf);
+ 	inet_ntop(AF_INET6, &gcfg->local_addr6, addrbuf, sizeof(addrbuf));
+-	slog(LOG_INFO, "TAYGA's IPv6 address: %s\n", addrbuf);
++	slog(LOG_INFO, "tayga's IPv6 address: %s\n", addrbuf);
+ 	m6 = list_entry(gcfg->map6_list.prev, struct map6, list);
+ 	if (m6->type == MAP_TYPE_RFC6052) {
+ 		inet_ntop(AF_INET6, &m6->addr, addrbuf, sizeof(addrbuf));
+@@ -672,7 +672,7 @@ int main(int argc, char **argv)
+ 		close(pidfd);
+ 	}
+ 
+-	slog(LOG_INFO, "Starting TAYGA " TAYGA_VERSION "\n");
++	slog(LOG_INFO, "Starting tayga " TAYGA_VERSION "\n");
+ 	slog(LOG_DEBUG, "Compiled from " TAYGA_BRANCH "\n");
+ 	slog(LOG_DEBUG, "Commit " TAYGA_COMMIT "\n");
+ 
+diff --git a/tayga.conf.5 b/tayga.conf.5
+index ff78f77..0b402d2 100644
+--- a/tayga.conf.5
++++ b/tayga.conf.5
+@@ -1,10 +1,15 @@
+ .TH TAYGA.CONF "5" "Jun 2025" "TAYGA 0.9.6" ""
+ .SH NAME
+-tayga.conf \- configuration file of the TAYGA stateless NAT64 daemon
++tayga.conf \- configuration file of the 
++.B tayga
++stateless NAT64 daemon
+ .SH DESCRIPTION
+-This file contains the configuration parameters for the TAYGA stateless NAT64
++This file contains the configuration parameters for the
++.B tayga
++stateless NAT64
+ daemon.  It must exist and contain the mandatory configuration items or
+-TAYGA will refuse to run.
++.B tayga
++will refuse to run.
+ .P
+ The configuration directives are listed below.  With the exception of the
+ .B map
+@@ -12,15 +17,20 @@ directive, only one instance of each directive may appear in tayga.conf.
+ .TP
+ .BI "tun-device " device
+ Name of the network interface that will be created by the kernel TUN module
+-for TAYGA to exchange IPv4 and IPv6 packets with the in-kernel TCP/IP stack.
++for
++.B tayga
++to exchange IPv4 and IPv6 packets with the in-kernel TCP/IP stack.
+ If
+ .I device
+ does not already exist as a persistent interface (created by the
+ .B \-\-mktun
+ flag to tayga(8), for example), it will be created automatically when the
+-TAYGA daemon starts and destroyed when the daemon exits.
++.B tayga
++daemon starts and destroyed when the daemon exits.
+ .IP
+-Note that TAYGA does not configure the host-side parameters of
++Note that
++.B tayga
++does not configure the host-side parameters of
+ .I device.
+ This must be done by the system administrator using the ifconfig(8), route(8),
+ and/or ip(8) commands.
+@@ -28,8 +38,12 @@ and/or ip(8) commands.
+ This configuration directive is mandatory.
+ .TP
+ .BI "ipv4-addr " ipv4_address
+-IPv4 address that TAYGA will use as the source address for ICMPv4 errors
+-generated by the translation process.  TAYGA will also respond to ICMP echo
++IPv4 address that
++.B tayga
++will use as the source address for ICMPv4 errors
++generated by the translation process.
++.B tayga
++will also respond to ICMP echo
+ requests (pings) at this address.
+ .IP
+ .I ipv4_address
+@@ -42,20 +56,27 @@ will be removed from the pool of available addresses.
+ This configuration directive is mandatory.
+ .TP
+ .BI "ipv6-addr " ipv6_address
+-IPv6 address that TAYGA will use as the source address for ICMPv6 errors
+-generated by the translation process.  TAYGA will also respond to ICMPv6 echo
++IPv6 address that
++.B tayga
++will use as the source address for ICMPv6 errors
++generated by the translation process.
++.B tayga
++will also respond to ICMPv6 echo
+ requests (pings) at this address.
+ .IP
+ This configuration directive is mandatory unless the NAT64 prefix is specified
+ with the
+ .B prefix
+-directive, in which case TAYGA will generate its IPv6 address by mapping the
++directive, in which case
++.B tayga
++will generate its IPv6 address by mapping the
+ address specified in
+ .B ipv4-addr
+ into the NAT64 prefix.
+ .TP
+ .BI "prefix " ipv6_address/length
+-NAT64 prefix for mapping IPv4 addresses into the IPv6 address space.  TAYGA
++NAT64 prefix for mapping IPv4 addresses into the IPv6 address space.
++.B tayga
+ performs address translation as specified in RFC 6052, and only prefix lengths
+ allowed in that document will be permitted in the
+ .B prefix
+@@ -64,7 +85,9 @@ directive.
+ The use of either a Network-Specific Prefix or the Well-Known Prefix
+ (64:ff9b::/96) is allowed,
+ .B however,
+-as required by RFC 6052, TAYGA will refuse to translate packets with a
++as required by RFC 6052,
++.B tayga
++will refuse to translate packets with a
+ source or destination address composed of the Well-Known Prefix and a
+ non-global IPv4 address (10.x.x.x, 192.168.x.x, etc), unless the 
+ .B wkpf-strict
+@@ -123,12 +146,16 @@ length
+ must be 31 or less, as the lowest-numbered address in the prefix is considered
+ reserved and will not be used for dynamic assignment.
+ .IP
+-If TAYGA receives an IPv6 packet to be translated with an IPv6 source address
++If
++.B tayga
++receives an IPv6 packet to be translated with an IPv6 source address
+ that does not match any existing mapping rules (as specified by the
+ .B map
+ directive or the
+ .B prefix
+-directive), TAYGA will create a dynamic mapping between the IPv6 address and
++directive),
++.B tayga
++will create a dynamic mapping between the IPv6 address and
+ an IPv4 address drawn from the prefix specified by the
+ .B dynamic-pool
+ directive.  This mapping will be valid for two hours and four minutes after
+@@ -137,21 +164,31 @@ the last packet matching the mapping is translated.
+ The
+ .B dynamic-pool
+ directive is optional.  If it is not specified, all IPv6 addresses appearing
+-in packets passing through TAYGA must match the NAT64 prefix or a static
++in packets passing through
++.B tayga
++must match the NAT64 prefix or a static
+ mapping rule.
+ .TP
+ .BI "data-dir " path
+-The absolute path of a directory where TAYGA should store its data files.
+-Presently the only data file that TAYGA will store is the
++The absolute path of a directory where 
++.B tayga
++should store its data files.
++Presently the only data file that
++.B tayga
++will store is the
+ .I dynamic.map
+ file, which tracks dynamic address assignments made from the dynamic pool.
+ .IP
+ .I path
+ is also the directory that will be used as a chroot(2) "jail" if the
+ .B \-\-chroot
+-command-line option is specified to the TAYGA daemon.
++command-line option is specified to the
++.B tayga
++daemon.
+ .IP
+-The TAYGA daemon must have full permissions (rwx) to
++The
++.B tayga
++daemon must have full permissions (rwx) to
+ .I path
+ after it has dropped superuser privileges.  Generally this means that the
+ owner of
+@@ -162,10 +199,13 @@ command-line option.
+ .IP
+ The
+ .B data-dir
+-directive is optional. If not configured, TAYGA will check the environment variable 
++directive is optional. If not configured,
++.B tayga
++will check the environment variable 
+ .B STATE_DIRECTORY.
+ If neither is provided, dynamic mappings will be lost when the
+-TAYGA daemon is stopped.  Also, use of the
++.B tayga
++daemon is stopped.  Also, use of the
+ .B \-\-chroot
+ command-line option will not be possible.
+ .TP
+diff --git a/tayga.conf.example b/tayga.conf.example
+index e75d081..e0d5d45 100644
+--- a/tayga.conf.example
++++ b/tayga.conf.example
+@@ -1,11 +1,11 @@
+ #
+-# Sample configuration file for TAYGA 0.9.6
++# Sample configuration file for tayga 0.9.6
+ #
+ # Modify this to use your own addresses!!
+ #
+ 
+ #
+-# TUN device that TAYGA will use to exchange IPv4 and IPv6 packets with the
++# TUN device that tayga will use to exchange IPv4 and IPv6 packets with the
+ # kernel.  You may use any name you like, but `nat64' is recommended.
+ #
+ # This device may be created before starting the tayga daemon by running
+@@ -17,9 +17,9 @@
+ tun-device nat64
+ 
+ #
+-# TAYGA's IPv4 address.  This is NOT your router's IPv4 address!  TAYGA
++# tayga's IPv4 address.  This is NOT your router's IPv4 address!  tayga
+ # requires its own address because it acts as an IPv4 and IPv6 router, and
+-# needs to be able to send ICMP messages.  TAYGA will also respond to ICMP
++# needs to be able to send ICMP messages.  tayga will also respond to ICMP
+ # echo requests (ping) at this address.
+ #
+ # This address can safely be located inside the dynamic-pool prefix.
+@@ -29,12 +29,12 @@ tun-device nat64
+ ipv4-addr 192.168.255.1
+ 
+ #
+-# TAYGA's IPv6 address.  This is NOT your router's IPv6 address!  TAYGA
++# tayga's IPv6 address.  This is NOT your router's IPv6 address!  tayga
+ # requires its own address because it acts as an IPv4 and IPv6 router, and
+-# needs to be able to send ICMP messages.  TAYGA will also respond to ICMP
++# needs to be able to send ICMP messages.  tayga will also respond to ICMP
+ # echo requests (ping6) at this address.
+ #
+-# You can leave ipv6-addr unspecified and TAYGA will construct its IPv6
++# You can leave ipv6-addr unspecified and tayga will construct its IPv6
+ # address using ipv4-addr and the NAT64 prefix.
+ #
+ # Optional if the NAT64 prefix is specified, otherwise mandatory.  It is also
+@@ -72,7 +72,7 @@ prefix 2001:db8:1:ffff::/96
+ wkpf-strict no
+ 
+ #
+-# Dynamic pool prefix.  IPv6 hosts which send traffic through TAYGA (and do
++# Dynamic pool prefix. IPv6 hosts which send traffic through tayga (and do
+ # not correspond to a static map or an IPv4-translatable address in the NAT64
+ # prefix) will be assigned an IPv4 address from the dynamic pool.  Dynamic
+ # maps are valid for 124 minutes after the last matching packet is seen.
+@@ -86,12 +86,12 @@ wkpf-strict no
+ dynamic-pool 192.168.255.0/24
+ 
+ #
+-# Persistent data storage directory.  The dynamic.map file, which saves the
++# Persistent data storage directory. The dynamic.map file, which saves the
+ # dynamic maps that are created from dynamic-pool, is stored in this 
+ # directory.  Omit if you do not need these maps to be persistent between
+-# instances of TAYGA.
++# instances of tayga.
+ #
+-# Tayga will also respect the environment variable STATE_DIRECTORY if
++# tayga will also respect the environment variable STATE_DIRECTORY if
+ # this configuration flag is not set
+ #
+ # Optional.
+@@ -99,7 +99,7 @@ dynamic-pool 192.168.255.0/24
+ #data-dir /var/lib/tayga
+ 
+ #
+-# Establishes a single-host map.  If an IPv6 host should be consistently
++# Establishes a single-host map. If an IPv6 host should be consistently
+ # reachable at a specific IPv4 address, the mapping can be specified in a
+ # `map' directive.  (IPv6 hosts numbered with an IPv4-translatable address do
+ # not need map directives.)
+@@ -117,7 +117,7 @@ dynamic-pool 192.168.255.0/24
+ #
+ # Handling of UDP packets with zero checksum
+ # Per RFC7915, we can either drop the packet, or calculate a new checksum
+-# Additionally, Tayga also allows the option of forwarding the packet anyway
++# Additionally, tayga also allows the option of forwarding the packet anyway
+ #
+ # Valid values:
+ #   drop
+@@ -137,7 +137,7 @@ dynamic-pool 192.168.255.0/24
+ #   drop - packets which were DROPPED
+ #   reject - packets which were REJECTED (ICMP returned)
+ #   icmp - packets which returned an ICMP for any other reason
+-#   self - packets which were addressed to Tayga itself
++#   self - packets which were addressed to tayga itself
+ #   dyn - log dynamic pool mapping events
+ #
+ # Default value: none
+@@ -147,7 +147,7 @@ dynamic-pool 192.168.255.0/24
+ #
+ # Off-Link MTU
+ #
+-# Tayga will fragment IPv4->IPv6 packets which are larger than this size,
++# tayga will fragment IPv4->IPv6 packets which are larger than this size,
+ # unless the Don't Fragment bit is set. 
+ #
+ # IPv6 guarantees delivery of packets which are 1280 bytes or less. This
+@@ -155,7 +155,7 @@ dynamic-pool 192.168.255.0/24
+ # MTU on subsequent links. IPv6 routers do not fragment packets which are
+ # too large, and IPv4 does not require Path MTU Discovery be used. 
+ #
+-# Increasing this limit will allow Tayga to translate packets which are larger
++# Increasing this limit will allow tayga to translate packets which are larger
+ # than 1280 bytes, which may increase performance if you can guarantee that
+ # your network can transport packets up to this MTU end to end.
+ #
+diff --git a/test/addressing.py b/test/addressing.py
+index 65ebefd..800a1d6 100644
+--- a/test/addressing.py
++++ b/test/addressing.py
+@@ -231,14 +231,14 @@ def prefix_generic(pref,strict,expect_drop,expect_icmp):
+     test_prefix(pref,"198.19.255.255","Benchmarking Space within up",expect_drop,expect_icmp)
+     test_prefix(pref,"198.20.0.0","Behchmarking Space over",False,False)
+     # These prefixes should not be prevented from translation
+-    test_prefix(pref,"192.0.0.0","DSLite Space 0",False,False)
+-    test_prefix(pref,"192.0.0.1","DSLite Space 1",False,False)
+-    test_prefix(pref,"192.0.0.2","DSLite Space 2",False,False)
+-    test_prefix(pref,"192.0.0.3","DSLite Space 3",False,False)
+-    test_prefix(pref,"192.0.0.4","DSLite Space 4",False,False)
+-    test_prefix(pref,"192.0.0.5","DSLite Space 5",False,False)
+-    test_prefix(pref,"192.0.0.6","DSLite Space 6",False,False)
+-    test_prefix(pref,"192.0.0.7","DSLite Space 7",False,False)
++    test_prefix(pref,"192.0.0.0","DS-Lite Space 0",False,False)
++    test_prefix(pref,"192.0.0.1","DS-Lite Space 1",False,False)
++    test_prefix(pref,"192.0.0.2","DS-Lite Space 2",False,False)
++    test_prefix(pref,"192.0.0.3","DS-Lite Space 3",False,False)
++    test_prefix(pref,"192.0.0.4","DS-Lite Space 4",False,False)
++    test_prefix(pref,"192.0.0.5","DS-Lite Space 5",False,False)
++    test_prefix(pref,"192.0.0.6","DS-Lite Space 6",False,False)
++    test_prefix(pref,"192.0.0.7","DS-Lite Space 7",False,False)
+     test_prefix(pref,"192.88.99.52","6to4 Relay Space",False,False)
+ 
+     #Finished
+diff --git a/test/index.md b/test/index.md
+index 54830b1..da2a605 100644
+--- a/test/index.md
++++ b/test/index.md
+@@ -1,13 +1,17 @@
+-# Test Cases for Tayga
+-Tayga's test suite is broken up into integration tests (which test end-to-end packet processing) and unit tests. 
++# Test Cases for TAYGA
++
++TAYGA's test suite is broken up into integration tests (which test end-to-end packet processing) and unit tests.
+ 
+ ## Unit Tests
+-Each unit test is a c file in the test directory. To run all of the unit tests, run `make test`. The Makefile will compile with `-Werror` for unit testing, and then run each test. It will stop on the first failure. 
++
++Each unit test is a `c` file in the test directory. To run all of the unit tests, run `make test`. The Makefile will compile with `-Werror` for unit testing, and then run each test. It will stop on the first failure.
+ 
+ ## Integration Tets
+-Tayga integration tests are run on Linux using network namespaces. Tayga is developed on Debian. Tayga requires CAP_NET_ADMIN to bind to the tun device and the test suite requires sufficient permissions to create and manage network namespaces.
++
++`tayga` integration tests are run on Linux using network namespaces. `tayga` is developed on Debian. `tayga` requires CAP_NET_ADMIN to bind to the tun device and the test suite requires sufficient permissions to create and manage network namespaces.
+ 
+ The following packages are required:
++
+ ```sh
+ # Python and dependencies
+ apt install -y python3 python3-scapy python3-pyroute
+@@ -16,6 +20,7 @@ apt install -y python3 python3-scapy python3-pyroute
+ To run the full suite, run `make fullsuite`, which will run the unit tests followed by the integration tests. Each test has an expected number of passes and failure, and if these differ, the test will terminate with failure. The test requires sudo to manage network namespaces. If sudo is not available, override SUDO= with the path to your equivalent, or nothing if running the tests as root.
+ 
+ To run an individual test suite:
++
+ ```sh
+ # Create new network namespace
+ ip netns add tayga-test
+@@ -23,4 +28,4 @@ ip netns add tayga-test
+ ip netns exec tayga-test python3 test/addressing.py
+ # Delete network namespace
+ ip netns del tayga-test
+-```
+\ No newline at end of file
++```
+diff --git a/test/mapping.py b/test/mapping.py
+index 3acc3d7..a339d39 100644
+--- a/test/mapping.py
++++ b/test/mapping.py
+@@ -83,7 +83,7 @@ def rfc6052_mapping():
+     rt.apply()
+ 
+     # /32
+-    # Reconfigure Tayga:
++    # Reconfigure tayga:
+     test.tayga_conf.default()
+     test.tayga_conf.prefix = "3fff:6464::/32"
+     test.reload() 
+@@ -116,7 +116,7 @@ def rfc6052_mapping():
+ 
+ 
+     # /40
+-    # Reconfigure Tayga:
++    # Reconfigure tayga:
+     test.tayga_conf.prefix = "3fff:6464::/40"
+     test.reload()
+     #v6 -> v4
+@@ -148,7 +148,7 @@ def rfc6052_mapping():
+ 
+ 
+     # /48
+-    # Reconfigure Tayga:
++    # Reconfigure tayga:
+     test.tayga_conf.prefix = "3fff:6464::/48"
+     test.reload()
+     #v6 -> v4
+@@ -179,7 +179,7 @@ def rfc6052_mapping():
+     test.send_and_check(send_pkt,ip6_val, "/48 v4->v6")
+ 
+     # /56
+-    # Reconfigure Tayga:
++    # Reconfigure tayga:
+     test.tayga_conf.prefix = "3fff:6464::/56"
+     test.reload()
+     #v6 -> v4
+@@ -210,7 +210,7 @@ def rfc6052_mapping():
+     test.send_and_check(send_pkt,ip6_val, "/56 v4->v6")
+ 
+     # /64
+-    # Reconfigure Tayga:
++    # Reconfigure tayga:
+     test.tayga_conf.prefix = "3fff:6464::/64"
+     test.reload()
+     #v6 -> v4
+@@ -241,7 +241,7 @@ def rfc6052_mapping():
+     test.send_and_check(send_pkt,ip6_val, "/64 v4->v6")
+ 
+     # /96
+-    #reconfigure tayga
++    # Reconfigure tayga
+     test.tayga_conf.default()
+     test.reload()
+     expect_sa = test.public_ipv6_xlate
+@@ -371,7 +371,7 @@ def rfc7757_eam():
+             send_pkt = IP(dst=str(test.public_ipv6_xlate),src=str(this_net4.broadcast_address+1),proto=16) / Raw(expect_data)
+             test.send_and_check(send_pkt,ip6_val, test_nm+" src over v4->v6")
+ 
+-            # Restart Tayga to catch any caching issues here
++            # Restart tayga to catch any caching issues here
+             test.reload()
+             rt_v6.apply()
+             #v6 -> v4
+@@ -435,7 +435,7 @@ def rfc7757_eam():
+             expect_proto = 16
+ 
+     # Fail unequal lengths until #37 is resolved
+-    # That is commented out as it Tayga will exit with error
++    # That is commented out as it tayga will exit with error
+     test.tfail("Unequal Suffix Legnths","See Issue #37")
+ 
+     ####
+@@ -542,7 +542,7 @@ def rfc7757_eam():
+     test.send_and_check(send_pkt,ip6_val, "overlap src over net2 v4->v6")
+ 
+ 
+-    ## This section will crash Tayga
++    ## This section will crash tayga
+     ## So it has been commented out
+     test.tfail("IPv6 Overlapping Ranges","See Issue #10")
+     test.section("Explicit Address Mapping (RFC 7757 3.2)")
+@@ -616,7 +616,7 @@ def dynamic_pool():
+     test.send_and_check(send_pkt,ip_val, "send packet to map range without mapping")
+ 
+     # Send a packet to establish the mapping
+-    expect_sa = "169.254.0.80" #This depends on Tayga's hashing algorithm
++    expect_sa = "169.254.0.80" #This depends on tayga's hashing algorithm
+     expect_da = test.public_ipv4
+     expect_data = randbytes(128)
+     expect_len = 128+20
+diff --git a/test/test_env.py b/test/test_env.py
+index d10520d..1f6ae87 100755
+--- a/test/test_env.py
++++ b/test/test_env.py
+@@ -11,7 +11,7 @@ from enum import Enum
+ import socket
+ 
+ class route_dest(Enum):
+-    ROUTE_NORMAL = 0 # route to Tayga
++    ROUTE_NORMAL = 0 # route to tayga
+     ROUTE_TEST = 1 #route to test system
+     ROUTE_BLACKHOLE = 2
+     ROUTE_UNREACHABLE = 3
+@@ -112,7 +112,7 @@ class test_result:
+                 err.append(result.msg)
+         return ','.join(err)
+     
+-#Tayga conf file generator
++#tayga conf file generator
+ class confgen:
+     def __init__(self):
+         self.default()
+@@ -158,7 +158,7 @@ class confgen:
+ 
+ class test_env:
+     def cleanup(self):
+-        print("Stopping Tayga")
++        print("Stopping tayga")
+         
+         # Kill tcpdump process using the subprocess object
+         if hasattr(self, 'tcpdump_proc') and self.tcpdump_proc:
+@@ -170,17 +170,17 @@ class test_env:
+                 self.tcpdump_proc.kill()
+                 print("Tcpdump process did not terminate gracefully, force killed")
+ 
+-        # Kill Tayga process using the subprocess object
++        # Kill tayga process using the subprocess object
+         if hasattr(self, 'tayga_proc') and self.tayga_proc:
+             try:
+                 self.tayga_proc.terminate()
+                 self.tayga_proc.wait(timeout=5)
+             except subprocess.TimeoutExpired:
+                 self.tayga_proc.kill()
+-                print("Tayga process did not terminate gracefully, force killed")
++                print("tayga process did not terminate gracefully, force killed")
+         else:
+             if self.debug:
+-                print("Tayga process not found, skipping process termination")
++                print("tayga process not found, skipping process termination")
+ 
+         #Close tayga log file
+         if hasattr(self, 'tayga_log') and self.tayga_log is not None:
+@@ -238,8 +238,8 @@ class test_env:
+     def setup_tayga(self):
+         # Generate configl
+         self.tayga_conf.generate()
+-        print("Starting Tayga")
+-        # Start Tayga asynchronously and capture output to a file if specified
++        print("Starting tayga")
++        # Start tayga asynchronously and capture output to a file if specified
+         if self.tayga_log_file and not hasattr(self, 'tayga_log'):
+             try:
+                 self.tayga_log = open(self.tayga_log_file, "w")
+@@ -255,9 +255,9 @@ class test_env:
+             if self.use_valgrind:
+                 #Append valgrind command
+                 total_args.extend(self.valgrind_opts)
+-            # Append Tayga command
++            # Append ayga command
+             total_args.append(self.tayga_bin)
+-            # Append args to Tayga
++            # Append args to tayga
+             total_args.extend(new_args)
+             self.tayga_proc = subprocess.Popen(
+             total_args,
+@@ -265,17 +265,17 @@ class test_env:
+             stderr=subprocess.STDOUT
+             )
+         except subprocess.SubprocessError as e:
+-            print(f"Error while starting Tayga: {e}")
++            print(f"Error while starting tayga: {e}")
+             if self.tayga_log:
+                 self.tayga_log.close()
+             sys.exit(1)
+ 
+-        # Wait for a short time to ensure Tayga starts
++        # Wait for a short time to ensure tayga starts
+         time.sleep(1)
+ 
+-        # Check if Tayga started successfully
++        # Check if tayga started successfully
+         if self.tayga_proc.poll() is not None:  # Check if the process has already terminated
+-            print("Tayga failed to start")
++            print("tayga failed to start")
+             sys.exit(1)
+ 
+     def setup_tun(self):
+@@ -345,18 +345,18 @@ class test_env:
+         self.setup_tcpdump()
+ 
+     def reload(self):
+-        print("Restarting Tayga with new configuration")
+-        # Kill Tayga process using the subprocess object
++        print("Restarting tayga with new configuration")
++        # Kill tayga process using the subprocess object
+         if hasattr(self, 'tayga_proc') and self.tayga_proc:
+             try:
+                 self.tayga_proc.terminate()
+                 self.tayga_proc.wait(timeout=5)
+             except subprocess.TimeoutExpired:
+                 self.tayga_proc.kill()
+-                print("Tayga process did not terminate gracefully, force killed")
++                print("tayga process did not terminate gracefully, force killed")
+         else:
+             if self.debug:
+-                print("Tayga process not found, skipping process termination")
++                print("tayga process not found, skipping process termination")
+ 
+         # Reset link MTU
+         ifi = ipr.link_lookup(ifname='nat64')[0]
+diff --git a/test/translate.py b/test/translate.py
+index 6eac876..05ee4f5 100644
+--- a/test/translate.py
++++ b/test/translate.py
+@@ -699,7 +699,7 @@ def sec_4_2():
+     send_pkt = IP(dst=str(test.public_ipv6_xlate),src=str(test.public_ipv4)) / ICMP(type=3,code=2) / IP(dst=str(test.public_ipv4),src=str(test.public_ipv6_xlate)) / ICMP(type=8,code=0,id=221,seq=19)
+     test.send_and_check(send_pkt,icmp6_val, "Destination Unreachable Protocol Unreachable")
+ 
+-    # ICMPv4 Fragmentation Needed (and MTU is lower on Tayga)
++    # ICMPv4 Fragmentation Needed (and MTU is lower on tayga)
+     expect_class = ICMPv6PacketTooBig()
+     expect_type = 2
+     expect_code = 0
+@@ -718,7 +718,7 @@ def sec_4_2():
+     send_pkt = IP(dst=str(test.public_ipv6_xlate),src=str(test.public_ipv4)) / ICMP(type=3,code=4,nexthopmtu=1024) / IP(dst=str(test.public_ipv4),src=str(test.public_ipv6_xlate)) / ICMP(type=8,code=0,id=221,seq=19)
+     test.send_and_check(send_pkt,icmp6_val, "Fragmentation Needed (Small MTU)")
+ 
+-    # ICMPv4 Fragmentation Needed (and MTU is higher on Tayga)
++    # ICMPv4 Fragmentation Needed (and MTU is higher on tayga)
+     expect_mtu = 1500
+     send_pkt = IP(dst=str(test.public_ipv6_xlate),src=str(test.public_ipv4)) / ICMP(type=3,code=4,nexthopmtu=1600) / IP(dst=str(test.public_ipv4),src=str(test.public_ipv6_xlate)) / ICMP(type=8,code=0,id=221,seq=19)
+     test.send_and_check(send_pkt,icmp6_val, "Fragmentation Needed (Large MTU)")
+@@ -1081,21 +1081,21 @@ def sec_4_4():
+     test.tayga_conf.default()
+     test.reload()
+ 
+-    # Hop Limit Exceeded in Tayga (Data payload)
++    # Hop Limit Exceeded in tayga (Data payload)
+     expect_sa = str(test.tayga_ipv4)
+     expect_da = str(test.public_ipv4)
+     expect_type = 11
+     expect_code = 0
+     send_pkt = IP(dst=str(test.public_ipv6_xlate),src=str(test.public_ipv4),ttl=2) / UDP(sport=6969,dport=69,len=72) / Raw(randbytes(64))
+-    test.send_and_check(send_pkt,icmp4_val, "Hop Limit Exceeded in Tayga (UDP)")
++    test.send_and_check(send_pkt,icmp4_val, "Hop Limit Exceeded in tayga (UDP)")
+ 
+-    # Hop Limit Exceeded in Tayga (ICMP payload)
++    # Hop Limit Exceeded in tayga (ICMP payload)
+     send_pkt = IP(dst=str(test.public_ipv6_xlate),src=str(test.public_ipv4),ttl=2) / ICMP(type=8,code=0,id=24,seq=71)
+-    test.send_and_check(send_pkt,icmp4_val, "Hop Limit Exceeded in Tayga (ICMP Echo)")
++    test.send_and_check(send_pkt,icmp4_val, "Hop Limit Exceeded in tayga (ICMP Echo)")
+ 
+-    # Hop Limit Exceeded in Tayga (ICMP error)
++    # Hop Limit Exceeded in tayga (ICMP error)
+     send_pkt = IP(dst=str(test.public_ipv6_xlate),src=str(test.public_ipv4),ttl=2) / ICMP(type=3,code=0,id=24,seq=71)
+-    test.send_and_none(send_pkt, "Hop Limit Exceeded in Tayga (ICMP Error)")
++    test.send_and_none(send_pkt, "Hop Limit Exceeded in tayga (ICMP Error)")
+ 
+     
+     # IPv4 Requires Fragmentation - DF Bit Set
+@@ -1107,9 +1107,9 @@ def sec_4_4():
+     test.send_and_check(send_pkt,icmp4_val, "Frag Required and DF Bit Set")
+ 
+ 
+-    # Host Unrech - within Tayga pool4 but not allocated
++    # Host Unrech - within tayga pool4 but not allocated
+ 
+-    # Proto Unrech - addressed to Tayga itself but not ICMP
++    # Proto Unrech - addressed to tayga itself but not ICMP
+ 
+     # Invalid Addressing must be done with wkpf-strict
+     test.tayga_conf.default()
+@@ -1408,10 +1408,10 @@ def sec_5_2():
+     test.send_and_check(send_pkt,icmp4_val, "Packet Too Big")
+ 
+ 
+-    # Packet Too Big (w/ MTU above Tayga's MTU)
++    # Packet Too Big (w/ MTU above tayga's MTU)
+     expect_type = 3
+     expect_code = 4
+-    expect_mtu = 1480 # clamped from 1500 mtu on Tayga tun adapter
++    expect_mtu = 1480 # clamped from 1500 mtu on tayga tun adapter
+     send_pkt = IPv6(dst=str(test.public_ipv4_xlate),src=str(test.public_ipv6)) / ICMPv6PacketTooBig(mtu=1600) / IPv6(dst=str(test.public_ipv6),src=str(test.public_ipv4_xlate)) / ICMPv6EchoRequest()
+     test.send_and_check(send_pkt,icmp4_val, "Packet Really Too Big")
+     expect_mtu = -1
+@@ -1470,7 +1470,7 @@ def sec_5_2():
+     #  if the ICMPv6 error is from an IPv6 router on path
+     #############################################
+ 
+-    # Expected source address is Tayga's own address
++    # Expected source address is tayga's own address
+     expect_sa = test.tayga_ipv4
+ 
+     # No Route to Destination
+@@ -1520,10 +1520,10 @@ def sec_5_2():
+     send_pkt = IPv6(dst=str(test.public_ipv4_xlate),src=str(test.icmp_router_ipv6)) / ICMPv6PacketTooBig(mtu=expect_mtu+20) / IPv6(dst=str(test.public_ipv6),src=str(test.public_ipv4_xlate)) / ICMPv6EchoRequest()
+     test.send_and_check(send_pkt,icmp4_val, "Packet Too Big")
+ 
+-    # Packet Too Big (w/ MTU above Tayga's MTU)
++    # Packet Too Big (w/ MTU above tayga's MTU)
+     expect_type = 3
+     expect_code = 4
+-    expect_mtu = 1480 # clamped from 1500 mtu on Tayga tun adapter
++    expect_mtu = 1480 # clamped from 1500 mtu on tayga tun adapter
+     send_pkt = IPv6(dst=str(test.public_ipv4_xlate),src=str(test.icmp_router_ipv6)) / ICMPv6PacketTooBig(mtu=1600) / IPv6(dst=str(test.public_ipv6),src=str(test.public_ipv4_xlate)) / ICMPv6EchoRequest()
+     test.send_and_check(send_pkt,icmp4_val, "Packet Really Too Big")
+     expect_mtu = -1
+@@ -1653,21 +1653,21 @@ def sec_5_4():
+     test.tayga_conf.default()
+     test.reload()
+ 
+-    # Hop Limit Exceeded In Tayga (UDP)
++    # Hop Limit Exceeded In tayga (UDP)
+     expect_class = ICMPv6TimeExceeded()
+     expect_sa = test.tayga_ipv6
+     expect_type = 3
+     expect_code = 0
+     send_pkt = IPv6(dst=str(test.public_ipv4_xlate),src=str(test.public_ipv6),hlim=2) / UDP(sport=6969,dport=69,len=72) / Raw(randbytes(64))
+-    test.send_and_check(send_pkt,icmp6_val, "Hop Limit Exceeded in Tayga (UDP)")
++    test.send_and_check(send_pkt,icmp6_val, "Hop Limit Exceeded in tayga (UDP)")
+    
+-    # Hop Limit Exceeded In Tayga (ICMP)
++    # Hop Limit Exceeded In tayga (ICMP)
+     send_pkt = IPv6(dst=str(test.public_ipv4_xlate),src=str(test.public_ipv6),hlim=2) / ICMPv6EchoRequest(id=42,seq=89)
+-    test.send_and_check(send_pkt,icmp6_val, "Hop Limit Exceeded in Tayga (ICMP)")
++    test.send_and_check(send_pkt,icmp6_val, "Hop Limit Exceeded in tayga (ICMP)")
+    
+-    # Hop Limit Exceeded In Tayga (ICMP Error)
++    # Hop Limit Exceeded In tayga (ICMP Error)
+     send_pkt = IPv6(dst=str(test.public_ipv4_xlate),src=str(test.public_ipv6),hlim=2) / ICMPv6EchoReply(id=43,seq=88)
+-    test.send_and_none(send_pkt, "Hop Limit Exceeded in Tayga (ICMP Error)")
++    test.send_and_none(send_pkt, "Hop Limit Exceeded in tayga (ICMP Error)")
+     
+     # Packet Too Big (Linux masks this one)
+     #expect_class = ICMPv6PacketTooBig()
+@@ -1675,7 +1675,7 @@ def sec_5_4():
+     #test.send_and_check(send_pkt,icmp6_val, "Packet Too Big")
+ 
+ 
+-    # Protocol addressed to Tayga
++    # Protocol addressed to tayga
+     expect_class = ICMPv6ParamProblem()
+     expect_type = 4
+     expect_code = 1

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-10-26 14:53 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-26 14:53 [rpms/tayga] epel10: patch set for epel10, similar to requested in pr2 Ingvar Hagelund

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox