mirror of
https://github.com/pi-hole/dnsmasq.git
synced 2025-12-19 18:28:25 +00:00
Remove ability to compile without IPv6 support.
This was the source of a large number of #ifdefs, originally included for use with old embedded libc versions. I'm sure no-one wants or needs IPv6-free code these days, so this is a move towards more maintainable code.
This commit is contained in:
@@ -126,9 +126,7 @@ typedef unsigned long long u64;
|
||||
#include <net/if_arp.h>
|
||||
#include <netinet/in_systm.h>
|
||||
#include <netinet/ip.h>
|
||||
#ifdef HAVE_IPV6
|
||||
#include <netinet/ip6.h>
|
||||
#endif
|
||||
#include <netinet/ip_icmp.h>
|
||||
#include <sys/uio.h>
|
||||
#include <syslog.h>
|
||||
@@ -159,6 +157,8 @@ extern int capget(cap_user_header_t header, cap_user_data_t data);
|
||||
/* daemon is function in the C library.... */
|
||||
#define daemon dnsmasq_daemon
|
||||
|
||||
#define ADDRSTRLEN INET6_ADDRSTRLEN
|
||||
|
||||
/* Async event queue */
|
||||
struct event_desc {
|
||||
int event, data, msg_sz;
|
||||
@@ -273,9 +273,7 @@ struct event_desc {
|
||||
struct all_addr {
|
||||
union {
|
||||
struct in_addr addr4;
|
||||
#ifdef HAVE_IPV6
|
||||
struct in6_addr addr6;
|
||||
#endif
|
||||
/* for log_query */
|
||||
struct {
|
||||
unsigned short keytag, algo, digest;
|
||||
@@ -383,9 +381,7 @@ struct host_record {
|
||||
struct name_list *next;
|
||||
} *names;
|
||||
struct in_addr addr;
|
||||
#ifdef HAVE_IPV6
|
||||
struct in6_addr addr6;
|
||||
#endif
|
||||
struct host_record *next;
|
||||
};
|
||||
|
||||
@@ -496,9 +492,7 @@ struct crec {
|
||||
union mysockaddr {
|
||||
struct sockaddr sa;
|
||||
struct sockaddr_in in;
|
||||
#if defined(HAVE_IPV6)
|
||||
struct sockaddr_in6 in6;
|
||||
#endif
|
||||
};
|
||||
|
||||
/* bits in flag param to IPv6 callbacks from iface_enumerate() */
|
||||
@@ -660,9 +654,7 @@ struct frec {
|
||||
struct all_addr dest;
|
||||
struct server *sentto; /* NULL means free */
|
||||
struct randfd *rfd4;
|
||||
#ifdef HAVE_IPV6
|
||||
struct randfd *rfd6;
|
||||
#endif
|
||||
unsigned int iface;
|
||||
unsigned short orig_id, new_id;
|
||||
int log_id, fd, forwardall, flags;
|
||||
@@ -877,9 +869,7 @@ struct dhcp_bridge {
|
||||
struct cond_domain {
|
||||
char *domain, *prefix;
|
||||
struct in_addr start, end;
|
||||
#ifdef HAVE_IPV6
|
||||
struct in6_addr start6, end6;
|
||||
#endif
|
||||
int is6, indexed;
|
||||
struct cond_domain *next;
|
||||
};
|
||||
@@ -1184,9 +1174,7 @@ void blockdata_free(struct blockdata *blocks);
|
||||
|
||||
/* domain.c */
|
||||
char *get_domain(struct in_addr addr);
|
||||
#ifdef HAVE_IPV6
|
||||
char *get_domain6(struct in6_addr *addr);
|
||||
#endif
|
||||
int is_name_synthetic(int flags, char *name, struct all_addr *addr);
|
||||
int is_rev_synth(int flag, struct all_addr *addr, char *name);
|
||||
|
||||
@@ -1270,11 +1258,9 @@ int hostname_issubdomain(char *a, char *b);
|
||||
time_t dnsmasq_time(void);
|
||||
int netmask_length(struct in_addr mask);
|
||||
int is_same_net(struct in_addr a, struct in_addr b, struct in_addr mask);
|
||||
#ifdef HAVE_IPV6
|
||||
int is_same_net6(struct in6_addr *a, struct in6_addr *b, int prefixlen);
|
||||
u64 addr6part(struct in6_addr *addr);
|
||||
void setaddr6part(struct in6_addr *addr, u64 host);
|
||||
#endif
|
||||
int retry_send(ssize_t rc);
|
||||
void prettyprint_time(char *buf, unsigned int t);
|
||||
int prettyprint_addr(union mysockaddr *addr, char *buf);
|
||||
@@ -1353,9 +1339,7 @@ int loopback_exception(int fd, int family, struct all_addr *addr, char *name);
|
||||
int label_exception(int index, int family, struct all_addr *addr);
|
||||
int fix_fd(int fd);
|
||||
int tcp_interface(int fd, int af);
|
||||
#ifdef HAVE_IPV6
|
||||
int set_ipv6pktinfo(int fd);
|
||||
#endif
|
||||
#ifdef HAVE_DHCP6
|
||||
void join_multicast(int dienow);
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user