Age | Commit message (Collapse) | Author |
|
|
|
`OK' claudio
|
|
henning, sthen, michele like the idea
|
|
few remaining ".Tn UNIX" macros with ".Ux" ones.
pointed out by ratchov@, thanks!
ok jmc@
|
|
ok jmc@
|
|
in an error path.
|
|
loop in the shutdown case. OK henning@
|
|
parameter was NULL. But it's easy enough to make ifname != NULL by accident,
e.g. by passing a zeroed or even uninitialised array. This function should
accept a 'virtual' flag of some kind instead.
Since we don't even support virtual links yet, change the check to
"if (virtual)", #if 0 the check, and code that depends on it (including
a file-scope variable), and add comments marking this as TODO.
ok claudio, who requested #if 0 instead of deletion.
|
|
caller passed NULL for the sdl parameter.
ok claudio@
|
|
function, which is additionally exported for use by others.
It will be needed by smtpd's SSL module when the SMTP client code
is changed to replace libevent's evbuffers with our msgbuf_* API.
ok gilles@ henning@ guenther@ eric@
|
|
freeing the msgbuf.
While here also remove an unnecessary while loop.
ok eric pyr
|
|
as router type and not as a network.
From stsp@
|
|
Again from stsp@
|
|
when passing -1 as fd to the imsg call. No frogs for eric@ and pyr@
From stsp@
|
|
bytes that were filled, not the whole buffer.
ok pyr@ gilles@
|
|
Make the imsg protocol network-safe.
it might be network safe, but half the imsg based daemons on my firewalls
dont run anymore.
|
|
Currently the receiver fetches an imsg via imsg_get() and if he expects
an fd, he then calls imsg_get_fd() to fetch the next fd queued on the
imsgbuf from which the imsg came.
This changes hides the fd queueing mechanism to the API user. When closing
an imsg with an fd, the message is flagged so that the receiving end knows
it must dequeue the fd in imsg_get() and return it with the imsg structure.
This way there is no (less) possible screw up from imsg_get_fd() not being
called directly after imsg_get() by the user. The retreived imsg is
self-contained.
ok pyr@, "I like that" henning@
|
|
ok pyr@
|
|
add a flag field, use u_int32_t for pid_t and extend type to 32 bits
for padding.
ok pyr@
|
|
|
|
ospf6ctl is already broken in tree (not connected to build).
ok pyr@
|
|
ok claudio@, henning@
|
|
|
|
time in the callback. Same diff that went into ospfd applied with some
fuzz.
|
|
populated. Intra-area routes only for now.
"I see no obvious issues. Should go in so you can move forward" claudio@
|
|
we never entered this code path before. This is just a temporary fix.
The kroute code desperately needs a sync to ospfd.
"Looks sensible to me" jsing@, "Yes and yes" claudio@
|
|
"consistency is a good thing" jsing@, ok claudio@
|
|
allocations fails.
looks right deraadt, krw
ok henning
|
|
This implements the first stage of the shortest path tree calculation
(Dijkstra calculation) as outlined in rfc5340, with the exception that
we do not yet treat multiple router LSAs originated by a single router
as an agregate. For now, we only use the Router LSA with the lowest link
state ID.
For each destination, show the calculated set of nexthops in the debug log.
We can stop doing this once spf tree calculation has been shown to be stable.
"A lot of debug code but yes why not. commit it." claudio@
|
|
last commit. Next hop IP addresses and outgoing interfaces can now
be correctly determined, paving the way for SPF tree calculation.
Arguments have changed, so update callers, too.
ok claudio@
|
|
next-hop calculation.
In OSPFv3, next-hop IP addresses are always link-local.
The kernel will want to know which interface the link-local
address belongs to, so we need an ifindex in struct v_nexthop
in addition to the IP address.
Because we cannot determine a link-local next hop IP address
for transit networks, only the outgoing interface will be recorded.
Update calc_nexthop_add() according to the above.
Also add new helpers calc_nexthop_lladdr() and calc_nexthop_transit_nbr(),
to figure out link-local addresses of nexthop neighbours.
ok claudio@
|
|
A router vertex w has a point-to-point link back to a router
vertex v if v's router ID occurs as neighbour ID in one of the
point-to-point links described in w's router LSA.
A router vertex w has a link back to a network vertex v if the router
ID of v's advertising router (i.e. DR) occurs as neighbour ID in one
of the transit links described in w's router LSA, and v's interface
ID to the network matches the neighbour interface ID of that transit
link.
A network vertex w has a link back to a router vertex v if v's router
ID occurs in the list of attached routers in w's network LSA.
Also, get_rtr_link() and get_net_link() take an unsigned int now.
"commit it" claudio@
|
|
use less local variables. Makes it consistent with get_rtr_link().
ok claudio@
|
|
it was always returning the first link in the LSA, no matter
which link was requested. Fix this bug. Also, decrease the
number of local variables while here, and convert the idx argument
to unsigned int. Adjust one caller to pass an unsigned int,
other callers will be handled in follow-up commits.
ok claudio@
|
|
pointed out by and ok claudio@
|
|
LSAs originated by the same router the one with the lowest link
state ID.
ok claudio@
|
|
are subtracted from the total length.
ok claudio@
|
|
Most obvious use is to log router IDs.
To facilitate logging of multiple IDs within the same format string,
we use NUM_LOGS static buffers, just like log_sockaddr() does.
help and ok claudio@
|
|
can make use of it much better. No functional change.
ok claudio@
|
|
In Network-LSAs, the only thing sitting between the LSA header
and the attached router list is the options field. We already
have lsa_net_link to represent elements of the attached router list,
so there's no need to have a single entry of this list in lsa_net.
ok claudio@
|
|
in hello packets by next-hop neighbours. So when notifying the
RDE of a new neighbour, send the source address, too.
ok claudio@
|
|
ok stsp@
|
|
buried inside of it that its caller relied on.
So split it up as follows:
lsa_self() Check whether an LSA is self-originated.
lsa_flush() Flush an LSA from the LSDB.
lsa_reflood() Prepare an LSA for reflooding (actual reflooding currently
requires sending an imsg which must be done by the caller).
ok claudio@
|
|
as "spf_calc" in fatal error messages.
|
|
|
|
as "spf_calc" in fatal error messages.
|
|
"Do we need anything fancy to determine whether *-prefix-LSAs
are self-originated?"
The answer is "No, we don't, see section 4.6 of RFC5340."
ok claudio@
|
|
We had code marked XXX searching an LSA tree manually using RB_FIND(),
switch it over to lsa_find_tree().
Make lsa_find() use the new function, too, to avoid code duplication.
ok claudio@
|
|
fails -- which should never happen -- the function does not return and is
accession the NULL set control pointer later on.
Found by Matthew Haub. OK deraadt@
|
|
"For sure!" claudio@
|