OpenBSD CVS

CVS log for src/sys/net/bfd.c


[BACK] Up to [local] / src / sys / net

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.80 / (download) - annotate - [select for diffs], Thu Aug 3 09:49:08 2023 UTC (10 months, 1 week ago) by mvs
Branch: MAIN
CVS Tags: OPENBSD_7_5_BASE, OPENBSD_7_5, OPENBSD_7_4_BASE, OPENBSD_7_4, HEAD
Changes since 1.79: +1 -9 lines
Diff to previous 1.79 (colored)

Move solock() down to sosetopt(). A part of standalone sblock() work.
This movement required because buffers related SO_SND* and SO_RCV*
socket options should be protected with sblock(). However, standalone
sblock() has different lock order with solock() and `so_snd' and
`so_rcv' buffers. At least sblock() for `so_snd' buffer will always be
taken before solock() in the sosend() path.

The (*pr_ctloutput)() call was removed from the SOL_SOCKET level 'else'
branch. Except the SO_RTABLE case where it handled in the special way,
this is null op call.

For SO_SND* and SO_RCV* cases solock() will be replaced by sblock() in
the future.

Feedback from bluhm

Tested by bluhm naddy

ok bluhm

Revision 1.79 / (download) - annotate - [select for diffs], Wed Jul 12 16:10:45 2023 UTC (11 months ago) by mvs
Branch: MAIN
Changes since 1.78: +15 -17 lines
Diff to previous 1.78 (colored)

Fix solock()/sounlock() usage.

This time solock() doesn't return value and sounlock() hasn't second
parameter. Bi-directional Forwarding Detection is disabled by default,
so it was forgotten when solock()/sounlock() were changed.

Build test done with BFD option.

ok phessler claudio

Revision 1.78 / (download) - annotate - [select for diffs], Tue Sep 14 09:15:55 2021 UTC (2 years, 8 months ago) by mvs
Branch: MAIN
CVS Tags: OPENBSD_7_3_BASE, OPENBSD_7_3, OPENBSD_7_2_BASE, OPENBSD_7_2, OPENBSD_7_1_BASE, OPENBSD_7_1, OPENBSD_7_0_BASE, OPENBSD_7_0
Changes since 1.77: +7 -4 lines
Diff to previous 1.77 (colored)

Add missing kernel lock for Bi-directional Forwarding Detection data.

