[Nodogsplash] add domain in firewall

Moritz Warning moritzwarning at web.de
Tue Jan 20 10:39:49 UTC 2015


thanks for the patch! I will give a look. :)

The sizeof is wrong because of "#include <netdb.h>",
which seem to trigger some weird backward compatibility stuff.
Remove the include and the sizeof should be correct.

Also, please do not include whitespace changes in the patch.
It makes it easier to read and smaller. :)


On 01/20/2015 06:17 AM, 孙建希 wrote:
> hello,
> I am trying to add an extra function in firewall , the domain whitelist e.g.
>     FirewallRule allow to www.baidu.com
> I use `gethostbyname` and construct a list:
> +       struct addrlist_t {                                                    
> +               struct in_addr h_addr;
> +               struct addrlist_t *next;                                       
> +       } *addrhead = NULL, *cur = NULL;
> I am working in x86_64,  `sizeof(struct addrlist_t)` return 8 byte, I think here should be 16 byte.
> The strange thing is  the pointer of `&cur->h_addr` and `&cur->next` are same.
> Then i check `struct addrlist_t` in other program, it works fine.
> Can anybody give me some help.
> _______________________________________________
> Nodogsplash mailing list
> Nodogsplash at ml.ninux.org
> http://ml.ninux.org/mailman/listinfo/nodogsplash

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: OpenPGP digital signature
URL: <http://ml.ninux.org/pipermail/nodogsplash/attachments/20150120/af109adf/attachment.pgp>

More information about the Nodogsplash mailing list