Skip to content

Commit 42f485a

Browse files
Merge #668
668: Allows processing of DNS on 6LowPan connections r=thvdveld a=benbrittain Co-authored-by: Benjamin Brittain <ben@brittain.org>
2 parents bd063df + 7200251 commit 42f485a

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

src/iface/interface.rs

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1788,6 +1788,22 @@ impl<'a> InterfaceInner<'a> {
17881788
}
17891789
}
17901790

1791+
#[cfg(feature = "socket-dns")]
1792+
for dns_socket in sockets
1793+
.items_mut()
1794+
.filter_map(|i| dns::Socket::downcast_mut(&mut i.socket))
1795+
{
1796+
if dns_socket.accepts(&IpRepr::Ipv6(ipv6_repr), &udp_repr) {
1797+
dns_socket.process(
1798+
self,
1799+
&IpRepr::Ipv6(ipv6_repr),
1800+
&udp_repr,
1801+
udp_packet.payload(),
1802+
);
1803+
return None;
1804+
}
1805+
}
1806+
17911807
// When we are here then then there was no UDP socket that accepted the UDP
17921808
// message.
17931809
let payload_len = icmp_reply_payload_len(

0 commit comments

Comments
 (0)