-
Notifications
You must be signed in to change notification settings - Fork 370
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
Ping implementation send Empty Message with Uri-Host option #677
Comments
IIUC
this means not setting UriHost option, but to mention about destination address of the empty ping request. to set uri host option in a request :
Can I know how you have tested it? |
I discovered when using the CoAP Shell (https://github.com/tzolov/coap-shell), which is based on Callifornium. As libcoap fails the packet sanity check, I fired up Wireshark to take a look. I confirmed it by removing |
This smells very strong for a RFC ambiguity :-) . https://tools.ietf.org/html/rfc7252#section-5.10.1 A "ping" of 4 bytes could then not be used, if "multiple virtual servers" are used. |
I have tested with |
IMHO, a "ping" doesn't really need to reach "virtual server", just the hosting server is good enough. After all, ping is just a simplistic tool. If the virtual server somehow is unable to respond to normal requests, the virtual server (or hosting server if configured so) would be responsible to send error respond codes. |
I agree, that one interpretation maybe, that the ping targets only the real interface (hosting server). |
In Section 4.1 of RFC7252:
Maybe Californium can provide an alternative "ping" implementation which doesn't uses Empty Message can be used to ping virtual servers, otherwise implementation using Empty Message shouldn't include additional options. Although for virtual servers which doesn't support resource discovery, it might be difficult to determine which request method to use for pinging. |
Sorry, too frequently, sticking to one sentence, which obviously not mention the other use case, is not sufficient for clarification. That's at least my experience. Such a "one maverick sentence" may just be an artefact of a "maverick idea", which is not fitted into the other definitions. |
IMHO, compatibility should be a priority concern, even if revision is made, there could be other CoAP implementations which doesn't support additional options for Empty message. I agree that it'd be preferable to get a clarification from IETF for future reference. |
OK, then there are two ways to continue:
|
Resolves #1 - Workaround until eclipse-californium/californium#677 is resolved in a way that allows libcoap compatibility - Adjust README for 1.0.7 release
@boaks this sounds like a reasonable plan. Even the best specification efforts leave ambiguous definitions and in result alternative interpretations and implementations. From practical standpoint adherence to the de-facto standards (e.g. majority of vendor implementations) is more useful than sticking with a particular spec. interpretation (even if it is the correct one). @hirokiht , in the meantime if dropped the |
Just to let you know, the Uri-Host Option is only set if you are using an hostname. If you are using an IP address. The ping should only contains 4 bytes. (tested with californium 2.0.0-M10) We could also open a ticket in libcoap to see if it makes sense to us to be less strict about this 4 bytes constraints ... |
Just to mention, a 4 byte ping will not be able to contain a "path".
So, if this 4 bytes ping is the intended interpretation, you don't need to change the URI. |
When someone can check, if changing the
works with libcoap, then FMPOV we can change californium. |
sorry it did not work |
I checked nCoAP and with that, pings containing the URI host option works. Anyway, in the meantime, I have my doubts, how the "virtual server" stuff should work. Should multiple "virtual server" share the same coap-endpoint? If so, how could then a client endpoint ensure, that the request tokens are unique per endpoint? This means the client must determine the host for the destination URI ahead to detect, if two host are "virtual server" and share the same endpoint. So, for now, I think, make the "auto URI host" feature configurable will be the best. |
If you still interested, please retest with PR #828 |
Fixed with merging PR #828 |
According to RFC7252,
The ping implementation sends an empty message with Uri-Host option, makes it incompatible with other standard compliant CoAP libraries such as libcoap.
The text was updated successfully, but these errors were encountered: