Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Packet handling error in packets containing non-self closing tags #4

Open
czeni opened this issue Mar 25, 2014 · 4 comments
Open

Packet handling error in packets containing non-self closing tags #4

czeni opened this issue Mar 25, 2014 · 4 comments

Comments

@czeni
Copy link

czeni commented Mar 25, 2014

When messages sended to the netconfd are containing start/end XML tags instead of self-closing tags the netconfd processes these incorrectly. In my case i use a custom Java implementation for the client. I send a cancel-toast RPC to the loaded toaster module, although i don't requested a make-toast prior. So i should recieve an rpc-error message, but instead of i got an rpc-ok. Here is the XML messages which logged by the netconfd:

Request:

<nc:rpc xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0" nc:message-id="1"><cancel-toast xmlns="http://netconfcentral.org/ns/toaster"></cancel-toast>
</nc:rpc>]]>]]>

Reply:

<?xml version="1.0" encoding="UTF-8"?>
<rpc-reply xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0" nc:message-id="1" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<ok/>
</rpc-reply>]]>]]>

According to the server log the netconfd processes this type of messages incorrectly and it actually invoke the server side cancel-toast RPC.

After i noticed this issue i correced and rewrote the third-party netconf library to use self closing tag. Then i got the expected rpc-error message.

And here is the server log (--log-level=debug3):
https://gist.github.com/czeni/d7cfa79ffdae8508eefe

@cmavr8
Copy link

cmavr8 commented Mar 25, 2014

So, is this a bug in netconfd or a guidline for module developers?
I've been away from netconf for a year, but I still have feelings for it :P

@czeni
Copy link
Author

czeni commented Mar 25, 2014

I guess both :), but i don't know the yuma well to tell whose responibility is that.
However, i think this behavior is a serios flaw, because responding with an rpc-ok instead of rpc-error could mean a serious functional issue, so it should worth to deal with this.
So i reported it, rewrote the library to use self-closing tags and from now use this workaround.
I also reported this issue to the writers of the the third-party Java library.

@AndrewStoneOpenClovis
Copy link
Member

Are you saying that <cancel-toast></cancel-toast> returns rpc-ok but <cancel-toast/> returns rpc-error?

@czeni
Copy link
Author

czeni commented Mar 29, 2014

Yes, if i don't call the make-toast method prior.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants