~ubuntu-branches/debian/sid/ntp/sid

« back to all changes in this revision

Viewing changes to lib/isc/unix/interfaceiter.c

  • Committer: Package Import Robot
  • Author(s): Peter Eisentraut
  • Date: 2012-02-27 13:55:56 UTC
  • mfrom: (1.2.12)
  • Revision ID: package-import@ubuntu.com-20120227135556-dkx4mkod5trl5bgt
Tags: 1:4.2.6.p5+dfsg-1
* New upstream release (closes: #644673)
* Updated instructions on generating autotools.patch
* Updated standards version

Show diffs side-by-side

added added

removed removed

Lines of Context:
51
51
#endif
52
52
#include <net/if.h>
53
53
 
 
54
#ifdef HAVE_LINUX_IF_ADDR_H
 
55
# include <linux/if_addr.h>
 
56
#endif
 
57
 
54
58
/* Common utility functions */
55
59
 
56
60
/*%
80
84
        switch (family) {
81
85
        case AF_INET:
82
86
                memcpy(&dst->type.in,
83
 
                       &((struct sockaddr_in *) src)->sin_addr,
 
87
                       &((struct sockaddr_in *)(void *)src)->sin_addr,
84
88
                       sizeof(struct in_addr));
85
89
                break;
86
90
        case AF_INET6:
87
 
                sa6 = (struct sockaddr_in6 *)src;
 
91
                sa6 = (struct sockaddr_in6 *)(void *)src;
88
92
                memcpy(&dst->type.in6, &sa6->sin6_addr,
89
93
                       sizeof(struct in6_addr));
90
94
#ifdef ISC_PLATFORM_HAVESCOPEID
217
221
                              "/proc/net/if_inet6:strlen(%s) != 32", address);
218
222
                return (ISC_R_FAILURE);
219
223
        }
 
224
        /*
 
225
        ** Ignore DAD addresses --
 
226
        ** we can't bind to them until they are resolved
 
227
        */
 
228
#ifdef IFA_F_TENTATIVE
 
229
        if (flags & IFA_F_TENTATIVE)
 
230
                return (ISC_R_IGNORE);
 
231
#endif
 
232
 
220
233
        for (i = 0; i < 16; i++) {
221
234
                unsigned char byte;
222
235
                static const char hex[] = "0123456789abcdef";