mem leak in lex for flex 2.6
This commit is contained in:
parent
31c45e5c62
commit
7880b5d498
4 changed files with 24 additions and 29 deletions
|
|
@ -1,19 +1,26 @@
|
||||||
|
Clixon Restconf
|
||||||
|
===============
|
||||||
|
|
||||||
|
Contents:
|
||||||
|
1. Features
|
||||||
|
2. Installation using NGINX
|
||||||
|
3. Debugging
|
||||||
|
|
||||||
|
1. FEATURES
|
||||||
|
+++++++++++
|
||||||
|
Clixon restconf is a daemon based on FASTCGI. Instructions are available to
|
||||||
|
run with NGINX.
|
||||||
|
The implementatation supports plain OPTIONS, HEAD, GET, POST, PUT, PATCH, DELETE.
|
||||||
|
and is based on draft-ietf-netconf-restconf-13.
|
||||||
|
There is currently (2017) a RFC 8040, many of those features are _not_ implemented,
|
||||||
|
including:
|
||||||
|
- query parameters (section 4.9)
|
||||||
|
- notifications (sec 6)
|
||||||
|
- only rudimentary error reporting exists (sec 7)
|
||||||
|
|
||||||
|
2. INSTALLATION using NGINX
|
||||||
|
+++++++++++++++++++++++++++
|
||||||
|
|
||||||
# Existing clixon installation. Using CLI:
|
|
||||||
olof@vandal> clixon_cli -f /usr/local/etc/routing.conf
|
|
||||||
olof@vandal> show configuration
|
|
||||||
interfaces {
|
|
||||||
interface {
|
|
||||||
name eth0;
|
|
||||||
type eth;
|
|
||||||
enabled true;
|
|
||||||
}
|
|
||||||
interface {
|
|
||||||
name eth9;
|
|
||||||
type eth;
|
|
||||||
enabled true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
# Define nginx config file/etc/nginx/sites-available/default
|
# Define nginx config file/etc/nginx/sites-available/default
|
||||||
server {
|
server {
|
||||||
...
|
...
|
||||||
|
|
@ -57,8 +64,8 @@ olof@vandal> curl -G http://127.0.0.1/restconf/data/interfaces/interface/name=et
|
||||||
curl -sX POST -d '{"clicon":{"interfaces":{"interface":{"name":"eth1","type":"eth","enabled":"true"}}}}' http://localhost/restconf/data
|
curl -sX POST -d '{"clicon":{"interfaces":{"interface":{"name":"eth1","type":"eth","enabled":"true"}}}}' http://localhost/restconf/data
|
||||||
|
|
||||||
|
|
||||||
Debugging
|
3. DEBUGGING
|
||||||
---------
|
++++++++++++
|
||||||
Start the restconf programs with debug flag:
|
Start the restconf programs with debug flag:
|
||||||
sudo su -c "/www-data/clixon_restconf -D" -s /bin/sh www-data
|
sudo su -c "/www-data/clixon_restconf -D" -s /bin/sh www-data
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -131,11 +131,7 @@ int
|
||||||
json_scan_exit(struct clicon_json_yacc_arg *jy)
|
json_scan_exit(struct clicon_json_yacc_arg *jy)
|
||||||
{
|
{
|
||||||
yy_delete_buffer(jy->jy_lexbuf);
|
yy_delete_buffer(jy->jy_lexbuf);
|
||||||
#if defined(YY_FLEX_SUBMINOR_VERSION) && YY_FLEX_SUBMINOR_VERSION >= 9
|
|
||||||
clixon_json_parselex_destroy(); /* modern */
|
clixon_json_parselex_destroy(); /* modern */
|
||||||
#else
|
|
||||||
yy_init = 1; /* This does not quite free all buffers */
|
|
||||||
#endif
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -141,11 +141,7 @@ int
|
||||||
clixon_xml_parsel_exit(struct xml_parse_yacc_arg *ya)
|
clixon_xml_parsel_exit(struct xml_parse_yacc_arg *ya)
|
||||||
{
|
{
|
||||||
yy_delete_buffer(ya->ya_lexbuf);
|
yy_delete_buffer(ya->ya_lexbuf);
|
||||||
#if defined(YY_FLEX_SUBMINOR_VERSION) && YY_FLEX_SUBMINOR_VERSION >= 9
|
|
||||||
clixon_xml_parselex_destroy(); /* modern */
|
clixon_xml_parselex_destroy(); /* modern */
|
||||||
#else
|
|
||||||
yy_init = 1; /* This does not quite free all buffers */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -248,11 +248,7 @@ int
|
||||||
yang_scan_exit(struct clicon_yang_yacc_arg *yy)
|
yang_scan_exit(struct clicon_yang_yacc_arg *yy)
|
||||||
{
|
{
|
||||||
yy_delete_buffer(yy->yy_lexbuf);
|
yy_delete_buffer(yy->yy_lexbuf);
|
||||||
#if defined(YY_FLEX_SUBMINOR_VERSION) && YY_FLEX_SUBMINOR_VERSION >= 9
|
|
||||||
clixon_yang_parselex_destroy(); /* modern */
|
clixon_yang_parselex_destroy(); /* modern */
|
||||||
#else
|
|
||||||
yy_init = 1; /* This does not quite free all buffers */
|
|
||||||
#endif
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue