diff options
| author | Roy Marples <roy@marples.name> | 2012-01-31 16:32:10 +0000 |
|---|---|---|
| committer | Roy Marples <roy@marples.name> | 2012-01-31 16:32:10 +0000 |
| commit | 159cb2e6cf17d7f8f1f9770d6f2ae6a0574b7619 (patch) | |
| tree | fc7bdc6b2290c11a303c5b112b8b212eb1c016b0 | |
| parent | 7ae411d94292aad0806c83c0ec33dba9e81896fa (diff) | |
| download | dhcpcd-159cb2e6cf17d7f8f1f9770d6f2ae6a0574b7619.tar.xz | |
Fix carrier handling on BSD for interfaces that don't support link status
| -rw-r--r-- | if-bsd.c | 13 |
1 files changed, 11 insertions, 2 deletions
@@ -356,9 +356,18 @@ manage_link(int fd) case LINK_STATE_DOWN: len = -1; break; + case LINK_STATE_UP: + len = 1; + break; default: - len = ~ifm->ifm_flags & - (IFF_UP | IFF_RUNNING) ? -1 : 1; + /* handle_carrier will re-load + * the interface flags and check for + * IFF_RUNNING as some drivers that + * don't handle link state also don't + * set IFF_RUNNING when this routing + * message is generated. + * As such, it is a race ...*/ + len = 0; break; } handle_carrier(len, ifm->ifm_flags, ifname); |
