Forum Discussion

Simon_Waters_13's avatar
Simon_Waters_13
Icon for Cirrostratus rankCirrostratus
Jun 08, 2016

Documentation for SCF says there is a 4096 limit on cut and paste, is that a TMSH buffer limit?

Is this a tmsh buffer limit?

 

Is it configuration?

 

1 Reply

  • A simple test is sufficient to determine if this limitation is imposed by tmsh

     

    Here's an attempt to set the security login banner to text of 5000 characters, using tmsh

     

    printf "%05000d" | xargs tmsh modify sys global-settings gui-security-banner-text

    And then check how many '0' characters are now in the login banner:

     

    tmsh list sys global-settings gui-security-banner-text | sed 's/[^0]//g' | wc -
    5003

    The extra 3 are because wc is also counting some linefeeds in the output.

     

    So let's try 10000:

     

    printf "%010000d" | xargs tmsh modify sys global-settings gui-security-banner-text
    
    tmsh list sys global-settings gui-security-banner-text | sed 's/[^0]//g' | sed 's/[\r\n]//g' |  wc -c
    10003

    What about 100,000 ?

     

    printf "%0100000d" | xargs tmsh modify sys global-settings gui-security-banner-text         
    cfg exception: (MCP call  'mcpmsg_set_string_item(msg, CID2TAG(m_cid), val.c_str())' failed with error:  16908375, 01020057:3: The string with more than 65535 characters cannot be stored in a message.) (msg++/MsgElement.cpp, line 140), exiting...

    So this shows that mcpd imposes a limit of 65535 characters per line, and tmsh is limited to that.

     

    So no, the limitation is probably coming from the code that reads scf files. Note that the documentation says that the limit of 4,096 characters is PER LINE, and does not limit the entire file.

     

    And let's not forget to restore the original login banner:

     

    tmsh modify sys global-settings gui-security-banner-text "Welcome to the BIG-IP Configuration Utility.
    >
    > Log in with your username and password using the fields on the left.
    > "
    tmsh save sys config