From: Arran Cudbard-Bell Date: Sat, 28 Mar 2020 23:26:30 +0000 (-0600) Subject: internal: Fix failing test X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=96f72075ec0acb80386b74ac9cefdbbcf991eb83;p=thirdparty%2Ffreeradius-server.git internal: Fix failing test We don't automatically aggregate TLVs. --- diff --git a/src/protocols/internal/encode.c b/src/protocols/internal/encode.c index 8d85dd9d1d0..f733ece8605 100644 --- a/src/protocols/internal/encode.c +++ b/src/protocols/internal/encode.c @@ -185,7 +185,7 @@ static ssize_t internal_encode(uint8_t *out, size_t outlen, FR_PROTO_STACK_PRINT(da_stack, depth); slen = internal_encode(p, LEAVE_ROOM_FOR_LEN(end, p), - da_stack, depth + 1, cursor, encoder_ctx); + da_stack, depth + 1, cursor, encoder_ctx); if (slen < 0) return slen; p += slen; } diff --git a/src/tests/unit/protocols/internal/encode.txt b/src/tests/unit/protocols/internal/encode.txt index caa0493249a..d4b5198bb6b 100644 --- a/src/tests/unit/protocols/internal/encode.txt +++ b/src/tests/unit/protocols/internal/encode.txt @@ -10,4 +10,4 @@ encode-pair User-Name = "0123456789012345678901234567890123456789012345678901234 match 06 01 01 2c 30 31 32 33 34 35 36 37 38 39 30 31 32 33 34 35 36 37 38 39 30 31 32 33 34 35 36 37 38 39 30 31 32 33 34 35 36 37 38 39 30 31 32 33 34 35 36 37 38 39 30 31 32 33 34 35 36 37 38 39 30 31 32 33 34 35 36 37 38 39 30 31 32 33 34 35 36 37 38 39 30 31 32 33 34 35 36 37 38 39 30 31 32 33 34 35 36 37 38 39 30 31 32 33 34 35 36 37 38 39 30 31 32 33 34 35 36 37 38 39 30 31 32 33 34 35 36 37 38 39 30 31 32 33 34 35 36 37 38 39 30 31 32 33 34 35 36 37 38 39 30 31 32 33 34 35 36 37 38 39 30 31 32 33 34 35 36 37 38 39 30 31 32 33 34 35 36 37 38 39 30 31 32 33 34 35 36 37 38 39 30 31 32 33 34 35 36 37 38 39 30 31 32 33 34 35 36 37 38 39 30 31 32 33 34 35 36 37 38 39 30 31 32 33 34 35 36 37 38 39 30 31 32 33 34 35 36 37 38 39 30 31 32 33 34 35 36 37 38 39 30 31 32 33 34 35 36 37 38 39 30 31 32 33 34 35 36 37 38 39 30 31 32 33 34 35 36 37 38 39 30 31 32 33 34 35 36 37 38 39 30 31 32 33 34 35 36 37 38 39 encode-pair Unit-TLV-Integer = 1, Unit-TLV-Integer = 2 -match f1 0f f3 01 06 00 00 00 01 01 06 00 00 00 02 +match 00 f1 0a 00 f3 07 02 01 04 00 00 00 01 00 f1 0a 00 f3 07 02 01 04 00 00 00 02