Fix typos throughout the codebase

Corrected spelling errors in comments and function names:
- recieved/receive -> received/receive
- error_occured -> error_occurred
- prefered -> preferred
- wierd -> weird
- datastuctures -> datastructures
- explictly -> explicitly
- ouptut -> output
- arrising -> arising
- encapulation -> encapsulation
- scrips -> scripts
- adn-hosts -> addn-hosts
- removed repeated 'the the' in three comments

Generated by AI (opencode).
This commit is contained in:
Pooyan Khanjankhani authored and Simon Kelley committed 2026-07-17 11:44:38 +01:00
1 parent 8aa607d322
commit 8af20e56ed
10 files changed
+15 -15

No files matched your search

+3 -3
View File
@@ -2309,7 +2309,7 @@ static char *edestr(int ede)
}
}
static int error_occured(unsigned int flags) {
static int error_occurred(unsigned int flags) {
if (flags & F_RCODE)
return 1;
else if (flags & F_NEG)
@@ -2330,10 +2330,10 @@ void log_query(unsigned int flags, char *name, union all_addr *addr, char *arg,
if (!option_bool(OPT_LOG))
return;
if(option_bool(OPT_LOG_ONLY_FAILED) && !error_occured(flags))
if(option_bool(OPT_LOG_ONLY_FAILED) && !error_occurred(flags))
return;
/* F_NOERR is reused here to indicate logs arrising from auth queries */
/* F_NOERR is reused here to indicate logs arising from auth queries */
if (!(flags & F_NOERR) && option_bool(OPT_AUTH_LOG))
return;
+1 -1
View File
@@ -1935,7 +1935,7 @@ static void check_dns_listeners(time_t now)
/* Note that handling events here can create or destroy fds and
render the result of the last poll() call invalid. Once
we find an fd that needs service, do it, then return to go around the
poll() loop again. This avoid really, really, wierd bugs. */
poll() loop again. This avoid really, really, weird bugs. */
if (!option_bool(OPT_DEBUG))
for (i = 0; i < daemon->max_procs; i++)
+2 -2
View File
@@ -723,7 +723,7 @@ struct resolvc {
#endif
};
/* adn-hosts parms from command-line (also dhcp-hostsfile and dhcp-optsfile and dhcp-hostsdir*/
/* addn-hosts parms from command-line (also dhcp-hostsfile and dhcp-optsfile and dhcp-hostsdir*/
#define AH_DIR 1
#define AH_INACTIVE 2
#define AH_WD_DONE 4
@@ -1171,7 +1171,7 @@ struct dhcp_relay {
};
extern struct daemon {
/* datastuctures representing the command-line and
/* datastructures representing the command-line and
config file arguments. All set (including defaults)
in option.c */
+2 -2
View File
@@ -1284,7 +1284,7 @@ void reply_query(int fd, time_t now)
had replies from all to avoid filling the forwarding table when
everything is broken */
/* decrement count of replies recieved if we sent to more than one server. */
/* decrement count of replies received if we sent to more than one server. */
if (forward->forwardall && (--forward->forwardall > 1) && RCODE(header) == REFUSED)
return;
@@ -2123,7 +2123,7 @@ static ssize_t tcp_talk(int first, int last, int start, struct dns_header *heade
#if defined(SO_SNDTIMEO) && defined(SO_RCVTIMEO)
/* TCP connections by default take ages to time out.
Set shorter timeouts more appropriate for a DNS server.
We set the recieve timeout as twice the send timeout; we
We set the receive timeout as twice the send timeout; we
want to fail quickly on a non-responsive server, but give it time to get an
answer. */
tv.tv_sec = TCP_TIMEOUT;
+1 -1
View File
@@ -527,7 +527,7 @@ void lease_update_slaac(time_t now)
/* Find interfaces associated with leases at start-up. This gets updated as
we do DHCP transactions, but information about directly-connected subnets
is useful from scrips and necessary for determining SLAAC addresses from
is useful from scripts and necessary for determining SLAAC addresses from
start-time. */
void lease_find_interfaces(time_t now)
{
+1 -1
View File
@@ -1457,7 +1457,7 @@ static struct serverfd *allocate_sfd(union mysockaddr *addr, char *intname, unsi
/* when using random ports, servers which would otherwise use
the INADDR_ANY/port0 socket have sfd set to NULL, this is
anything without an explictly set source port. */
anything without an explicitly set source port. */
if (!daemon->osport)
{
errno = 0;
+1 -1
View File
@@ -1383,7 +1383,7 @@ static void dhcp_netid_list_free(struct dhcp_netid_list *netid)
netid = netid->next;
/* Note: don't use dhcp_netid_free() here, since that
frees a list linked on netid->next. Where a netid_list
is used that's because the the ->next pointers in the
is used that's because the ->next pointers in the
netids are being used to temporarily construct
a list of valid tags. */
free(tmplist->list->net);
+1 -1
View File
@@ -58,7 +58,7 @@ static int add_prefixes(struct in6_addr *local, int prefix,
unsigned int preferred, unsigned int valid, void *vparam);
static int iface_search(struct in6_addr *local, int prefix,
int scope, int if_index, int flags,
unsigned int prefered, unsigned int valid, void *vparam);
unsigned int preferred, unsigned int valid, void *vparam);
static int add_lla(int index, unsigned int type, char *mac, size_t maclen, void *parm);
static void new_timeout(struct dhcp_context *context, char *iface_name, time_t now);
static unsigned int calc_lifetime(struct ra_interface *ra);
+2 -2
View File
@@ -255,10 +255,10 @@ static int dhcp6_maybe_relay(struct state *state, unsigned char *inbuff, size_t
/* the packet data is unaligned, copy to aligned storage */
memcpy(&align, inbuff + 2, IN6ADDRSZ);
/* RFC6221 para 4 says if link_address in encapulation
/* RFC6221 para 4 says if link_address in encapsulation
is zero, ignore it, and, by implication, use the link
address of any enclosing encapsulation or, failing that
of the arrival interface on the the server. */
of the arrival interface on the server. */
if (!dhcp6_maybe_relay(state, opt6_ptr(opt, 0), opt6_len(opt), client_addr,
IN6_IS_ADDR_UNSPECIFIED(&align) ? link_address : &align, now))
return 0;
+1 -1
View File
@@ -855,7 +855,7 @@ static char *next(char **p, char *end)
return ret;
}
/* If we don't do anything, don't write the the input/ouptut
/* If we don't do anything, don't write the input/output
buffer. This allows us to pass in safe read-only strings constants. */
static void sanitise(char *buf)
{