File tree Expand file tree Collapse file tree 2 files changed +5
-0
lines changed Expand file tree Collapse file tree 2 files changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -980,6 +980,7 @@ static void _mdns_dispatch_tx_packet(mdns_tx_packet_t * p)
980
980
uint8_t count ;
981
981
982
982
_mdns_set_u16 (packet , MDNS_HEAD_FLAGS_OFFSET , p -> flags );
983
+ _mdns_set_u16 (packet , MDNS_HEAD_ID_OFFSET , p -> id );
983
984
984
985
count = 0 ;
985
986
q = p -> questions ;
@@ -1259,6 +1260,7 @@ static void _mdns_create_answer_from_parsed_packet(mdns_parsed_packet_t * parsed
1259
1260
}
1260
1261
packet -> flags = MDNS_FLAGS_AUTHORITATIVE ;
1261
1262
packet -> distributed = parsed_packet -> distributed ;
1263
+ packet -> id = parsed_packet -> id ;
1262
1264
1263
1265
mdns_parsed_question_t * q = parsed_packet -> questions ;
1264
1266
while (q ) {
@@ -2662,6 +2664,7 @@ void mdns_parse_packet(mdns_rx_packet_t * packet)
2662
2664
parsed_packet -> multicast = packet -> multicast ;
2663
2665
parsed_packet -> authoritative = header .flags .value == MDNS_FLAGS_AUTHORITATIVE ;
2664
2666
parsed_packet -> distributed = header .flags .value == MDNS_FLAGS_DISTRIBUTED ;
2667
+ parsed_packet -> id = header .id ;
2665
2668
ip_addr_copy (parsed_packet -> src , packet -> src );
2666
2669
parsed_packet -> src_port = packet -> src_port ;
2667
2670
Original file line number Diff line number Diff line change @@ -236,6 +236,7 @@ typedef struct {
236
236
uint8_t distributed ;
237
237
mdns_parsed_question_t * questions ;
238
238
mdns_parsed_record_t * records ;
239
+ uint16_t id ;
239
240
} mdns_parsed_packet_t ;
240
241
241
242
typedef struct {
@@ -304,6 +305,7 @@ typedef struct mdns_tx_packet_s {
304
305
mdns_out_answer_t * servers ;
305
306
mdns_out_answer_t * additional ;
306
307
bool queued ;
308
+ uint16_t id ;
307
309
} mdns_tx_packet_t ;
308
310
309
311
typedef struct {
You can’t perform that action at this time.
0 commit comments