[Nodogsplash] add domain in firewall

Moritz Warning moritzwarning at web.de
Wed Jan 21 00:40:46 UTC 2015


Ah, thanks.
I thought he registered. :/

On 01/21/2015 01:07 AM, Saverio Proto wrote:
> Moritz I accepted the email from this guy to pass into the list, but I
> dont think he did subscribe. You have to put him explicitely in Cc if
> you want him to read :(
> 
> Saverio
> 
> 2015-01-20 11:50 GMT+01:00 Moritz Warning <moritzwarning at web.de>:
>> I have to correct myself.
>> The cause is the name of the member variable h_addr.
>> It interferes with a definition in netdb.h.
>>
>> On 01/20/2015 11:39 AM, Moritz Warning wrote:
>>> Hi,
>>>
>>> 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. :)
>>>
>>> thanks,
>>> mwarning
>>>
>>> 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
>>>>
>>>
>>>
>>>
>>>
>>> _______________________________________________
>>> Nodogsplash mailing list
>>> Nodogsplash at ml.ninux.org
>>> http://ml.ninux.org/mailman/listinfo/nodogsplash
>>>
>>
>>
>>
>> _______________________________________________
>> 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/20150121/499c53da/attachment.pgp>


More information about the Nodogsplash mailing list