Navigation


Changeset 1192:48759e3f7611 in freeDiameter for libfdcore


Ignore:
Timestamp:
Jun 11, 2013, 11:05:50 AM (11 years ago)
Author:
Sebastien Decugis <sdecugis@freediameter.net>
Branch:
default
Phase:
public
Message:

Reject more quickly invalid messages if possible

Location:
libfdcore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • libfdcore/cnxctx.c

    r1190 r1192  
    808808
    809809                        received += ret;
     810                       
     811                        if (header[0] != DIAMETER_VERSION)
     812                                break; /* No need to wait for 4 bytes in this case */
    810813                } while (received < sizeof(header));
    811814
  • libfdcore/server.c

    r1190 r1192  
    155155        LOG_A("Ready to process next incoming connection");
    156156
     157        memset(&rcv_data, 0, sizeof(rcv_data));
     158       
    157159        /* Get the next connection */
    158160        CHECK_FCT_DO( fd_fifo_get( s->pending, &c ), { fatal = 1; goto cleanup; } );
     
    178180        CHECK_SYS_DO( clock_gettime(CLOCK_REALTIME, &ts), { fatal = 1; goto cleanup; } );
    179181        ts.tv_sec += INCNX_TIMEOUT;
    180        
    181         memset(&rcv_data, 0, sizeof(rcv_data));
    182182       
    183183        /* Receive the first Diameter message on the connection -- cleanup in case of timeout */
Note: See TracChangeset for help on using the changeset viewer.