diff options
| author | Donald Sharp <sharpd@cumulusnetworks.com> | 2017-04-26 10:38:28 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-04-26 10:38:28 -0400 |
| commit | e24287f11c8a0f84523cde9533340d78749aed3d (patch) | |
| tree | 4655e773d4996fb374eea17bc5ec9e5b188dc927 /ldpd/interface.c | |
| parent | 1876a731a43cf929d32ac6247ba92a5439a7d299 (diff) | |
| parent | 8a26d0cf73e5f87b20aa47ed3f1465eab15da18a (diff) | |
Merge pull request #393 from opensourcerouting/ldpd-minor-fixes
ldpd: minor fixes
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 b7f473d396..7678152470 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,13 +370,11 @@ if_update_af(struct iface_af *ia, int link_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 && link_ok && addr_ok && socket_ok && rtr_id_ok) return; - ia->state = IF_STA_DOWN; if_reset(ia->iface, ia->af); } } |
