summaryrefslogtreecommitdiffstats
path: root/src/ipv6nd.c
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2020-10-06 07:10:41 +0100
committerRoy Marples <roy@marples.name>2020-10-06 07:10:41 +0100
commit053976a565bd812c4ecc155173887cce4e3f15a4 (patch)
tree7d982322bbf3b6e1a173769c9f242e97e4038551 /src/ipv6nd.c
parente2b4e65aa0730c5e8d46c0a5d9fa11b9818520a6 (diff)
downloaddhcpcd-053976a565bd812c4ecc155173887cce4e3f15a4.tar.xz
dhcpcd: Simplify carrier handling more by using IS_LINK_UP macro
Removes the need for the LINK_DOWN_IFFUP state. While here, remove the check for IFF_RUNNING when LINK_UNKNOWN because that is OS specific.
Diffstat (limited to 'src/ipv6nd.c')
-rw-r--r--src/ipv6nd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ipv6nd.c b/src/ipv6nd.c
index 4afbf1fb..63d311a5 100644
--- a/src/ipv6nd.c
+++ b/src/ipv6nd.c
@@ -437,7 +437,7 @@ ipv6nd_sendadvertisement(void *arg)
const struct rs_state *state = RS_CSTATE(ifp);
int s;
- if (state == NULL || ifp->carrier <= LINK_DOWN)
+ if (state == NULL || !IS_LINK_UP(ifp))
goto freeit;
#ifdef SIN6_LEN
@@ -505,7 +505,7 @@ ipv6nd_advertise(struct ipv6_addr *ia)
iaf = NULL;
TAILQ_FOREACH(ifp, ctx->ifaces, next) {
state = IPV6_STATE(ifp);
- if (state == NULL || ifp->carrier <= LINK_DOWN)
+ if (state == NULL || !IS_LINK_UP(ifp))
continue;
TAILQ_FOREACH(iap, &state->addrs, next) {