Changeset 33a106a


Ignore:
Timestamp:
03/02/17 13:56:42 (4 years ago)
Author:
Shane Alcock <salcock@…>
Branches:
cachetimestamps, develop, dpdk-ndag, etsilive, master, ndag_format, rc-4.0.2, rc-4.0.3, rc-4.0.4, ringdecrementfix, ringperformance
Children:
ed3a238
Parents:
204d65b (diff), f4fdcd1 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch '4.0.1-hotfixes' into develop

Files:
4 edited

Legend:

Unmodified
Added
Removed
  • lib/trace_parallel.c

    rdb84bb2 rf4fdcd1  
    17331733                        ret = libtrace->format->start_input(libtrace);
    17341734                }
    1735                 if (libtrace->perpkt_thread_count > 1)
     1735                if (libtrace->perpkt_thread_count > 1) {
    17361736                        libtrace->pread = trace_pread_packet_first_in_first_served;
    17371737                        /* Don't wait for a burst of packets if the format is
     
    17411741                                libtrace->config.burst_size = 1;
    17421742                        }
    1743                 else
     1743                }
     1744                else {
    17441745                        /* Use standard read_packet */
    17451746                        libtrace->pread = NULL;
     1747                }
    17461748        }
    17471749
  • tools/traceanon/Anon.cc

    ree6e802 rcb075c5  
    107107
    108108    this->cipher = EVP_aes_128_ecb();
    109     EVP_CIPHER_CTX_init(&this->ctx);
    110 
    111     EVP_EncryptInit_ex(&this->ctx, this->cipher, NULL, this->key, NULL);
     109    this->ctx = EVP_CIPHER_CTX_new();
     110    EVP_CIPHER_CTX_init(this->ctx);
     111
     112    EVP_EncryptInit_ex(this->ctx, this->cipher, NULL, this->key, NULL);
    112113
    113114    this->cachebits = cachebits;
     
    125126CryptoAnon::~CryptoAnon() {
    126127    delete(this->ipv4_cache);
    127     EVP_CIPHER_CTX_cleanup(&this->ctx);
     128    EVP_CIPHER_CTX_cleanup(this->ctx);
     129    EVP_CIPHER_CTX_free(this->ctx);
    128130}
    129131
     
    255257         * bit in the original address, we use the first bit of the resulting
    256258         * encrypted output as part of an XOR mask */
    257         EVP_EncryptUpdate(&this->ctx, (unsigned char *)rin_output, &outl,
     259        EVP_EncryptUpdate(this->ctx, (unsigned char *)rin_output, &outl,
    258260                (unsigned char *)rin_input, 16);
    259261
     
    290292        memcpy(rin_input, &input, 8);
    291293
    292         EVP_EncryptUpdate(&this->ctx, (unsigned char *)rin_output, &outl,
     294        EVP_EncryptUpdate(this->ctx, (unsigned char *)rin_output, &outl,
    293295                (unsigned char *)rin_input, 16);
    294296
  • tools/traceanon/Anon.h

    ree6e802 rcb075c5  
    8686    uint32_t recent_ipv4_cache[2][2];
    8787    const EVP_CIPHER *cipher;
    88     EVP_CIPHER_CTX ctx;
     88    EVP_CIPHER_CTX *ctx;
    8989
    9090    uint32_t encrypt32Bits(uint32_t orig, uint8_t start, uint8_t stop,
  • tools/traceanon/traceanon.cc

    ree6e802 r684a21c  
    223223
    224224        if (enc_type == ENC_CRYPTOPAN) {
     225                if (strlen(key) < 32) {
     226                        fprintf(stderr, "ERROR: Key must be at least 32 "
     227                        "characters long for CryptoPan anonymisation.\n");
     228                        exit(1);
     229                }
    225230#ifdef HAVE_LIBCRYPTO               
    226231                CryptoAnon *anon = new CryptoAnon((uint8_t *)key,
Note: See TracChangeset for help on using the changeset viewer.