UI改进
This commit is contained in:
@@ -76,7 +76,7 @@ import com.google.gson.internal.Pair;
|
||||
public class SRv6Router {
|
||||
private static final boolean debug = false;
|
||||
|
||||
public static final int MTU = 8192;
|
||||
public static final int MTU = 16384;
|
||||
|
||||
public static final int MAX_REROUTE_COUNT=2;//1
|
||||
|
||||
@@ -417,7 +417,7 @@ public class SRv6Router {
|
||||
segmentsLeft--;
|
||||
}
|
||||
List<Inet6Address> repairSegments= klalbRouteProtol.createSegmentList(srh.getAddresses().get(segmentsLeft));
|
||||
if(repairSegments ==null) {
|
||||
if(repairSegments ==null||repairSegments.isEmpty()) {
|
||||
System.out.println("FRR保护失败");
|
||||
return;
|
||||
}
|
||||
@@ -589,15 +589,15 @@ public class SRv6Router {
|
||||
|
||||
}
|
||||
if(retry) {
|
||||
if(System.nanoTime()-start>200000000L) {
|
||||
if(System.nanoTime()-start>1000000L) {
|
||||
break;
|
||||
}
|
||||
try {
|
||||
/*try {
|
||||
Thread.sleep(1);
|
||||
} catch (InterruptedException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
//Thread.yield();
|
||||
}*/
|
||||
Thread.yield();
|
||||
//短暂挂起当前线程,待链路速度未超限时重试发送数据包
|
||||
}
|
||||
}while((!routes.isEmpty())&&retry);
|
||||
@@ -713,6 +713,7 @@ public class SRv6Router {
|
||||
srhh.setSegmentsLeft(newSL);
|
||||
iPv6Packet.setDestinationAddress(srhh.getAddresses().get(newSL));
|
||||
}
|
||||
if(iPv6Packet.getPayload().getProtocolNumber()!=KLALBRoutingProtocol.DEFAULT_PROTOCOL_NUMBER)
|
||||
klalbRouteProtol.putHotspotAddress(iPv6Packet.getSourceAddress());
|
||||
routePacket(iPv6Packet,reroute);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user