2005-10-05 jrandom
* Allow the first few packets in the stream to fill in their IDs during handshake (thanks cervantes, Complication, et al!) This should fix at least some of the intermittent HTTP POST issues.
This commit is contained in:
@ -936,8 +936,10 @@ public class Connection {
|
||||
_packet.setFlag(Packet.FLAG_DELAY_REQUESTED);
|
||||
_packet.setOptionalMaxSize(getOptions().getMaxMessageSize());
|
||||
_packet.setResendDelay(getOptions().getResendDelay());
|
||||
//_packet.setReceiveStreamId(_receiveStreamId);
|
||||
//_packet.setSendStreamId(_sendStreamId);
|
||||
if (_packet.getReceiveStreamId() <= 0)
|
||||
_packet.setReceiveStreamId(_receiveStreamId);
|
||||
if (_packet.getSendStreamId() <= 0)
|
||||
_packet.setSendStreamId(_sendStreamId);
|
||||
|
||||
int newWindowSize = getOptions().getWindowSize();
|
||||
|
||||
|
@ -152,7 +152,8 @@ public class Packet {
|
||||
/** what stream do we send data to the peer on? */
|
||||
public long getSendStreamId() { return _sendStreamId; }
|
||||
public void setSendStreamId(long id) {
|
||||
if (_sendStreamIdSet) throw new RuntimeException("Send stream ID already set [" + _sendStreamId + ", " + id + "]");
|
||||
if ( (_sendStreamIdSet) && (_sendStreamId > 0) )
|
||||
throw new RuntimeException("Send stream ID already set [" + _sendStreamId + ", " + id + "]");
|
||||
_sendStreamIdSet = true;
|
||||
_sendStreamId = id;
|
||||
}
|
||||
@ -164,7 +165,8 @@ public class Packet {
|
||||
*/
|
||||
public long getReceiveStreamId() { return _receiveStreamId; }
|
||||
public void setReceiveStreamId(long id) {
|
||||
if (_receiveStreamIdSet) throw new RuntimeException("Receive stream ID already set [" + _receiveStreamId + ", " + id + "]");
|
||||
if ( (_receiveStreamIdSet) && (_receiveStreamId > 0) )
|
||||
throw new RuntimeException("Receive stream ID already set [" + _receiveStreamId + ", " + id + "]");
|
||||
_receiveStreamIdSet = true;
|
||||
_receiveStreamId = id;
|
||||
}
|
||||
|
@ -161,7 +161,8 @@ public class PacketHandler {
|
||||
}
|
||||
} else {
|
||||
if ( (con.getSendStreamId() <= 0) ||
|
||||
(DataHelper.eq(con.getSendStreamId(), packet.getReceiveStreamId())) ) {
|
||||
(DataHelper.eq(con.getSendStreamId(), packet.getReceiveStreamId())) ||
|
||||
(packet.getSequenceNum() <= 5) ) { // its in flight from the first batch
|
||||
long oldId =con.getSendStreamId();
|
||||
if (packet.isFlagSet(Packet.FLAG_SYNCHRONIZE)) // con fully established, w00t
|
||||
con.setSendStreamId(packet.getReceiveStreamId());
|
||||
@ -229,7 +230,7 @@ public class PacketHandler {
|
||||
if (sendId <= 0) {
|
||||
Connection con = _manager.getConnectionByOutboundId(packet.getReceiveStreamId());
|
||||
if (con != null) {
|
||||
if (con.getAckedPackets() <= 0) {
|
||||
if ( (con.getHighestAckedThrough() <= 5) && (packet.getSequenceNum() <= 5) ) {
|
||||
if (_log.shouldLog(Log.DEBUG))
|
||||
_log.debug("Received additional packets before the syn on " + con + ": " + packet);
|
||||
receiveKnownCon(con, packet);
|
||||
|
@ -1,4 +1,9 @@
|
||||
$Id: history.txt,v 1.281 2005/10/04 02:36:25 jrandom Exp $
|
||||
$Id: history.txt,v 1.282 2005/10/04 18:43:05 jrandom Exp $
|
||||
|
||||
2005-10-05 jrandom
|
||||
* Allow the first few packets in the stream to fill in their IDs during
|
||||
handshake (thanks cervantes, Complication, et al!) This should fix at
|
||||
least some of the intermittent HTTP POST issues.
|
||||
|
||||
2005-10-04 jrandom
|
||||
* Syndie patch for single user remote archives (thanks nickless_head!)
|
||||
|
@ -1,11 +1,10 @@
|
||||
$Id: install-headless.txt,v 1.4 2004/12/21 11:32:50 jrandom Exp $
|
||||
$Id: install-headless.txt,v 1.5 2005/09/29 14:19:23 jrandom Exp $
|
||||
Headless I2P installation instructions
|
||||
|
||||
1) tar xjf i2p.tar.bz2 (you've already done this)
|
||||
2) cd i2p ; vi install-headless.txt (you're doing this now)
|
||||
3) java -jar lib/reseed.jar (optional)
|
||||
4) sh postinstall.sh (this launches the router)
|
||||
5) lynx http://localhost:7657/index.jsp (configure the router)
|
||||
3) sh postinstall.sh (this launches the router)
|
||||
4) lynx http://localhost:7657/index.jsp (configure the router)
|
||||
|
||||
If you're having trouble, swing by http://forum.i2p.net/, check the
|
||||
website at http://www.i2p.net/, or get on irc://irc.freenode.net/#i2p
|
||||
|
@ -15,9 +15,9 @@ import net.i2p.CoreVersion;
|
||||
*
|
||||
*/
|
||||
public class RouterVersion {
|
||||
public final static String ID = "$Revision: 1.256 $ $Date: 2005/10/04 02:36:25 $";
|
||||
public final static String ID = "$Revision: 1.257 $ $Date: 2005/10/04 18:43:05 $";
|
||||
public final static String VERSION = "0.6.1.1";
|
||||
public final static long BUILD = 3;
|
||||
public final static long BUILD = 4;
|
||||
public static void main(String args[]) {
|
||||
System.out.println("I2P Router version: " + VERSION + "-" + BUILD);
|
||||
System.out.println("Router ID: " + RouterVersion.ID);
|
||||
|
@ -488,8 +488,8 @@ public class TCPTransport extends TransportImpl {
|
||||
if (Boolean.valueOf(allowLocal).booleanValue()) {
|
||||
return true;
|
||||
} else {
|
||||
if (_log.shouldLog(Log.ERROR))
|
||||
_log.error("External address " + address + " is not publicly routable");
|
||||
if (_log.shouldLog(Log.WARN))
|
||||
_log.warn("External address " + address + " is not publicly routable");
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
@ -726,11 +726,12 @@ public class TCPTransport extends TransportImpl {
|
||||
continue;
|
||||
}
|
||||
if (!allowAddress(tcpAddr)) {
|
||||
_log.error("Message points at illegal address! "
|
||||
+ msg.getTarget().getIdentity().calculateHash().toBase64().substring(0,6));
|
||||
_log.error("Message points at illegal address! router "
|
||||
+ msg.getTarget().getIdentity().calculateHash().toBase64().substring(0,6)
|
||||
+ " address " + tcpAddr.toString());
|
||||
|
||||
iter.remove();
|
||||
_context.shitlist().shitlistRouter(peer, "Invalid addressaddress...");
|
||||
_context.shitlist().shitlistRouter(peer, "Invalid TCP address...");
|
||||
_context.netDb().fail(peer);
|
||||
for (int i = 0; i < msgs.size(); i++) {
|
||||
OutNetMessage cur = (OutNetMessage)msgs.get(i);
|
||||
|
Reference in New Issue
Block a user