ConfD User Community

Badterm: 18446744073709551615

Hi,

For one leaf string, I updated the (length "0…18446744073709551615). Yang compilation was successful, however, getting the BADTERM value while loading into Confd as shown below.

type string { length “0…18446744073709551615”;}

TRACE Connected (maapi) to ConfD
TRACE MAAPI_LOAD_ALL_NS
BADTERM: 18446744073709551615
INTERNAL ERROR: Internal error, Bad term value
Failed to load schemas from confd
make: *** [start] Error 1

As per RFC https://datatracker.ietf.org/doc/html/rfc7950#section-9.4.4, the length range should be ok.

Would appreciate any comment/suggestion.
Thank you in advance.

Hello,

this is most probably due to integer sizing issue on target platform.

18446744073709551615 is 0xFF of 8 bytes.

String representation in confd_lib.h is defined as:

typedef struct confd_buf {
    unsigned int size;
    unsigned char *ptr;
} confd_buf_t;

Thus the “problem” -> 4B of length vs “required” 8B.

I don’t know whether this should be limited someplace on confdc level or not.

Do you really need such a huge string? Typical use-case of CDB does not fit storing >4GB “strings” i assume… :slight_smile:

Theoretically you could rebuild confd-lib to be used, with increased length size, but i’m not sure what all should be changed…
Typically, ConfD users tend to modify only the keypath sizing constants - see ConfD user guide - section “Tuning the size of confd_hkeypath_t”.