diff options
| author | Roy Marples <roy@marples.name> | 2019-01-23 13:01:19 +0000 |
|---|---|---|
| committer | Roy Marples <roy@marples.name> | 2019-01-23 13:01:19 +0000 |
| commit | 09144e2db83d24d1e869a55a8a452b96eca9dd30 (patch) | |
| tree | 61cb8ee45697ffec768ef5243a13b795424574ed /src/if.c | |
| parent | 68135c5d0a130ba301ca2e4552ba3131d92be05f (diff) | |
| download | dhcpcd-09144e2db83d24d1e869a55a8a452b96eca9dd30.tar.xz | |
DHCP6: Remove #defines for functions when DHCP6 is disabled
This allows us to optimise the code better and hopefully
become less error prone.
Diffstat (limited to 'src/if.c')
| -rw-r--r-- | src/if.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -85,7 +85,9 @@ if_free(struct interface *ifp) dhcp_free(ifp); ipv4_free(ifp); #endif +#ifdef DHCP6 dhcp6_free(ifp); +#endif ipv6nd_free(ifp); ipv6_free(ifp); rt_freeif(ifp); @@ -740,10 +742,12 @@ if_cmp(const struct interface *si, const struct interface *ti) return -1; if (!RS_STATE_RUNNING(si) && RS_STATE_RUNNING(ti)) return 1; +#ifdef DHCP6 if (D6_STATE_RUNNING(si) && !D6_STATE_RUNNING(ti)) return -1; if (!D6_STATE_RUNNING(si) && D6_STATE_RUNNING(ti)) return 1; +#endif #ifdef INET /* Special attention needed here due to states and IPv4LL. */ |
