Changeset 7d9207d for router


Ignore:
Timestamp:
Jul 4, 2018 4:22:56 PM (2 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
43c2018
Parents:
9ac3157
Message:

NTCP: Don't advertise interface addresses when configured for force-firewalled
log tweaks

Location:
router/java/src/net/i2p/router
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • router/java/src/net/i2p/router/RouterVersion.java

    r9ac3157 r7d9207d  
    1919    public final static String ID = "Monotone";
    2020    public final static String VERSION = CoreVersion.VERSION;
    21     public final static long BUILD = 3;
     21    public final static long BUILD = 4;
    2222
    2323    /** for example "-test" */
  • router/java/src/net/i2p/router/transport/TransportImpl.java

    r9ac3157 r7d9207d  
    8484    public TransportImpl(RouterContext context) {
    8585        _context = context;
    86         _log = _context.logManager().getLog(TransportImpl.class);
     86        _log = _context.logManager().getLog(getClass());
    8787
    8888        _context.statManager().createRateStat("transport.sendMessageFailureLifetime", "How long the lifetime of messages that fail are?", "Transport", new long[] { 60*1000l, 10*60*1000l, 60*60*1000l, 24*60*60*1000l });
  • router/java/src/net/i2p/router/transport/ntcp/NTCPTransport.java

    r9ac3157 r7d9207d  
    403403                    afterSend(msg, false);
    404404                } catch (IllegalStateException ise) {
    405                     _log.error("Failed opening a channel", ise);
     405                    if (_log.shouldWarn())
     406                        _log.warn("Failed opening a channel", ise);
    406407                    afterSend(msg, false);
    407408                }
     
    772773            // received by externalAddressReceived() from TransportManager
    773774            port = _ssuPort;
     775        boolean isFixedOrForceFirewalled = _context.getProperty(PROP_I2NP_NTCP_AUTO_IP, "true")
     776                                           .toLowerCase(Locale.US).equals("false");
    774777        RouterAddress myAddress = bindAddress(port);
    775778        if (myAddress != null) {
     
    779782            // specified host, bound to wildcard
    780783            replaceAddress(addr);
    781         } else if (port > 0) {
     784        } else if (port > 0 && !isFixedOrForceFirewalled) {
    782785            // all detected interfaces
    783786            Collection<InetAddress> addrs = getSavedLocalAddresses();
Note: See TracChangeset for help on using the changeset viewer.