Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/dhcpcd.8.in
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
.Op Fl S , Fl Fl static Ar value
.Op Fl s , Fl Fl inform Ar address Ns Op Ar /cidr Ns Op Ar /broadcast_address
.Op Fl Fl inform6
.Op Fl Fl ipv6ll-external
.Op Fl t , Fl Fl timeout Ar seconds
.Op Fl u , Fl Fl userclass Ar class
.Op Fl v , Fl Fl vendor Ar code , Ar value
Expand Down Expand Up @@ -631,6 +632,11 @@ option to specify which protocol(s) to configure before exiting.
Configure IPv4 only.
.It Fl 6 , Fl Fl ipv6only
Configure IPv6 only.
.It Fl Fl ipv6ll-external
Don't create an IPv6 link-local address.
.Nm
waits for a usable link-local address to be created by another entity before
continuing IPv6 operations that require it.
.It Fl A , Fl Fl noarp
Don't request or claim the address by ARP.
This also disables IPv4LL.
Expand Down
10 changes: 10 additions & 0 deletions src/if-options.c
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@ const struct option cf_options[] = {
{"noup", no_argument, NULL, O_NOUP},
{"lastleaseextend", no_argument, NULL, O_LASTLEASE_EXTEND},
{"inactive", no_argument, NULL, O_INACTIVE},
{"ipv6ll-external", no_argument, NULL, O_IPV6LL_EXTERNAL},
{"mudurl", required_argument, NULL, O_MUDURL},
{"link_rcvbuf", required_argument, NULL, O_LINK_RCVBUF},
{"configure", no_argument, NULL, O_CONFIGURE},
Expand Down Expand Up @@ -2316,6 +2317,9 @@ parse_option(struct dhcpcd_ctx *ctx, const char *ifname, struct if_options *ifo,
case O_INACTIVE:
ifo->options |= DHCPCD_INACTIVE;
break;
case O_IPV6LL_EXTERNAL:
ifo->ipv6ll_external = true;
break;
case O_MUDURL:
ARG_REQUIRED;
s = parse_string((char *)ifo->mudurl + 1, MUDURL_MAX_LEN, arg);
Expand Down Expand Up @@ -2398,6 +2402,12 @@ parse_config_line(struct dhcpcd_ctx *ctx, const char *ifname,
{
unsigned int i;

if (strcmp(opt, "ipv6ll-external") == 0) {
logerrx("option can only be used on the command line -- %s",
opt);
return -1;
}

for (i = 0; i < sizeof(cf_options) / sizeof(cf_options[0]); i++) {
if (!cf_options[i].name ||
strcmp(cf_options[i].name, opt) != 0)
Expand Down
2 changes: 2 additions & 0 deletions src/if-options.h
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,7 @@
#define O_ROUTING_TABLE_ID O_BASE + 53
#define O_MAX_BACKOFF_TIMER O_BASE + 54
#define O_DHCPV4_COS O_BASE + 55
#define O_IPV6LL_EXTERNAL O_BASE + 56

extern const struct option cf_options[];

Expand Down Expand Up @@ -240,6 +241,7 @@ struct if_options {
uint32_t timeout;
uint32_t reboot;
unsigned long long options;
bool ipv6ll_external;
bool randomise_hwaddr;

struct in_addr req_addr;
Expand Down
2 changes: 2 additions & 0 deletions src/ipv6.c
Original file line number Diff line number Diff line change
Expand Up @@ -1558,6 +1558,8 @@ ipv6_tryaddlinklocal(struct interface *ifp)
#endif
return 0;
}
if (ifp->options->ipv6ll_external)
return 0;
if (!CAN_ADD_LLADDR(ifp))
return 0;

Expand Down