~ubuntu-branches/ubuntu/precise/suricata/precise-proposed

« back to all changes in this revision

Viewing changes to src/app-layer-smb2.c

  • Committer: Bazaar Package Importer
  • Author(s): Pierre Chifflier
  • Date: 2010-06-19 17:39:14 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20100619173914-5vkjfgz24mbia29z
Tags: 0.9.2-1
ImportedĀ UpstreamĀ versionĀ 0.9.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
463
463
    f.protoctx = (void *)&ssn;
464
464
 
465
465
    StreamTcpInitConfig(TRUE);
466
 
    StreamL7DataPtrInit(&ssn);
 
466
    FlowL7DataPtrInit(&f);
467
467
 
468
468
    int r = AppLayerParse(&f, ALPROTO_SMB2, STREAM_TOSERVER|STREAM_EOF, smb2buf, smb2len);
469
469
    if (r != 0) {
472
472
        goto end;
473
473
    }
474
474
 
475
 
    SMB2State *smb2_state = ssn.aldata[AlpGetStateIdx(ALPROTO_SMB2)];
 
475
    SMB2State *smb2_state = f.aldata[AlpGetStateIdx(ALPROTO_SMB2)];
476
476
    if (smb2_state == NULL) {
477
477
        printf("no smb2 state: ");
478
478
        result = 0;
498
498
    }
499
499
 
500
500
end:
501
 
    StreamL7DataPtrFree(&ssn);
 
501
    FlowL7DataPtrFree(&f);
502
502
    StreamTcpFreeConfig(TRUE);
503
503
    return result;
504
504
}