Also bfdset() calls pool_get(9) with PR_WAITOK flag so it should be done
before we check the existence of this `bfd', otherwise it could be added
multiple times.

We have BFD disabled in the default kernel so this diff is for
consistency mostly.

ok mpi@

Revision 1.77 / (download) - annotate - [select for diffs], Sun Jun 2 13:22:36 2019 UTC (5 years ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_6_9_BASE, OPENBSD_6_9, OPENBSD_6_8_BASE, OPENBSD_6_8, OPENBSD_6_7_BASE, OPENBSD_6_7, OPENBSD_6_6_BASE, OPENBSD_6_6
Changes since 1.76: +3 -3 lines
Diff to previous 1.76 (colored)

Repair state and flag bitmasks to match RFC, from Mitchell Krome
ok claudio

Revision 1.76 / (download) - annotate - [select for diffs], Tue May 28 18:39:06 2019 UTC (5 years ago) by kn
Branch: MAIN
Changes since 1.75: +2 -2 lines
Diff to previous 1.75 (colored)

Fix reporting of up->down transition in routing message

The code for updating the laststate and timer is looking at laststate before
it's been updated.

From Mitchell Krome <mitchellkrome at gmail dot com>, thanks!

OK claudio

Revision 1.75 / (download) - annotate - [select for diffs], Thu May 9 14:29:30 2019 UTC (5 years, 1 month ago) by phessler
Branch: MAIN
Changes since 1.74: +2 -10 lines
Diff to previous 1.74 (colored)

we don't need to check rtisvalid() in these places, the functions we are
protecing will do the right thing

OK claudio@

Revision 1.74 / (download) - annotate - [select for diffs], Sun Jan 20 22:52:23 2019 UTC (5 years, 4 months ago) by phessler
Branch: MAIN
CVS Tags: OPENBSD_6_5_BASE, OPENBSD_6_5
Changes since 1.73: +3 -3 lines
Diff to previous 1.73 (colored)

use the faster interface, since the precision is not necessary

Revision 1.73 / (download) - annotate - [select for diffs], Fri Jan 18 08:32:59 2019 UTC (5 years, 4 months ago) by phessler
Branch: MAIN
Changes since 1.72: +7 -7 lines
Diff to previous 1.72 (colored)

chase sounlock() api change, make bfd(4) build again

"go ahead" deraadt@

Revision 1.72 / (download) - annotate - [select for diffs], Mon Jul 30 12:22:14 2018 UTC (5 years, 10 months ago) by mpi
Branch: MAIN
CVS Tags: OPENBSD_6_4_BASE, OPENBSD_6_4
Changes since 1.71: +6 -6 lines
Diff to previous 1.71 (colored)

Use FNONBLOCK instead of SS_NBIO to check/indicate that the I/O mode
for sockets is non-blocking.

This allows us to G/C SS_NBIO.  Having to keep the two flags in sync
in a mp-safe way is complicated.

This change introduce a behavior change in sosplice(), it can now
always block.  However this should not matter much due to the socket
lock being taken beforhand.

ok bluhm@, benno@, visa@

Revision 1.71 / (download) - annotate - [select for diffs], Wed Jun 6 06:55:22 2018 UTC (6 years ago) by mpi
Branch: MAIN
Changes since 1.70: +2 -2 lines
Diff to previous 1.70 (colored)

Pass the socket to sounlock(), this prepare the terrain for per-socket
locking.

ok visa@, bluhm@

Revision 1.70 / (download) - annotate - [select for diffs], Sat Apr 28 08:14:09 2018 UTC (6 years, 1 month ago) by phessler
Branch: MAIN
Changes since 1.69: +2 -2 lines
Diff to previous 1.69 (colored)

bump my copyright

Revision 1.69 / (download) - annotate - [select for diffs], Sat Apr 28 08:13:42 2018 UTC (6 years, 1 month ago) by phessler
Branch: MAIN
Changes since 1.68: +2 -2 lines
Diff to previous 1.68 (colored)

don't check if we still have the BFD flag set when sending a packet, as we
might be shutting the session down

Revision 1.68 / (download) - annotate - [select for diffs], Sat Apr 28 07:46:56 2018 UTC (6 years, 1 month ago) by phessler
Branch: MAIN
Changes since 1.67: +5 -7 lines
Diff to previous 1.67 (colored)

properly delete the bfd configuration when it is disabled

Revision 1.67 / (download) - annotate - [select for diffs], Sat Apr 28 07:45:47 2018 UTC (6 years, 1 month ago) by phessler
Branch: MAIN
Changes since 1.66: +3 -3 lines
Diff to previous 1.66 (colored)

use unsigned variables for things that we use as unsigned

noticed by clang

Revision 1.66 / (download) - annotate - [select for diffs], Sat Apr 28 07:44:44 2018 UTC (6 years, 1 month ago) by phessler
Branch: MAIN
Changes since 1.65: +17 -1 lines
Diff to previous 1.65 (colored)

add the socket lock around our use of sockets

Revision 1.65 / (download) - annotate - [select for diffs], Fri Sep 8 05:36:53 2017 UTC (6 years, 9 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_6_3_BASE, OPENBSD_6_3, OPENBSD_6_2_BASE, OPENBSD_6_2
Changes since 1.64: +2 -3 lines
Diff to previous 1.64 (colored)

If you use sys/param.h, you don't need sys/types.h

Revision 1.64 / (download) - annotate - [select for diffs], Fri Sep 1 15:05:31 2017 UTC (6 years, 9 months ago) by mpi
Branch: MAIN
Changes since 1.63: +5 -1 lines
Diff to previous 1.63 (colored)

Change sosetopt() to no longer free the mbuf it receives and change
all the callers to call m_freem(9).

Support from deraadt@ and tedu@, ok visa@, bluhm@

Revision 1.63 / (download) - annotate - [select for diffs], Thu Aug 10 16:38:37 2017 UTC (6 years, 10 months ago) by bluhm
Branch: MAIN
Changes since 1.62: +3 -1 lines
Diff to previous 1.62 (colored)

The caller of sobind() has to free the name mbuf.  Plug a mbuf leak
in bfd_listener().
OK phessler@

Revision 1.62 / (download) - annotate - [select for diffs], Tue May 16 12:24:01 2017 UTC (7 years ago) by mpi
Branch: MAIN
Changes since 1.61: +1 -3 lines
Diff to previous 1.61 (colored)

Replace remaining splsoftassert(IPL_SOFTNET) by NET_ASSERT_LOCKED().

ok visa@

Revision 1.61 / (download) - annotate - [select for diffs], Fri Mar 10 02:12:46 2017 UTC (7 years, 3 months ago) by phessler
Branch: MAIN
CVS Tags: OPENBSD_6_1_BASE, OPENBSD_6_1
Changes since 1.60: +17 -2 lines
Diff to previous 1.60 (colored)

move clearing the bfd config to a task.  while here, fix a typo

Revision 1.60 / (download) - annotate - [select for diffs], Fri Mar 10 01:38:07 2017 UTC (7 years, 3 months ago) by phessler
Branch: MAIN
Changes since 1.59: +20 -4 lines
Diff to previous 1.59 (colored)

move receiving and processing the BFD packet into a task

Revision 1.59 / (download) - annotate - [select for diffs], Mon Mar 6 08:56:39 2017 UTC (7 years, 3 months ago) by mpi
Branch: MAIN
Changes since 1.58: +4 -4 lines
Diff to previous 1.58 (colored)

Prefix functions dealing with routing messages with 'rtm_' and keep
them all in net/rtsock.c.

This allows to easily spot which functions are doing a copyout(9)
when dealing with the routing midlayer.

ok phessler@, bluhm@, dhill@, krw@, claudio@

Revision 1.58 / (download) - annotate - [select for diffs], Tue Jan 24 10:08:30 2017 UTC (7 years, 4 months ago) by krw
Branch: MAIN
Changes since 1.57: +4 -4 lines
Diff to previous 1.57 (colored)

A space here, a space there. Soon we're talking real whitespace
rectification.

Revision 1.57 / (download) - annotate - [select for diffs], Tue Jan 24 03:53:32 2017 UTC (7 years, 4 months ago) by phessler
Branch: MAIN
Changes since 1.56: +5 -3 lines
Diff to previous 1.56 (colored)

only send the rt msg on timeout failure if bfd is not down

Revision 1.56 / (download) - annotate - [select for diffs], Tue Jan 24 02:52:36 2017 UTC (7 years, 4 months ago) by phessler
Branch: MAIN
Changes since 1.55: +12 -12 lines
Diff to previous 1.55 (colored)

move setting the IP TOS from the listening socket to the sending socket

Revision 1.55 / (download) - annotate - [select for diffs], Sun Jan 22 00:39:45 2017 UTC (7 years, 4 months ago) by phessler
Branch: MAIN
Changes since 1.54: +12 -1 lines
Diff to previous 1.54 (colored)

set the TOS/ECN field to Internetwork Control, since that is exactly
what we are doing

Revision 1.54 / (download) - annotate - [select for diffs], Sat Jan 21 10:15:15 2017 UTC (7 years, 4 months ago) by phessler
Branch: MAIN
Changes since 1.53: +3 -3 lines
Diff to previous 1.53 (colored)

sockets tell us the size of their data.  since we want one udp packet,
just use that.  uses one less soreceive() loop per packet received.

hints from claudio@

Revision 1.53 / (download) - annotate - [select for diffs], Sat Jan 21 08:40:04 2017 UTC (7 years, 4 months ago) by phessler
Branch: MAIN
Changes since 1.52: +5 -4 lines
Diff to previous 1.52 (colored)

be more explict with the size of bfd packets we send and receive

Revision 1.52 / (download) - annotate - [select for diffs], Fri Jan 20 10:18:52 2017 UTC (7 years, 4 months ago) by phessler
Branch: MAIN
Changes since 1.51: +2 -2 lines
Diff to previous 1.51 (colored)

if a route is not valid, set down instead of admindown

Revision 1.51 / (download) - annotate - [select for diffs], Fri Jan 20 09:18:52 2017 UTC (7 years, 4 months ago) by phessler
Branch: MAIN
Changes since 1.50: +2 -2 lines
Diff to previous 1.50 (colored)

fix typo

Revision 1.50 / (download) - annotate - [select for diffs], Fri Jan 20 09:01:19 2017 UTC (7 years, 4 months ago) by phessler
Branch: MAIN
Changes since 1.49: +4 -1 lines
Diff to previous 1.49 (colored)

don't increase the error counter in the not-down case, in general

Revision 1.49 / (download) - annotate - [select for diffs], Fri Jan 20 08:50:45 2017 UTC (7 years, 4 months ago) by phessler
Branch: MAIN
Changes since 1.48: +2 -2 lines
Diff to previous 1.48 (colored)

only increase the error counter if we are in a not-down state

Revision 1.48 / (download) - annotate - [select for diffs], Fri Jan 20 08:37:48 2017 UTC (7 years, 4 months ago) by phessler
Branch: MAIN
Changes since 1.47: +2 -2 lines
Diff to previous 1.47 (colored)

correctly set our rx timer to be the required minimum, not the bare
minimum the neighbor supports

Revision 1.47 / (download) - annotate - [select for diffs], Thu Jan 19 23:18:29 2017 UTC (7 years, 4 months ago) by phessler
Branch: MAIN
Changes since 1.46: +36 -1 lines
Diff to previous 1.46 (colored)

add hooks so we can query the current state of a BFD session

bfd session details are visible with "route -n get 192.0.2.1 -bfd"

OK mpi@ deraadt@ claudio@

Revision 1.46 / (download) - annotate - [select for diffs], Thu Jan 19 10:19:39 2017 UTC (7 years, 4 months ago) by phessler
Branch: MAIN
Changes since 1.45: +2 -2 lines
Diff to previous 1.45 (colored)

when parsing a BFD packet, avoid an uninitialized variable if the
version check fails

found by jsg@ with clang

Revision 1.45 / (download) - annotate - [select for diffs], Thu Jan 19 09:57:39 2017 UTC (7 years, 4 months ago) by phessler
Branch: MAIN
Changes since 1.44: +16 -12 lines
Diff to previous 1.44 (colored)

make error handling a function, and use it in a few places

not all error handling is converted, some require a bit more thought

Revision 1.44 / (download) - annotate - [select for diffs], Thu Jan 19 09:08:50 2017 UTC (7 years, 4 months ago) by phessler
Branch: MAIN
Changes since 1.43: +2 -2 lines
Diff to previous 1.43 (colored)

rtisvalid() checks for RTF_UP, so instead check for RTF_BFD

Revision 1.43 / (download) - annotate - [select for diffs], Thu Jan 19 08:55:46 2017 UTC (7 years, 4 months ago) by phessler
Branch: MAIN
Changes since 1.42: +3 -1 lines
Diff to previous 1.42 (colored)

when deconfiguring a BFD session, clear both the RTF_BFD flag on the
route, and the pointer to the route bfd uses

Revision 1.42 / (download) - annotate - [select for diffs], Thu Jan 12 16:14:42 2017 UTC (7 years, 4 months ago) by mpi
Branch: MAIN
Changes since 1.41: +2 -14 lines
Diff to previous 1.41 (colored)

Remove unneeded splsoftnet().

Global data structures are protected by the KERNEL_LOCK() and
route_input() already raises the IPL when it needs it.

ok phessler@

Revision 1.41 / (download) - annotate - [select for diffs], Sat Sep 24 19:29:55 2016 UTC (7 years, 8 months ago) by phessler
Branch: MAIN
Changes since 1.40: +7 -3 lines
Diff to previous 1.40 (colored)

a route message for BFD, so we can notify userland about the status.
currently used on state-transitions.

OK mpi@

Revision 1.40 / (download) - annotate - [select for diffs], Fri Sep 23 14:06:29 2016 UTC (7 years, 8 months ago) by phessler
Branch: MAIN
Changes since 1.39: +4 -4 lines
Diff to previous 1.39 (colored)

since the kernel ticks are every 10ms, bump our minimum up a little bit.
make it harder to overload the kernel

Revision 1.39 / (download) - annotate - [select for diffs], Fri Sep 23 12:50:17 2016 UTC (7 years, 8 months ago) by phessler
Branch: MAIN
Changes since 1.38: +2 -9 lines
Diff to previous 1.38 (colored)

based on a more careful reading of the spec, we're not allowed to make
decisions on what the "my discriminator" value is from our neighbor.  we
should only copy it and send it back.

Revision 1.38 / (download) - annotate - [select for diffs], Fri Sep 23 10:20:20 2016 UTC (7 years, 8 months ago) by phessler
Branch: MAIN
Changes since 1.37: +2 -2 lines
Diff to previous 1.37 (colored)

only set the diag code when we we decide to fail it, not when the first
problem is seen

Revision 1.37 / (download) - annotate - [select for diffs], Fri Sep 23 10:09:07 2016 UTC (7 years, 8 months ago) by phessler
Branch: MAIN
Changes since 1.36: +8 -17 lines
Diff to previous 1.36 (colored)

remove splsoftnet around the socket functions.  if they need it, they
will call it themselves.

also ensure that bfdclear is protected by softnet.

requested by claudio@ and mpi@

Revision 1.36 / (download) - annotate - [select for diffs], Tue Sep 20 19:43:56 2016 UTC (7 years, 8 months ago) by phessler
Branch: MAIN
Changes since 1.35: +3 -2 lines
Diff to previous 1.35 (colored)

properly set our state to down when we initially create the session.

while here, fix the diag code for route-down

Revision 1.35 / (download) - annotate - [select for diffs], Tue Sep 20 19:40:53 2016 UTC (7 years, 8 months ago) by phessler
Branch: MAIN
Changes since 1.34: +9 -7 lines
Diff to previous 1.34 (colored)

little bit of whitespace

Revision 1.34 / (download) - annotate - [select for diffs], Tue Sep 20 19:38:16 2016 UTC (7 years, 8 months ago) by phessler
Branch: MAIN
Changes since 1.33: +23 -4 lines
Diff to previous 1.33 (colored)

sprinkle some splsoftnet around sosocket and our soon-to-be-rtmsg locations

Revision 1.33 / (download) - annotate - [select for diffs], Mon Sep 19 10:54:18 2016 UTC (7 years, 8 months ago) by phessler
Branch: MAIN
Changes since 1.32: +2 -2 lines
Diff to previous 1.32 (colored)

sigh, correct typo

Revision 1.32 / (download) - annotate - [select for diffs], Mon Sep 19 10:03:40 2016 UTC (7 years, 8 months ago) by phessler
Branch: MAIN
Changes since 1.31: +14 -6 lines
Diff to previous 1.31 (colored)

do a better job of setting "last state"

Revision 1.31 / (download) - annotate - [select for diffs], Mon Sep 19 09:03:41 2016 UTC (7 years, 8 months ago) by phessler
Branch: MAIN
Changes since 1.30: +4 -3 lines
Diff to previous 1.30 (colored)

send a nice diagnostic reason when we destroy all bfd interfaces (reboot)

Revision 1.30 / (download) - annotate - [select for diffs], Mon Sep 19 07:58:57 2016 UTC (7 years, 8 months ago) by phessler
Branch: MAIN
Changes since 1.29: +1 -18 lines
Diff to previous 1.29 (colored)

remove a bunch of noisy implementation-helper printfs

Revision 1.29 / (download) - annotate - [select for diffs], Mon Sep 19 07:28:40 2016 UTC (7 years, 8 months ago) by phessler
Branch: MAIN
Changes since 1.28: +40 -45 lines
Diff to previous 1.28 (colored)

once again, fix the bfd state-machine.  this time, tested against a
juniper which rolled through several states during testing
(up->admindown->up->timeout->up)

Revision 1.28 / (download) - annotate - [select for diffs], Sun Sep 18 21:00:55 2016 UTC (7 years, 8 months ago) by phessler
Branch: MAIN
Changes since 1.27: +2 -2 lines
Diff to previous 1.27 (colored)

apply the canary to the correct variable

Revision 1.27 / (download) - annotate - [select for diffs], Sat Sep 17 07:35:05 2016 UTC (7 years, 8 months ago) by phessler
Branch: MAIN
Changes since 1.26: +241 -258 lines
Diff to previous 1.26 (colored)

*** empty log message ***

Revision 1.26 / (download) - annotate - [select for diffs], Thu Sep 15 08:39:44 2016 UTC (7 years, 8 months ago) by phessler
Branch: MAIN
Changes since 1.25: +11 -11 lines
Diff to previous 1.25 (colored)

print local and remote discr as decimal, easier to compare with remote systems

while here, play with whitespace for pool_init.

Revision 1.25 / (download) - annotate - [select for diffs], Thu Sep 15 07:47:00 2016 UTC (7 years, 8 months ago) by phessler
Branch: MAIN
Changes since 1.24: +4 -7 lines
Diff to previous 1.24 (colored)

chase dlg@'s change of merging pool_setipl into pool_init

Revision 1.24 / (download) - annotate - [select for diffs], Tue Sep 13 07:56:05 2016 UTC (7 years, 8 months ago) by phessler
Branch: MAIN
Changes since 1.23: +1 -6 lines
Diff to previous 1.23 (colored)

we no longer reach around and call DDB specific functions, so always
define bfd_debug() especially since we use it in a lot of places right now

Revision 1.23 / (download) - annotate - [select for diffs], Mon Sep 12 15:24:51 2016 UTC (7 years, 9 months ago) by phessler
Branch: MAIN
Changes since 1.22: +50 -20 lines
Diff to previous 1.22 (colored)

Add data about how long the session has been in the current state, and
the previous state.

Shuffle some headers so they can be used outside of our own engine.

While here, correct the spelling of the two modes for BFD.

Revision 1.22 / (download) - annotate - [select for diffs], Sat Sep 10 05:39:38 2016 UTC (7 years, 9 months ago) by jsg
Branch: MAIN
Changes since 1.21: +2 -2 lines
Diff to previous 1.21 (colored)

Remove a semicolon after an if statement that resulted in
bfd_senddown() always returning before the rest of the function
could run.  Found with clang.

ok claudio@

Revision 1.21 / (download) - annotate - [select for diffs], Wed Sep 7 09:23:07 2016 UTC (7 years, 9 months ago) by mpi
Branch: MAIN
Changes since 1.20: +3 -13 lines
Diff to previous 1.20 (colored)

Do not check for NULL after calling an allocator with WAITOK.

All allocations are done during ioctl() so it is safe to sleep.

ok claudio@, phessler@

Revision 1.20 / (download) - annotate - [select for diffs], Wed Sep 7 09:21:33 2016 UTC (7 years, 9 months ago) by mpi
Branch: MAIN
Changes since 1.19: +34 -34 lines
Diff to previous 1.19 (colored)

Use C99 types.

ok claudio@, phessler@

Revision 1.19 / (download) - annotate - [select for diffs], Sun Sep 4 17:12:00 2016 UTC (7 years, 9 months ago) by claudio
Branch: MAIN
Changes since 1.18: +46 -59 lines
Diff to previous 1.18 (colored)

Refactor the code an fix a few issues by doing so.
- Use rt_key() instead of rt_gwroute / rt_gateway since bfd runs on host routes
- Fixup the timeout / task interaction a bit (still broken but better)
- fix panics in bfd_rtfree when calling soclose().
  It is required to clear the upcall before calling soclose() because sorflush()
  would be calling the upcall again which then results in a reenter panic.
- Simplify the mbuf dance a bit in bfd_send_control()
With and OK phessler@

Revision 1.18 / (download) - annotate - [select for diffs], Sun Sep 4 13:24:27 2016 UTC (7 years, 9 months ago) by claudio
Branch: MAIN
Changes since 1.17: +7 -7 lines
Diff to previous 1.17 (colored)

Only allow bfd on host routes and non-gateway routes for now.
Also just use bfd_lookup() instead of handrolling the same lookup.

Revision 1.17 / (download) - annotate - [select for diffs], Sun Sep 4 11:34:56 2016 UTC (7 years, 9 months ago) by claudio
Branch: MAIN
Changes since 1.16: +7 -4 lines
Diff to previous 1.16 (colored)

Grab a reference to the route and free it once no longer needed.
Also free all sockets in bfd_rtfree(). Agreement with phessler@

Revision 1.16 / (download) - annotate - [select for diffs], Sun Sep 4 09:39:01 2016 UTC (7 years, 9 months ago) by claudio
Branch: MAIN
Changes since 1.15: +20 -17 lines
Diff to previous 1.15 (colored)

Make it possible to toggle RTF_BFD via RTM_CHANGE and fix some minor things
in bfd.c. Make bfd_rtfree() a void function.
OK phessler@

Revision 1.15 / (download) - annotate - [select for diffs], Sat Sep 3 22:51:15 2016 UTC (7 years, 9 months ago) by phessler
Branch: MAIN
Changes since 1.14: +14 -6 lines
Diff to previous 1.14 (colored)

handle the remaining bits of the packet we are sent

Revision 1.14 / (download) - annotate - [select for diffs], Sat Sep 3 22:24:43 2016 UTC (7 years, 9 months ago) by phessler
Branch: MAIN
Changes since 1.13: +2 -2 lines
Diff to previous 1.13 (colored)

only clear the error counter if we are successful, not if we get
partially through processing

Revision 1.13 / (download) - annotate - [select for diffs], Sat Sep 3 21:01:42 2016 UTC (7 years, 9 months ago) by phessler
Branch: MAIN
Changes since 1.12: +11 -7 lines
Diff to previous 1.12 (colored)

handle timer limitations

Revision 1.12 / (download) - annotate - [select for diffs], Sat Sep 3 20:35:07 2016 UTC (7 years, 9 months ago) by phessler
Branch: MAIN
Changes since 1.11: +2 -2 lines
Diff to previous 1.11 (colored)

we really should ntohl fields coming in from the network

Revision 1.11 / (download) - annotate - [select for diffs], Sat Sep 3 20:02:49 2016 UTC (7 years, 9 months ago) by phessler
Branch: MAIN
Changes since 1.10: +6 -4 lines
Diff to previous 1.10 (colored)

jsg@ also found some uninitialized variables, thank you!

Revision 1.10 / (download) - annotate - [select for diffs], Sat Sep 3 19:55:42 2016 UTC (7 years, 9 months ago) by phessler
Branch: MAIN
Changes since 1.9: +7 -5 lines
Diff to previous 1.9 (colored)

in order to avoid problems with precise timing, obey rfc 5880 section 6.8.7,
and jitter the sender by 70%-90% of the requested tx time

Revision 1.9 / (download) - annotate - [select for diffs], Sat Sep 3 19:17:49 2016 UTC (7 years, 9 months ago) by phessler
Branch: MAIN
Changes since 1.8: +18 -1 lines
Diff to previous 1.8 (colored)

if_get requires the corresponding if_put call.
while here, check that if_get was successful

noticed by jsg@

Revision 1.8 / (download) - annotate - [select for diffs], Sat Sep 3 16:56:13 2016 UTC (7 years, 9 months ago) by phessler
Branch: MAIN
Changes since 1.7: +2 -4 lines
Diff to previous 1.7 (colored)

remove testing printf that snuck in accidentally.

while here, bump an error counter if we cannot receive a packet

Revision 1.7 / (download) - annotate - [select for diffs], Sat Sep 3 16:47:26 2016 UTC (7 years, 9 months ago) by phessler
Branch: MAIN
Changes since 1.6: +2 -3 lines
Diff to previous 1.6 (colored)

instead of doing everything manually, use goto cleanup idiom

Revision 1.6 / (download) - annotate - [select for diffs], Sat Sep 3 16:45:27 2016 UTC (7 years, 9 months ago) by phessler
Branch: MAIN
Changes since 1.5: +23 -11 lines
Diff to previous 1.5 (colored)

check the TTL field for incoming packets, we only support directly
connected neighbors

Revision 1.5 / (download) - annotate - [select for diffs], Sat Sep 3 15:49:00 2016 UTC (7 years, 9 months ago) by phessler
Branch: MAIN
Changes since 1.4: +3 -42 lines
Diff to previous 1.4 (colored)

remove a bunch of printf-debugging output and commented lines

Revision 1.4 / (download) - annotate - [select for diffs], Sat Sep 3 15:07:22 2016 UTC (7 years, 9 months ago) by phessler
Branch: MAIN
Changes since 1.3: +2 -14 lines
Diff to previous 1.3 (colored)

remove spl-dance.  the functions we are protecting already do that.

reminded by and OK claudio@

Revision 1.3 / (download) - annotate - [select for diffs], Sat Sep 3 15:06:11 2016 UTC (7 years, 9 months ago) by phessler
Branch: MAIN
Changes since 1.2: +2 -2 lines
Diff to previous 1.2 (colored)

use the correct size for the pool we are init'ing

pointed out by and OK claudio@

Revision 1.2 / (download) - annotate - [select for diffs], Sat Sep 3 15:05:25 2016 UTC (7 years, 9 months ago) by phessler
Branch: MAIN
Changes since 1.1: +2 -3 lines
Diff to previous 1.1 (colored)

Remove comments about taskq flags we want to eventually run with.
that'll take quite some time to get to.

pointed out by and OK claudio@

Revision 1.1 / (download) - annotate - [select for diffs], Sat Sep 3 14:14:20 2016 UTC (7 years, 9 months ago) by phessler
Branch: MAIN

add support for Bidirectional Forwarding Detection (RFC 5880/5881).
This is only the engine, the glue will come soon.

We can negotiate a BFD session against a Juniper MX, and against
ourselves.

Requires a lot of cleanup, but we can do that in the tree.

discussed with the network hackers
OK claudio@, henning@

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.