forked from I2P_Developers/i2p.i2p
SSU: Add option to disable extended options
Fix max payload type
This commit is contained in:
@@ -136,6 +136,7 @@ class EstablishmentManager {
|
||||
*
|
||||
*/
|
||||
private static final String VERSION_ALLOW_EXTENDED_OPTIONS = "0.9.22";
|
||||
private static final String PROP_DISABLE_EXT_OPTS = "i2np.udp.disableExtendedOptions";
|
||||
|
||||
|
||||
public EstablishmentManager(RouterContext ctx, UDPTransport transport) {
|
||||
@@ -369,7 +370,8 @@ class EstablishmentManager {
|
||||
return;
|
||||
}
|
||||
boolean allowExtendedOptions = VersionComparator.comp(toRouterInfo.getVersion(),
|
||||
VERSION_ALLOW_EXTENDED_OPTIONS) >= 0;
|
||||
VERSION_ALLOW_EXTENDED_OPTIONS) >= 0
|
||||
&& !_context.getBooleanProperty(PROP_DISABLE_EXT_OPTS);
|
||||
// w/o ext options, it's always 'requested', no need to set
|
||||
boolean requestIntroduction = allowExtendedOptions && _transport.introducersRequired();
|
||||
state = new OutboundEstablishState(_context, maybeTo, to,
|
||||
|
@@ -85,9 +85,9 @@ class UDPPacket implements CDQEntry {
|
||||
public static final int PAYLOAD_TYPE_RELAY_INTRO = 5;
|
||||
public static final int PAYLOAD_TYPE_DATA = 6;
|
||||
public static final int PAYLOAD_TYPE_TEST = 7;
|
||||
public static final int MAX_PAYLOAD_TYPE = PAYLOAD_TYPE_TEST;
|
||||
/** @since 0.8.1 */
|
||||
public static final int PAYLOAD_TYPE_SESSION_DESTROY = 8;
|
||||
public static final int MAX_PAYLOAD_TYPE = PAYLOAD_TYPE_SESSION_DESTROY;
|
||||
|
||||
// various flag fields for use in the header
|
||||
/**
|
||||
|
Reference in New Issue
Block a user