diff options
| author | Donald Sharp <sharpd@cumulusnetworks.com> | 2017-06-06 08:24:47 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-06-06 08:24:47 -0400 |
| commit | f46f4756313fcd86b4a80de116db060d32c71188 (patch) | |
| tree | ca6ca9a726feac37b689e3007b38fbfcb2aebd3b /ldpd/interface.c | |
| parent | 509fac8d8564fcb3d0bec3be9567312f6d83e889 (diff) | |
| parent | c18ac4c29a829edd98591931ba4ed827b3569095 (diff) | |
Merge pull request #675 from opensourcerouting/ldpd-cherry-picks
ldpd: cherry-pick fixes from master to stable/3.0
Diffstat (limited to 'ldpd/interface.c')
| -rw-r--r-- | ldpd/interface.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/ldpd/interface.c b/ldpd/interface.c index 7be8be755e..440bb2dca0 100644 --- a/ldpd/interface.c +++ b/ldpd/interface.c @@ -287,8 +287,9 @@ if_start(struct iface *iface, int af) } send_hello(HELLO_LINK, ia, NULL); - if_start_hello_timer(ia); + ia->state = IF_STA_ACTIVE; + return (0); } @@ -318,9 +319,11 @@ if_reset(struct iface *iface, int af) if_leave_ipv6_group(iface, &global.mcast_addr_v6); break; default: - fatalx("if_start: unknown af"); + fatalx("if_reset: unknown af"); } + ia->state = IF_STA_DOWN; + return (0); } @@ -367,14 +370,12 @@ if_update_af(struct iface_af *ia) !socket_ok || !rtr_id_ok) return; - ia->state = IF_STA_ACTIVE; if_start(ia->iface, ia->af); } else if (ia->state == IF_STA_ACTIVE) { if (ia->enabled && ia->iface->operative && addr_ok && socket_ok && rtr_id_ok) return; - ia->state = IF_STA_DOWN; if_reset(ia->iface, ia->af); } } |
