00001-Change-Multicast-IP.patch 1.35 KB
From fd12434d6614921313ce77e5b1886907e97d83ea Mon Sep 17 00:00:00 2001
From: Mattia Antonini <mattia.antonini1@studenti.unipr.it>
Date: Wed, 2 Nov 2016 14:44:13 +0100
Subject: [PATCH] Changed multicast addresses from link-local to realm-local

---
 api/oc_client_api.c   | 2 +-
 port/riot/ipadapter.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/api/oc_client_api.c b/api/oc_client_api.c
index 9513628..d6b1c71 100644
--- a/api/oc_client_api.c
+++ b/api/oc_client_api.c
@@ -256,7 +256,7 @@ oc_stop_observe(const char *uri, oc_server_handle_t *server)
 bool
 oc_do_ip_discovery(const char *rt, oc_discovery_cb_t handler, void *user_data)
 {
-  oc_make_ip_endpoint(mcast, IP | MULTICAST, 5683, 0xff, 0x02, 0, 0, 0, 0, 0, 0,
+  oc_make_ip_endpoint(mcast, IP | MULTICAST, 5683, 0xff, 0x03, 0, 0, 0, 0, 0, 0,
                       0, 0, 0, 0, 0, 0, 0x01, 0x58);
   mcast.ipv6_addr.scope = 0;
 
diff --git a/port/riot/ipadapter.c b/port/riot/ipadapter.c
index d3f49cf..d59542b 100644
--- a/port/riot/ipadapter.c
+++ b/port/riot/ipadapter.c
@@ -134,7 +134,7 @@ multicast_receive_thread(void *arg)
 {
   (void)arg;
 
-  uint8_t wk_addr[16] = { 0xff, 0x02, 0, 0, 0, 0, 0,    0,
+  uint8_t wk_addr[16] = { 0xff, 0x03, 0, 0, 0, 0, 0,    0,
                           0,    0,    0, 0, 0, 0, 0x01, 0x58 };
   static uint8_t addr[16];
   uint8_t remote_addr[16] = { 0 };