Browse Source

Plan 9 from Bell Labs 2009-11-17

David du Colombier 14 years ago
parent
commit
c7c819dead
3 changed files with 6 additions and 6 deletions
  1. 3 1
      sys/man/8/6in4
  2. 1 1
      sys/src/9/ip/ipv6.h
  3. 2 4
      sys/src/cmd/ip/6in4.c

+ 3 - 1
sys/man/8/6in4

@@ -82,7 +82,9 @@ instead of
 .PD
 .SH EXAMPLES
 If your primary IPv4 address is public,
-you can start a 6to4 tunnel simply with
+you can start a
+.I 6to4
+tunnel simply with
 .IP
 .EX
 ip/6in4 -g

+ 1 - 1
sys/src/9/ip/ipv6.h

@@ -78,7 +78,7 @@ enum {
 	/* various flags & constants */
 	v6MINTU		= 1280,
 	HOP_LIMIT	= 255,
-	IP6HDR		= 20,		/* sizeof(Ip6hdr) */
+	IP6HDR		= 40,		/* sizeof(Ip6hdr) = 8 + 2*16 */
 
 	/* option types */
 

+ 2 - 4
sys/src/cmd/ip/6in4.c

@@ -146,10 +146,8 @@ setup(int *v6net, int *tunp)
 	/*
 	 * gain access to IPv6-in-IPv4 packets
 	 */
-	p = seprint(buf, buf + sizeof buf, "%s/ipmux!proto=%2.2x",
-		net, IP_IPV6PROTO);
-	if (1)
-		seprint(p, buf + sizeof buf, ";dst=%V", myip + IPv4off);
+	p = seprint(buf, buf + sizeof buf, "%s/ipmux!proto=%2.2x;dst=%V",
+		net, IP_IPV6PROTO, myip + IPv4off);
 	if (!anysender)
 		seprint(p, buf + sizeof buf, ";src=%V", remote4 + IPv4off);
 	*tunp = dial(buf, 0, 0, 0);