Commit 7a6c6163 authored by Bernd Paysan's avatar Bernd Paysan

Auto-detection for dns64 environment

parent cb1eeddf
......@@ -30,7 +30,7 @@ Variable priv-addr$ \ unpublished addresses (with sigs)
Create fake-ip4 $0000 w, $0000 w, $0000 w, $0000 w, $0000 w, $FFFF w,
\ prefix for IPv4 addresses encoded as IPv6
Create nat64-ip4 $0064 w, $ff9b w, $0000 w, $0000 w, $0000 w, $0000 w,
Create nat64-ip4 $0064 wbe w, $ff9b wbe w, $0000 w, $0000 w, $0000 w, $0000 w,
\ prefix for IPv4 addresses via NAT64
: >alen ( addr -- alen )
......
......@@ -167,6 +167,16 @@ Variable lastn2oaddr
routes# #.key dup 0= ?EXIT
$@ sockaddr> over alen ! sockaddr_in smove true ;
\ query if we have a DNS64 environment
Variable net2o-ipv4 "ipv4.net2o.de" net2o-ipv4 $!
: dns64? ( -- flag )
net2o-ipv4 $@ net2o-port get-info info@
sockaddr_in6 = over family w@ AF_INET6 = IF
sin6_addr $C nat64-ip4 over str=
ELSE drop false THEN ;
\ route an incoming packet
: >rpath-len ( rpath -- rpath len )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment