@@ -50,7 +50,7 @@ extern "C" {
50
50
51
51
// #define LLMNR_DEBUG
52
52
53
- # define BIT (x ) ( 1 << (x))
53
+ // BIT(x) is defined in tools/sdk/c_types.h
54
54
55
55
#define FLAGS_QR BIT (15 )
56
56
#define FLAGS_OP_SHIFT 11
@@ -226,14 +226,15 @@ void LLMNRResponder::_process_packet() {
226
226
Serial.println (" (no matching RRs)" );
227
227
#endif
228
228
229
- struct ip_info remote_ip_info;
230
- remote_ip_info.ip .addr = _conn->getRemoteAddress ();
229
+ ip_addr_t remote_ip;
230
+ remote_ip.addr = _conn->getRemoteAddress ();
231
+
231
232
struct ip_info ip_info;
232
233
bool match_ap = false ;
233
234
if (wifi_get_opmode () & SOFTAP_MODE) {
234
235
wifi_get_ip_info (SOFTAP_IF, &ip_info);
235
- if (ip_info.ip .addr && ip_addr_netcmp (&remote_ip_info. ip , &ip_info.ip , &ip_info.netmask ))
236
- match_ap = true ;
236
+ if (ip_info.ip .addr && ip_addr_netcmp (&remote_ip , &ip_info.ip , &ip_info.netmask ))
237
+ match_ap = true ;
237
238
}
238
239
if (!match_ap)
239
240
wifi_get_ip_info (STATION_IF, &ip_info);
@@ -272,8 +273,8 @@ void LLMNRResponder::_process_packet() {
272
273
};
273
274
_conn->append (reinterpret_cast <const char *>(rr), sizeof (rr));
274
275
}
275
- _conn->setMulticastInterface (remote_ip_info. ip );
276
- _conn->send (&remote_ip_info. ip , _conn->getRemotePort ());
276
+ _conn->setMulticastInterface (remote_ip );
277
+ _conn->send (&remote_ip , _conn->getRemotePort ());
277
278
}
278
279
279
280
#if !defined(NO_GLOBAL_INSTANCES) && !defined(NO_GLOBAL_LLMNR)
0 commit comments