mirror of
https://github.com/obgm/libcoap.git
synced 2026-11-04 17:02:56 +03:00
ICMP: Treat genuine ICMP diagnostic PDU for UDP as failure
Posix support only for unicast client requests. ICMP disgnostic messages are ignored on server sessions.
This commit is contained in:
1 parent
f52fadaa9a
commit
d4f78cd560
9 files changed
+200
-35
No files matched your search
@@ -21,6 +21,14 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef struct coap_icmp_info_t {
|
||||
uint32_t length;
|
||||
uint8_t cmsg_level;
|
||||
uint8_t ee_origin;
|
||||
uint8_t ee_type;
|
||||
uint8_t ee_code;
|
||||
} coap_icmp_info_t;
|
||||
|
||||
/**
|
||||
* @ingroup internal_api
|
||||
* @defgroup dgrm Datagram (UDP) Support
|
||||
|
||||
@@ -260,6 +260,10 @@ struct coap_session_t {
|
||||
coap_tick_t last_tx; /**< Last time a ratelimited packet is sent */
|
||||
uint8_t is_rate_limiting; /**< Currently NON rate limiting */
|
||||
uint32_t ping_failed; /**< Ping failure count */
|
||||
#ifdef HAVE_LINUX_ERRQUEUE_H
|
||||
coap_str_const_t *last_data_write; /**< Last sent data to check against ICMP
|
||||
responses */
|
||||
#endif /* HAVE_LINUX_ERRQUEUE_H */
|
||||
};
|
||||
|
||||
#if COAP_SERVER_SUPPORT
|
||||
|
||||
Reference in new issue
Block a user