lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lwip-users] netif_add and addr, gw, mask as NULL parameters


From: Mason
Subject: Re: [lwip-users] netif_add and addr, gw, mask as NULL parameters
Date: Thu, 04 Aug 2011 15:00:26 +0200
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.19) Gecko/20110420 SeaMonkey/2.0.14

Kieran Mansley wrote:

> Mason wrote:
> 
>> struct netif *netif_add(struct netif *netif, ip_addr_t *ipaddr, ip_addr_t 
>> *netmask,
>>   ip_addr_t *gw, void *state, netif_init_fn init, netif_input_fn input)
>>
>> My network interface is supposed to be configured by DHCP,
>> so I have no appropriate value for addr, gw, mask.
> 
> There's plenty of people using lwIP with DHCP without problems,

Please note that I didn't say I had any problem with DHCP.

I was merely pointing out that when one is using DHCP to
dynamically configure an interface, one has no appropriate
initial value for addr, mask, and gw.

Therefore, it seems natural for netif_add to accept NULL
for the addr, mask, and gw parameters. And, in fact, it
does accept NULL for mask and gw, but it fails when addr
is NULL, because code was added that dereferences addr
before checking it.

I was proposing a patch to fix this issue.

Do I need to send patches to lwip-devel instead of lwip-users?

-- 
Regards.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]