summaryrefslogtreecommitdiff
path: root/ldpd/interface.c
diff options
context:
space:
mode:
authorRenato Westphal <renato@opensourcerouting.org>2017-04-22 12:03:14 -0300
committerRenato Westphal <renato@opensourcerouting.org>2017-06-05 12:24:23 -0300
commit602c726ef2a37597d9cba1f0adafc9bc4fc7e3db (patch)
treeb3495da7534a52deddff27661a19b04e0cbed8c0 /ldpd/interface.c
parentcb7426d40354d69a2705ee01240aef8a211cf3db (diff)
ldpd: fix bug when changing the transport address
When the transport address is changed, all interfaces and targeted neighbors are temporary disabled in the ldpe process until new sockets bound to the new transport address are received from the parent. This patch fixes a problem in which adjacencies weren't being removed after the associated targeted neighbors were disabled. This was causing ldpd not to set some MD5 sockoptions for new neighbors are thus preventing MD5-protected sessions to come up after a change in the transport-address. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
Diffstat (limited to 'ldpd/interface.c')
-rw-r--r--ldpd/interface.c9
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);
}
}