summaryrefslogtreecommitdiff
path: root/usr.sbin/ldpd/ldpd.h
diff options
context:
space:
mode:
authorRenato Westphal <renato@cvs.openbsd.org>2015-07-21 04:39:29 +0000
committerRenato Westphal <renato@cvs.openbsd.org>2015-07-21 04:39:29 +0000
commit22b7232788ef3e1e43a3eea24accf2dce2bf0e76 (patch)
tree98dc2e5707ab0b99d1f72ac08b2b8fd468b2c47e /usr.sbin/ldpd/ldpd.h
parentbc87e10cbdfe8497e844d366ad6ccb212d452149 (diff)
Improve handling of addresses on ldpe.
This is a preliminary work for the the next patch (sigup config reload). We want to make sure that the ldpe process can handle duplicated addresses. The idea is to alloc two different if_addr structures for each address, and link one in the global list of addresses (used to send address messages) and link the other to the associated interface list of addresses. Doing that we will be able to call kif_redistribute() after reloading the config file and activate the new LDP enabled interfaces. NOTE: Interfaces are created at config parse time and the child processes inherit them on fork() so there's no need to send a status update at startup. ok claudio@
Diffstat (limited to 'usr.sbin/ldpd/ldpd.h')
-rw-r--r--usr.sbin/ldpd/ldpd.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/usr.sbin/ldpd/ldpd.h b/usr.sbin/ldpd/ldpd.h
index c99784e9fbd..d0e4e944ac6 100644
--- a/usr.sbin/ldpd/ldpd.h
+++ b/usr.sbin/ldpd/ldpd.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: ldpd.h,v 1.49 2015/07/19 21:01:56 renato Exp $ */
+/* $OpenBSD: ldpd.h,v 1.50 2015/07/21 04:39:28 renato Exp $ */
/*
* Copyright (c) 2009 Michele Marchetto <michele@openbsd.org>
@@ -180,19 +180,19 @@ struct notify_msg {
};
struct if_addr {
- LIST_ENTRY(if_addr) global_entry;
- LIST_ENTRY(if_addr) iface_entry;
+ LIST_ENTRY(if_addr) entry;
struct in_addr addr;
struct in_addr mask;
struct in_addr dstbrd;
};
+LIST_HEAD(if_addr_head, if_addr);
struct iface {
LIST_ENTRY(iface) entry;
struct event hello_timer;
char name[IF_NAMESIZE];
- LIST_HEAD(, if_addr) addr_list;
+ struct if_addr_head addr_list;
LIST_HEAD(, adj) adj_list;
time_t uptime;
@@ -254,7 +254,7 @@ struct ldpd_conf {
struct event edisc_ev;
struct in_addr rtr_id;
LIST_HEAD(, iface) iface_list;
- LIST_HEAD(, if_addr) addr_list;
+ struct if_addr_head addr_list;
LIST_HEAD(, tnbr) tnbr_list;
LIST_HEAD(, nbr_params) nbrp_list;