Skip to content

Commit 0a38e02

Browse files
authored
Only drop IPv4 LL addresses if configured to handle them (#464)
1 parent e7f9091 commit 0a38e02

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/dhcp.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2170,7 +2170,8 @@ dhcp_finish_dad(struct interface *ifp, struct in_addr *ia)
21702170

21712171
#ifdef IPV4LL
21722172
/* Stop IPv4LL now we have a working DHCP address */
2173-
if (!IN_LINKLOCAL(ntohl(ia->s_addr)))
2173+
if ((!IN_LINKLOCAL(ntohl(ia->s_addr)))
2174+
&& (ifp->options->options & DHCPCD_IPV4LL))
21742175
ipv4ll_drop(ifp);
21752176
#endif
21762177

@@ -3329,7 +3330,8 @@ dhcp_handledhcp(struct interface *ifp, struct bootp *bootp, size_t bootp_len,
33293330
switch (tmp) {
33303331
case 0:
33313332
LOGDHCP(LOG_WARNING, "IPv4LL disabled from");
3332-
ipv4ll_drop(ifp);
3333+
if (ifp->options->options & DHCPCD_IPV4LL)
3334+
ipv4ll_drop(ifp);
33333335
#ifdef ARP
33343336
arp_drop(ifp);
33353337
#endif

0 commit comments

Comments
 (0)