CESNET / libnetconf

C NETCONF library
Other
113 stars 83 forks source link

My netconf server in function nc_session_recv_rpc always return 0, rpc is NULL #267

Closed UnknowSelf closed 6 years ago

UnknowSelf commented 6 years ago

My netconf server is the subsystem of SSH workflow:

  nc_init()
  ncds_new_transapi()
  ncds_file_set_path()
  ncds_init()
  ncds_consolidate()
  ncds_device_init()
  nc_session_accept()
  loop{
     nc_session_recv_rpc()
     ...
  }

I used netopeer-cli test connect. See the log, I can find that sever and client send hello message each other, but in the server, The function _nc_session_recvrpc always return 0 (NC_MSG_UNKNOWN), and the sessio was closed.

Log:

  nc_session_read_until: reading limit reached.
  Malformed message received, closing the session 1.
  nc_msg_dump: invalid input parameter.
  rpc: (null)

How can I do? Thanks!

UnknowSelf commented 6 years ago

@rkrejci @alexadavid @michalvasko

michalvasko commented 6 years ago

Hi, just guessing, but it may be some incompatibility in your hello messages, perhaps the server expect one NETCONF version communication, but the client uses another. I cannot help you more, libnetconf is obsolete and so we provide only basic support.

Regards, Michal