diff options
| author | 2011-05-09 12:24:41 +0000 | |
|---|---|---|
| committer | 2011-05-09 12:24:41 +0000 | |
| commit | 097ed1982b44f2ec88eda04b5172e3d33ebe6c43 (patch) | |
| tree | 3bdff0eefafbae7ca2ad52f606f9e0739eb3ba03 /usr.sbin/ospfd/database.c | |
| parent | Reorganize the relayd code to use the proc.c privsep API/commodity (diff) | |
| download | wireguard-openbsd-097ed1982b44f2ec88eda04b5172e3d33ebe6c43.tar.xz wireguard-openbsd-097ed1982b44f2ec88eda04b5172e3d33ebe6c43.zip | |
First bits to support opaque LSA. Type-9, 10 and 11 are LSA that can
hold about any data you like and is used for things like greaceful
reload. Implement the basic redistribute logic and LSDB handling but
the data sent is currently not looked at.
Tested and OK sthen@
Diffstat (limited to 'usr.sbin/ospfd/database.c')
| -rw-r--r-- | usr.sbin/ospfd/database.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/usr.sbin/ospfd/database.c b/usr.sbin/ospfd/database.c index f3641c31f6d..80f5e0cede0 100644 --- a/usr.sbin/ospfd/database.c +++ b/usr.sbin/ospfd/database.c @@ -1,4 +1,4 @@ -/* $OpenBSD: database.c,v 1.28 2011/03/04 09:24:46 claudio Exp $ */ +/* $OpenBSD: database.c,v 1.29 2011/05/09 12:24:41 claudio Exp $ */ /* * Copyright (c) 2005 Claudio Jeker <claudio@openbsd.org> @@ -138,7 +138,8 @@ send_db_description(struct nbr *nbr) fatalx("send_db_description: unknown interface type"); } - dd_hdr.opts = area_ospf_options(nbr->iface->area); + /* XXX button or not for opaque LSA? */ + dd_hdr.opts = area_ospf_options(nbr->iface->area) | OSPF_OPTION_O; dd_hdr.bits = bits; dd_hdr.dd_seq_num = htonl(nbr->dd_seq_num); @@ -211,6 +212,13 @@ recv_db_description(struct nbr *nbr, char *buf, u_int16_t len) case NBR_STA_XSTRT: if (dupe) return; + nbr->capa_options = dd_hdr.opts; + if ((nbr->capa_options & nbr->options) != nbr->options) { + log_warnx("recv_db_description: neighbor ID %s " + "sent inconsistent options %x vs. %x", + inet_ntoa(nbr->id), nbr->capa_options, + nbr->options); + } /* * check bits: either I,M,MS or only M */ |
