]> git.ipfire.org Git - ipfire-2.x.git/blob - src/patches/dnsmasq/0087-Constify-some-DHCP-lease-management-functions.patch
dnsmasq: Import more upstream fixes
[ipfire-2.x.git] / src / patches / dnsmasq / 0087-Constify-some-DHCP-lease-management-functions.patch
1 From 64bcff1c7c72eecda8750bc2dca8b4c5dc38a837 Mon Sep 17 00:00:00 2001
2 From: Nicolas Cavallari <nicolas.cavallari@green-communications.fr>
3 Date: Tue, 28 Apr 2015 21:55:18 +0100
4 Subject: [PATCH 87/87] Constify some DHCP lease management functions.
5
6 ---
7 src/dnsmasq.h | 7 ++++---
8 src/lease.c | 8 ++++----
9 2 files changed, 8 insertions(+), 7 deletions(-)
10
11 diff --git a/src/dnsmasq.h b/src/dnsmasq.h
12 index 6fe4a4189188..824a86009439 100644
13 --- a/src/dnsmasq.h
14 +++ b/src/dnsmasq.h
15 @@ -1304,9 +1304,10 @@ void lease_update_slaac(time_t now);
16 void lease_set_iaid(struct dhcp_lease *lease, int iaid);
17 void lease_make_duid(time_t now);
18 #endif
19 -void lease_set_hwaddr(struct dhcp_lease *lease, unsigned char *hwaddr,
20 - unsigned char *clid, int hw_len, int hw_type, int clid_len, time_t now, int force);
21 -void lease_set_hostname(struct dhcp_lease *lease, char *name, int auth, char *domain, char *config_domain);
22 +void lease_set_hwaddr(struct dhcp_lease *lease, const unsigned char *hwaddr,
23 + const unsigned char *clid, int hw_len, int hw_type,
24 + int clid_len, time_t now, int force);
25 +void lease_set_hostname(struct dhcp_lease *lease, const char *name, int auth, char *domain, char *config_domain);
26 void lease_set_expires(struct dhcp_lease *lease, unsigned int len, time_t now);
27 void lease_set_interface(struct dhcp_lease *lease, int interface, time_t now);
28 struct dhcp_lease *lease_find_by_client(unsigned char *hwaddr, int hw_len, int hw_type,
29 diff --git a/src/lease.c b/src/lease.c
30 index 545bbb7fd09c..8adb60588671 100644
31 --- a/src/lease.c
32 +++ b/src/lease.c
33 @@ -813,9 +813,9 @@ void lease_set_iaid(struct dhcp_lease *lease, int iaid)
34 }
35 #endif
36
37 -void lease_set_hwaddr(struct dhcp_lease *lease, unsigned char *hwaddr,
38 - unsigned char *clid, int hw_len, int hw_type, int clid_len,
39 - time_t now, int force)
40 +void lease_set_hwaddr(struct dhcp_lease *lease, const unsigned char *hwaddr,
41 + const unsigned char *clid, int hw_len, int hw_type,
42 + int clid_len, time_t now, int force)
43 {
44 #ifdef HAVE_DHCP6
45 int change = force;
46 @@ -897,7 +897,7 @@ static void kill_name(struct dhcp_lease *lease)
47 lease->hostname = lease->fqdn = NULL;
48 }
49
50 -void lease_set_hostname(struct dhcp_lease *lease, char *name, int auth, char *domain, char *config_domain)
51 +void lease_set_hostname(struct dhcp_lease *lease, const char *name, int auth, char *domain, char *config_domain)
52 {
53 struct dhcp_lease *lease_tmp;
54 char *new_name = NULL, *new_fqdn = NULL;
55 --
56 2.1.0
57