Ignore:
Timestamp:
11/26/08 02:51:23 (3 years ago)
Author:
wd
Message:

Prevent data that shoots past the buffer limit in 1459-style protocols from
being treated as a new command.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/ithildin-1.1/modules/ircd/connection.h

    r772 r828  
    4646    } stats; 
    4747 
    48 #define IRCD_CONNFL_DNS_PTR     0x1 
    49 #define IRCD_CONNFL_DNS_ADDR    0x2 
    50 #define IRCD_CONNFL_DNS        (IRCD_CONNFL_DNS_PTR | IRCD_CONNFL_DNS_ADDR) 
    51 #define IRCD_CONNFL_IDENT       0x4 
    52 #define IRCD_CONNFL_STAGE2      0x8 
     48#define IRCD_CONNFL_DNS_PTR         0x1 
     49#define IRCD_CONNFL_DNS_ADDR        0x2 
     50#define IRCD_CONNFL_DNS            (IRCD_CONNFL_DNS_PTR | IRCD_CONNFL_DNS_ADDR) 
     51#define IRCD_CONNFL_IDENT           0x4 
     52#define IRCD_CONNFL_STAGE2          0x8 
    5353#define IRCD_CONN_DONE(x)                                                     \ 
    5454    (((x)->flags & (IRCD_CONNFL_DNS | IRCD_CONNFL_IDENT)) ==                  \ 
     
    5656#define IRCD_CONN_NEED_STAGE2(x) (!((x)->flags & IRCD_CONNFL_STAGE2)) 
    5757 
    58 #define IRCD_CONNFL_WRITEABLE 0x100 /* set if the socket is writeable */ 
     58#define IRCD_CONNFL_WRITEABLE       0x100 /* set if the socket is writeable */ 
    5959#define CONN_PINGSENT(conn) (conn->flags & IRCD_CONNFL_PINGSENT) 
    60 #define IRCD_CONNFL_PINGSENT  0x200 /* set when a PING is sent to test for 
    61                                        activity */ 
     60#define IRCD_CONNFL_PINGSENT        0x200 /* set when a PING is sent to test 
     61                                             for activity */ 
    6262         
    63 #define IRCD_CONNFL_NOSENDQ   0x400 /* this is set if we don't want to observe 
    64                                        send queue limits on the connection 
    65                                        (mostly useful for sending 
    66                                        synchronization data to servers).  it is 
    67                                        not unset until sendq drops to 0. */ 
     63#define IRCD_CONNFL_NOSENDQ         0x400 /* this is set if we don't want to 
     64                                             observe send queue limits on the 
     65                                             connection (mostly useful for 
     66                                             sending synchronization data to 
     67                                             servers).  it is not unset until 
     68                                             sendq drops to 0. */ 
    6869#ifdef HAVE_OPENSSL 
    69 #define IRCD_CONNFL_SSLINIT   0x800 /* set when we're waiting for the first 
    70                                        data event for an initiating SSL socket. 
    71                                        when we get this event we can begin the 
    72                                        regular connection initiation. */ 
     70#define IRCD_CONNFL_SSLINIT         0x800 /* set when we're waiting for the 
     71                                             first data event for an initiating 
     72                                             SSL socket.  when we get this 
     73                                             event we can begin the regular 
     74                                             connection initiation. */ 
    7375#endif 
     76#define IRCD_CONNFL_DIRTYBUFFER    0x1000 /* set when the contents of the 
     77                                             buffer are 'dirty' (typically 
     78                                             an overflow command which must 
     79                                             be discarded) */ 
    7480 
    7581    int     flags;                  /* connection flags (DO NOT PUT 
Note: See TracChangeset for help on using the changeset viewer.