Skip to contentSkip to conversation

IPv6: Allow 6to4 routes with SIT

PATCH New Mika Liljeberg 1 participant 1 message Jul 12, 2003

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 IPv6: Allow 6to4 routes with SIT

Ok, I've separated out the SIT fix. A revised anycast fix will follow.

This is against 2.5.75. The patch will allow a host to set up SIT tunnels using gateway routes to 6to4 addresses. Previously this only worked with an IPv4-compatible address. Use of the deprecated IPv4-compatible addresses should not be required.

Thanks,

MikaL

net/ipv6/sit.c renamed from linux-2.5.75/net/ipv6/sit.c +6 -3
diff -ur orig/linux-2.5.75/net/ipv6/sit.c linux-2.5.75/net/ipv6/sit.c
@@ -472,10 +472,13 @@
 			addr_type = ipv6_addr_type(addr6);
 		}
 
-		if ((addr_type & IPV6_ADDR_COMPATv4) == 0)
-			goto tx_error_icmp;
+		if (addr_type & IPV6_ADDR_COMPATv4)
+			dst = addr6->s6_addr32[3];
+		else
+			dst = try_6to4(addr6);
 
-		dst = addr6->s6_addr32[3];
+		if (!dst)
+			goto tx_error_icmp;
 	}
 
 	{