Re: Re: bug in addrlist_match (with IPv6 addresses)

Steve G <[email protected]> Thu, 7 Aug 2003 10:29:49 -0700 (PDT)
Newsgroups gmane.network.xinetd
Message-ID <[email protected]>
>But you are not allowed to assume that the IPv6 address 
>is the first member in the struct (and in fact this isn't 
>the case with Linux).

OK, let's come to a consensus. Rob said in a private e-mail
weeks ago that s6_addr doesn't exist on all platforms. So
I've revised the code. Matthias wanted another set of
parenthesis to be safe. They are added. Does this work for
everybody?

#define IPV4_ADDR_OFFSET (a) (((const uint32_t *) (a))[3])

uint32_t *tmp_addr =
IPV4_ADDR_OFFSET(&SAIN6(addr)->sin6_addr);

Let's patch it and move on to other things. ;)

-Steve Grubb

__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com