Changeset 264

Show
Ignore:
Timestamp:
06/07/07 08:28:18 (17 months ago)
Author:
smoku
Message:

Reporting dropped packet when starttls-required. Fixes #5

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/c2s/c2s.c

    r233 r264  
    325325            /* drop packets if they have to starttls and they haven't */ 
    326326            if((sess->s->flags & SX_SSL_STARTTLS_REQUIRE) && sess->s->ssf == 0) { 
     327                log_debug(ZONE, "pre STARTTLS packet, dropping"); 
     328                log_write(sess->c2s->log, LOG_NOTICE, "[%d] got pre STARTTLS packet, dropping", sess->s->tag); 
     329 
     330                sx_error(s, stream_err_POLICY_VIOLATION, "stanza sent before starttls"); 
     331 
    327332                nad_free(nad); 
    328333                return 0;