- Pagination: enabled LIST_PAGINATION and remobved constant

- Changed logic on how to find clixon_restconf in pseudo plugin
- Removed ==== in constants to avoid conflict with git merge
- Remove assert
- Added fuzzing for netconf
This commit is contained in:
Olof hagsand 2021-09-23 13:22:40 +02:00
parent 47141089c2
commit b70e22096e
28 changed files with 114 additions and 155 deletions

View file

@ -300,7 +300,6 @@ api_data_get2(clicon_handle h,
return retval;
}
#ifdef LIST_PAGINATION
/*! GET Collection
* According to restconf collection draft. Lists, work in progress
* @param[in] h Clixon handle
@ -566,7 +565,6 @@ api_data_collection(clicon_handle h,
free(xvec);
return retval;
}
#endif /* LIST_PAGINATION */
/*! REST HEAD method
* @param[in] h Clixon handle
@ -644,13 +642,8 @@ api_data_get(clicon_handle h,
break;
case YANG_COLLECTION_XML:
case YANG_COLLECTION_JSON:
#ifdef LIST_PAGINATION
if (api_data_collection(h, req, api_path, pcvec, pi, qvec, pretty, media_out) < 0)
goto done;
#else
if (restconf_notimplemented(h, req, pretty, media_out) < 0)
goto done;
#endif
break;
default:
break;

View file

@ -266,7 +266,7 @@ restconf_connection_sanity(clicon_handle h,
if (rc->rc_ssl == NULL &&
rc->rc_proto == HTTP_2 &&
clicon_option_bool(h, "CLICON_RESTCONF_HTTP2_PLAIN") == 0){
if (netconf_invalid_value_xml(&xerr, "protocol", "Plain HTTP/2 is disabled") < 0)
if (netconf_invalid_value_xml(&xerr, "protocol", "Only HTTP/2 with TLS is enabled, plain http/2 is disabled") < 0)
goto done;
if ((media_str = restconf_param_get(h, "HTTP_ACCEPT")) == NULL){
media_out = YANG_DATA_JSON;