Commit 165e39e9 authored by Bernd Paysan's avatar Bernd Paysan

Fix disabling IPv6

parent a1b48b31
......@@ -121,7 +121,6 @@ User dest-0key< \ pointer to obtained dest-0key
host:key @ dest-0key< !
host:portv6 w@ sockaddr1 port be-w!
host:ipv6 sockaddr1 sin6_addr ip6!
flowlabel( rng32 $7FFFF and sockaddr1 sin6_flowinfo be-l! )
host:route $@ !temp-addr ;
: addr>4sock ( -- )
......
......@@ -84,7 +84,6 @@ debug: deprecated( \ deprecated stuff
debug: unhandled( \ unhandled commands
debug: syncfile( \ synchronous file operations
debug: newvault( \ new style vault keys
debug: flowlabel( \ experiment with flow labels
-db profile( \ don't profile by default )
+db ipv6( \ ipv6 should be on by default )
......
......@@ -130,7 +130,7 @@ Forward .addr$
: sock-rest ( sockaddr -- addr u ) >r
AF_INET6 r@ family w!
flowlabel( )else( 0 r@ sin6_flowinfo l! )
0 r@ sin6_flowinfo l!
0 r@ sin6_scope_id l!
r> sockaddr_in6 ;
......@@ -139,7 +139,7 @@ Forward .addr$
r> sockaddr_in4 ;
: my-port ( -- port )
ipv6( )else( sockaddr_in4 )else( sockaddr_in6 ) alen !
ipv6( sockaddr_in6 )else( sockaddr_in4 ) alen !
net2o-sock [IFDEF] no-hybrid drop [THEN] sockaddr1 alen getsockname ?ior
sockaddr1 port be-uw@ ;
......
......@@ -77,7 +77,7 @@ $40 Constant min-size
1 Value buffers#
min-size max-size^2 lshift Value maxdata ( -- n )
maxdata overhead + Value maxpacket
maxpacket $F + -$10 and Value maxpacket-aligned
maxpacket $F + -$10 and #1216 umax Value maxpacket-aligned
max-size^2 6 + Value chunk-p2
$10 Constant key-salt#
$10 Constant key-cksum#
......@@ -1388,7 +1388,7 @@ queue-class >osize @ buffer: queue-adder
eval-queue wait-send ;
User try-reads
4 Value try-read#
0 Value try-read#
: read-a-packet4/6 ( -- addr u )
pollfds [ pollfd revents ]L + w@ POLLIN and IF try-reads off
......
......@@ -60,7 +60,7 @@ $00000000 Value rec-droprate#
: read-a-packet ( blockage -- addr u / 0 0 )
>r sockaddr_in alen !
net2o-sock [IFDEF] no-hybrid drop [THEN]
inbuf maxpacket r> sockaddr< alen recvfrom
inbuf maxpacket-aligned r> sockaddr< alen recvfrom
dup 0< IF
errno dup EAGAIN = IF 2drop #0. EXIT THEN
#512 + negate throw THEN
......@@ -72,7 +72,7 @@ $00000000 Value rec-droprate#
: read-a-packet4 ( blockage -- addr u / 0 0 )
>r sockaddr_in alen !
net2o-sock nip
inbuf maxpacket r> sockaddr< alen recvfrom
inbuf maxpacket-aligned r> sockaddr< alen recvfrom
dup 0< IF
errno dup EAGAIN = IF 2drop #0. EXIT THEN
THEN
......@@ -121,7 +121,7 @@ $00000000 Value droprate#
: info@ ( info -- addr u )
dup ai_addr @ swap ai_addrlen l@ ;
: info>string ( info -- addr u )
info@ ?>ipv6 ;
info@ ipv6( ?>ipv6 ) ;
: -$split ( addr u char -- addr1 u1 addr2 u2 ) \ gforth-string string-split
\G divides a string into two, with one char as separator (e.g. '?'
......@@ -139,7 +139,7 @@ $00000000 Value droprate#
UValue lastaddr#
User lastn2oaddr
: insert-address ( addr u -- net2o-addr ) ?<ipv6
: insert-address ( addr u -- net2o-addr ) ipv6( ?<ipv6 )
address( ." Insert address " 2dup .address cr )
lastaddr# IF 2dup lastaddr# $@ str=
IF 2drop lastn2oaddr @ EXIT THEN
......
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