summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2009-03-23 14:05:51 +0000
committerRoy Marples <roy@marples.name>2009-03-23 14:05:51 +0000
commitfa8b2a7a8d7e451f2a7ab53e13748fac7ef403a0 (patch)
tree2d78f841ea0b5fe82b62d2469cdab96e0494a04d
parentb07b07c339057df227ac3c550b30a14e240a3f0f (diff)
downloaddhcpcd-fa8b2a7a8d7e451f2a7ab53e13748fac7ef403a0.tar.xz
If we define a static address, we are not informing and vice versa.
-rw-r--r--if-options.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/if-options.c b/if-options.c
index 15e4bfee..4ef78b79 100644
--- a/if-options.c
+++ b/if-options.c
@@ -400,7 +400,7 @@ parse_option(struct if_options *ifo, int opt, const char *arg)
break;
case 's':
ifo->options |= DHCPCD_INFORM | DHCPCD_PERSISTENT;
- ifo->options &= ~DHCPCD_ARP;
+ ifo->options &= ~(DHCPCD_ARP | DHCPCD_STATIC);
if (arg && *arg != '\0') {
if (parse_addr(&ifo->req_addr, &ifo->req_mask,
arg) != 0)
@@ -584,6 +584,7 @@ parse_option(struct if_options *ifo, int opt, const char *arg)
return -1;
ifo->options |= DHCPCD_STATIC;
+ ifo->options &= ~DHCPCD_INFORM;
} else if (strncmp(arg, "routes=", strlen("routes=")) == 0 ||
strncmp(arg, "static_routes=", strlen("static_routes=")) == 0 ||
strncmp(arg, "classless_static_routes=", strlen("classless_static_routes=")) == 0 ||