aboutsummaryrefslogtreecommitdiff
path: root/libnet/dns.c
diff options
context:
space:
mode:
Diffstat (limited to 'libnet/dns.c')
-rw-r--r--libnet/dns.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libnet/dns.c b/libnet/dns.c
index 5fe9411..fe57cc4 100644
--- a/libnet/dns.c
+++ b/libnet/dns.c
@@ -96,7 +96,7 @@ static u32 dns_handle_packet(struct dns_packet *packet)
u32 dns_request(const char *name)
{
struct socket *socket = net_open(S_UDP);
- if (!socket || !net_connect(socket, dns_ip_addr, 53))
+ if (!socket || !net_connect(socket, dns_ip_addr, 53) || part_count(name) == 1)
return 0;
u32 length = sizeof(struct dns_packet) + strlen(name) + part_count(name) + 4;