mirror of
http://thekelleys.org.uk/git/dnsmasq.git
synced 2026-10-31 13:10:35 +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:
22 files changed
+56
-418
No files matched your search
@@ -82,10 +82,8 @@ void dump_init(void)
|
||||
void dump_packet(int mask, void *packet, size_t len, union mysockaddr *src, union mysockaddr *dst)
|
||||
{
|
||||
struct ip ip;
|
||||
#ifdef HAVE_IPV6
|
||||
struct ip6_hdr ip6;
|
||||
int family;
|
||||
#endif
|
||||
struct udphdr {
|
||||
u16 uh_sport; /* source port */
|
||||
u16 uh_dport; /* destination port */
|
||||
@@ -105,7 +103,6 @@ void dump_packet(int mask, void *packet, size_t len, union mysockaddr *src, unio
|
||||
/* So wireshark can Id the packet. */
|
||||
udp.uh_sport = udp.uh_dport = htons(NAMESERVER_PORT);
|
||||
|
||||
#ifdef HAVE_IPV6
|
||||
if (src)
|
||||
family = src->sa.sa_family;
|
||||
else
|
||||
@@ -139,7 +136,6 @@ void dump_packet(int mask, void *packet, size_t len, union mysockaddr *src, unio
|
||||
sum += ((u16 *)&ip6.ip6_src)[i];
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
iphdr = &ip;
|
||||
ipsz = sizeof(ip);
|
||||
|
||||
Reference in new issue
Block a user