Hi Andrew,
On 7/9/21 10:12 AM, Denis Kenzior wrote:
Hi Andrew,
On 7/9/21 6:47 AM, Andrew Zaborowski wrote:
> find_free_or_expired_ip() or check_requested_ip() should fail if no
> addresses are left in the pool, rather than lease_add() so emit that
> error message there. The only thing lease_add() validates that has not
> been validated before might be the origin MAC, treat the lease_add()
> failure more as an internal error.
> ---
> ell/dhcp-server.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
Actually, I pulled patch 3 back. It doesn't compile:
CC ell/dhcp-server.lo
ell/dhcp-server.c: In function ‘l_dhcp_server_new_lease’:
ell/dhcp-server.c:1071:39: error: implicit declaration of function ‘IP_STR’; did
you mean ‘IP_TTL’? [-Werror=implicit-function-declaration]
1071 | SERVER_DEBUG("Allocated %s to " MAC, IP_STR(ip), MAC_STR(mac));
| ^~~~~~
ell/dhcp-server.c:103:41: note: in definition of macro ‘SERVER_DEBUG’
103 | "%s:%i " fmt, __func__, __LINE__, ## args)
| ^~~~
ell/dhcp-server.c:103:4: error: format ‘%s’ expects argument of type ‘char *’,
but argument 6 has type ‘int’ [-Werror=format=]
103 | "%s:%i " fmt, __func__, __LINE__, ## args)
| ^~~~~~~~
......
1071 | SERVER_DEBUG("Allocated %s to " MAC, IP_STR(ip), MAC_STR(mac));
| ~~~~~~~~~~
| |
| int
ell/dhcp-server.c:1071:2: note: in expansion of macro ‘SERVER_DEBUG’
1071 | SERVER_DEBUG("Allocated %s to " MAC, IP_STR(ip), MAC_STR(mac));
| ^~~~~~~~~~~~
Regards,
-Denis