OpenBSD CVS

CVS log for src/usr.sbin/ospfd/ospfe.h


[BACK] Up to [local] / src / usr.sbin / ospfd

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.49 / (download) - annotate - [select for diffs], Sat May 18 11:17:30 2024 UTC (2 weeks ago) by jsg
Branch: MAIN
CVS Tags: HEAD
Changes since 1.48: +1 -4 lines
Diff to previous 1.48 (colored)

remove prototypes with no matching function; ok claudio@

Revision 1.48 / (download) - annotate - [select for diffs], Tue Jan 19 09:33:38 2021 UTC (3 years, 4 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_7_5_BASE, OPENBSD_7_5, OPENBSD_7_4_BASE, OPENBSD_7_4, 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, OPENBSD_6_9_BASE, OPENBSD_6_9
Changes since 1.47: +3 -3 lines
Diff to previous 1.47 (colored)

Internalize a few more things into the control code. Both control_state
and ctl_conns are not really needed outside of control.c

Revision 1.47 / (download) - annotate - [select for diffs], Tue Jan 19 09:29:49 2021 UTC (3 years, 4 months ago) by claudio
Branch: MAIN
Changes since 1.46: +1 -3 lines
Diff to previous 1.46 (colored)

Use a static pkt_ptr buffer instead of allocating it dynamically.
Removes another -fno-common issue from the build.

Revision 1.46 / (download) - annotate - [select for diffs], Sat Oct 25 03:23:49 2014 UTC (9 years, 7 months ago) by lteo
Branch: MAIN
CVS Tags: OPENBSD_6_8_BASE, OPENBSD_6_8, OPENBSD_6_7_BASE, OPENBSD_6_7, OPENBSD_6_6_BASE, OPENBSD_6_6, OPENBSD_6_5_BASE, OPENBSD_6_5, OPENBSD_6_4_BASE, OPENBSD_6_4, OPENBSD_6_3_BASE, OPENBSD_6_3, OPENBSD_6_2_BASE, OPENBSD_6_2, OPENBSD_6_1_BASE, OPENBSD_6_1, OPENBSD_6_0_BASE, OPENBSD_6_0, OPENBSD_5_9_BASE, OPENBSD_5_9, OPENBSD_5_8_BASE, OPENBSD_5_8, OPENBSD_5_7_BASE, OPENBSD_5_7
Changes since 1.45: +1 -2 lines
Diff to previous 1.45 (colored)

Remove unnecessary netinet/in_systm.h include.

ok millert@

Revision 1.45 / (download) - annotate - [select for diffs], Thu Jan 17 10:07:56 2013 UTC (11 years, 4 months ago) by markus
Branch: MAIN
CVS Tags: OPENBSD_5_6_BASE, OPENBSD_5_6, OPENBSD_5_5_BASE, OPENBSD_5_5, OPENBSD_5_4_BASE, OPENBSD_5_4, OPENBSD_5_3_BASE, OPENBSD_5_3
Changes since 1.44: +2 -1 lines
Diff to previous 1.44 (colored)

improve snapshot handling:
- don't start a new snapshot if we are already in NBR_STA_SNAP
- ignore IMSG_DB_SNAPSHOT and IMSG_DB_END unless we are in NBR_STA_SNAP
- add new IMSG_LS_SNAP message so we can distinguish it from
  IMSG_LS_UPD. this way we can ignore them if we are not in NBR_STA_SNAP
ok claudio@

Revision 1.44 / (download) - annotate - [select for diffs], Mon May 9 12:24:41 2011 UTC (13 years ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_5_2_BASE, OPENBSD_5_2, OPENBSD_5_1_BASE, OPENBSD_5_1, OPENBSD_5_0_BASE, OPENBSD_5_0
Changes since 1.43: +2 -1 lines
Diff to previous 1.43 (colored)

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@

Revision 1.43 / (download) - annotate - [select for diffs], Fri Mar 25 08:52:21 2011 UTC (13 years, 2 months ago) by claudio
Branch: MAIN
Changes since 1.42: +2 -2 lines
Diff to previous 1.42 (colored)

Rewrite the lsack generation. Make it more like the lsupdate code.
Removes some of the rather strange packet handling.
Tested by a few especially sthen@

Revision 1.42 / (download) - annotate - [select for diffs], Wed May 26 13:56:08 2010 UTC (14 years ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_4_9_BASE, OPENBSD_4_9, OPENBSD_4_8_BASE, OPENBSD_4_8
Changes since 1.41: +4 -4 lines
Diff to previous 1.41 (colored)

Rename some imsg bits to make namespace collisions less likely buf to
ibuf, buf_read to ibuf_read, READ_BUF_SIZE to IBUF_READ_SIZE.

ok henning gilles claudio jacekm deraadt

Revision 1.41 / (download) - annotate - [select for diffs], Sun Aug 9 23:04:16 2009 UTC (14 years, 9 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_4_7_BASE, OPENBSD_4_7
Changes since 1.40: +2 -2 lines
Diff to previous 1.40 (colored)

Scale both receive and send buffer on the raw socket. The default 8192
bytes is not enough for larger networks causing send errors because of
too big packets. OK henning

Revision 1.40 / (download) - annotate - [select for diffs], Sat Jun 6 07:31:26 2009 UTC (14 years, 11 months ago) by eric
Branch: MAIN
CVS Tags: OPENBSD_4_6_BASE, OPENBSD_4_6
Changes since 1.39: +2 -2 lines
Diff to previous 1.39 (colored)

sync ospfctl/ospfd with the common imsg code, making it lib ready as well.

"looks ok" claudio@

Revision 1.39 / (download) - annotate - [select for diffs], Sat Jan 31 08:55:00 2009 UTC (15 years, 4 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_4_5_BASE, OPENBSD_4_5
Changes since 1.38: +2 -2 lines
Diff to previous 1.38 (colored)

Pass the buffer to send_packet() instead of spliting it up. This removes
some direct access to struct buf internals in the rest of ospfe.
Based on a larger buffer cleanup diff that was OK norby@ henning@

Revision 1.38 / (download) - annotate - [select for diffs], Sat Oct 13 13:21:24 2007 UTC (16 years, 7 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_4_4_BASE, OPENBSD_4_4, OPENBSD_4_3_BASE, OPENBSD_4_3
Changes since 1.37: +2 -2 lines
Diff to previous 1.37 (colored)

Funny typo, it is fib not fip so adjust function name.

Revision 1.37 / (download) - annotate - [select for diffs], Thu Oct 11 08:21:29 2007 UTC (16 years, 7 months ago) by claudio
Branch: MAIN
Changes since 1.36: +3 -2 lines
Diff to previous 1.36 (colored)

Do not overload nbr->options with the dd exchange bits. nbr->options is used
by the hello protocol. Instead add a dd_more flag that is used together with
(the renamed) dd_master flag.
Tested and OK norby@

Revision 1.36 / (download) - annotate - [select for diffs], Tue May 29 22:08:25 2007 UTC (17 years ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_4_2_BASE, OPENBSD_4_2
Changes since 1.35: +3 -1 lines
Diff to previous 1.35 (colored)

Demote support for ospfd. It is possible to specify a demote group on
interfaces and areas. With this carp setups using ospfd are more reliable
because we can fail over if the OSPF connectivity is (partially) lost.
OK norby@

Revision 1.35 / (download) - annotate - [select for diffs], Wed Mar 21 10:54:30 2007 UTC (17 years, 2 months ago) by claudio
Branch: MAIN
Changes since 1.34: +2 -1 lines
Diff to previous 1.34 (colored)

Add support for RFC 3137: OSPF Stub Router Advertisement
This allows ospfd to announce networks without the need to transit traffic.
stub router is enabled if the fib is not coupled, net.inet.ip.forwarding is
not 1 or if the stub router global config option is set to yes.
OK norby@

Revision 1.34 / (download) - annotate - [select for diffs], Thu Feb 1 12:41:03 2007 UTC (17 years, 4 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_4_1_BASE, OPENBSD_4_1
Changes since 1.33: +2 -1 lines
Diff to previous 1.33 (colored)

Implement md_list_send() function to send auth crypt keys to the OSPF engine.
Needed for reload support. OK norby@ pyr@

Revision 1.33 / (download) - annotate - [select for diffs], Fri Nov 17 08:55:31 2006 UTC (17 years, 6 months ago) by claudio
Branch: MAIN
Changes since 1.32: +3 -4 lines
Diff to previous 1.32 (colored)

Support for multiple networks on one interface. Until now only the main
address of a interface could be used. Now it is possible to specify a
interface more than once if multiple networks are configured. An alternative
network can be specified via e.g. interface em0:10.0.5.1. The old interface
syntax without the IP still works and uses the main/first configured IP
address.
ospfd now needs to include the IP header on outgoing messages as it is not
possible to specifiy the source address in sendto(2). Additionally all
multicast joins and leaves have to be tracked.
OK norby@

Revision 1.32 / (download) - annotate - [select for diffs], Wed Sep 27 14:37:38 2006 UTC (17 years, 8 months ago) by claudio
Branch: MAIN
Changes since 1.31: +2 -1 lines
Diff to previous 1.31 (colored)

Use IP_RECVIF to get the incomming interface of OSPF packets. Now we use
the source address and the interface index to find the corresponding
struct interface which is less error prone. OK norby@

Revision 1.31 / (download) - annotate - [select for diffs], Fri Jun 2 18:49:55 2006 UTC (18 years ago) by norby
Branch: MAIN
CVS Tags: OPENBSD_4_0_BASE, OPENBSD_4_0
Changes since 1.30: +2 -2 lines
Diff to previous 1.30 (colored)

remove unused variable, found by lint.

Revision 1.30 / (download) - annotate - [select for diffs], Tue Apr 25 08:33:00 2006 UTC (18 years, 1 month ago) by claudio
Branch: MAIN
Changes since 1.29: +2 -2 lines
Diff to previous 1.29 (colored)

Use size_t for buffer lenght passed to send_ls_ack() plus an ARGSUSED.

Revision 1.29 / (download) - annotate - [select for diffs], Tue Apr 25 08:24:45 2006 UTC (18 years, 1 month ago) by claudio
Branch: MAIN
Changes since 1.28: +1 -2 lines
Diff to previous 1.28 (colored)

Kill unused function and add a ARGSUSED.

Revision 1.28 / (download) - annotate - [select for diffs], Mon Apr 24 20:18:03 2006 UTC (18 years, 1 month ago) by claudio
Branch: MAIN
Changes since 1.27: +4 -5 lines
Diff to previous 1.27 (colored)

Fix parser to match current behaviour and make auth-type et al. part of the
global and per area defaults. With this it is now possible to define one
set of auth-md keys and use them in every defined interface. OK norby@

Revision 1.27 / (download) - annotate - [select for diffs], Mon Mar 13 09:36:06 2006 UTC (18 years, 2 months ago) by claudio
Branch: MAIN
Changes since 1.26: +11 -11 lines
Diff to previous 1.26 (colored)

The return value of the start/stop timer functions is almost never checked.
Switch them to void functions and check if evtimer_add/del fails -- in which
case we fatal() as there is no useful way to recover in such an event.
OK norby@

Revision 1.26 / (download) - annotate - [select for diffs], Thu Mar 9 15:43:21 2006 UTC (18 years, 2 months ago) by claudio
Branch: MAIN
Changes since 1.25: +1 -63 lines
Diff to previous 1.25 (colored)

Move *_name functions to log.c and use these for both ospfd and ospfctl.
Stuff that is only used in ospfd debug messages is simplified.
OK norby@

Revision 1.25 / (download) - annotate - [select for diffs], Thu Mar 9 13:31:57 2006 UTC (18 years, 2 months ago) by claudio
Branch: MAIN
Changes since 1.24: +2 -2 lines
Diff to previous 1.24 (colored)

Switch send_packet from char * to void * and from int to size_t. The function
is now similar to sendto et al.

Revision 1.24 / (download) - annotate - [select for diffs], Sun Feb 19 21:48:56 2006 UTC (18 years, 3 months ago) by norby
Branch: MAIN
CVS Tags: OPENBSD_3_9_BASE, OPENBSD_3_9
Changes since 1.23: +2 -1 lines
Diff to previous 1.23 (colored)

Keep track of the duration of our relationships with neighbors.
Displayed in "ospfctl show neighbor".

ok claudio@

Revision 1.23 / (download) - annotate - [select for diffs], Sun Feb 19 18:55:47 2006 UTC (18 years, 3 months ago) by norby
Branch: MAIN
Changes since 1.22: +2 -1 lines
Diff to previous 1.22 (colored)

Do not traverse the entire LS retransmission list to figure out how many
are present on it.

ok claudio@

Revision 1.22 / (download) - annotate - [select for diffs], Sun Feb 19 18:52:06 2006 UTC (18 years, 3 months ago) by norby
Branch: MAIN
Changes since 1.21: +3 -1 lines
Diff to previous 1.21 (colored)

Do not allocate a new chunk of memory every time we receive a packet.
This should have been fixed ages ago since it really improves the
performance of ospfd.

ok claudio@

Revision 1.21 / (download) - annotate - [select for diffs], Thu Feb 2 15:11:54 2006 UTC (18 years, 4 months ago) by norby
Branch: MAIN
Changes since 1.20: +1 -2 lines
Diff to previous 1.20 (colored)

zap md_list_empty, found by lint.

ok claudio@

Revision 1.20 / (download) - annotate - [select for diffs], Thu Dec 29 13:53:36 2005 UTC (18 years, 5 months ago) by claudio
Branch: MAIN
Changes since 1.19: +5 -3 lines
Diff to previous 1.19 (colored)

Instead of a simple timer per neighbor for the LS retransmition list use
a timewheel. All LSA updates are now first added to the queue and sent out
later. This makes it possible to cluster multiple LSA updates into on OSPF
packet. This gives a massive speedup when large databases need to be synced.
Tested and OK norby@

Revision 1.19 / (download) - annotate - [select for diffs], Thu Dec 15 20:29:06 2005 UTC (18 years, 5 months ago) by claudio
Branch: MAIN
Changes since 1.18: +3 -3 lines
Diff to previous 1.18 (colored)

Simpify iface_del() and nbr_del(). make them void funtions as they can not fail
and do not remove a element twice in iface_del(). OK norby@

Revision 1.18 / (download) - annotate - [select for diffs], Sun Dec 4 20:49:47 2005 UTC (18 years, 6 months ago) by norby
Branch: MAIN
Changes since 1.17: +2 -1 lines
Diff to previous 1.17 (colored)

Increase the receive buffer of the raw socket.

Prevents some of the retransmitting during bulk ls update transfers.

ok claudio@

Revision 1.17 / (download) - annotate - [select for diffs], Fri Nov 4 10:19:16 2005 UTC (18 years, 7 months ago) by claudio
Branch: MAIN
Changes since 1.16: +1 -2 lines
Diff to previous 1.16 (colored)

Remove unused variable link_state in struct nbr.

Revision 1.16 / (download) - annotate - [select for diffs], Tue Oct 18 15:40:36 2005 UTC (18 years, 7 months ago) by claudio
Branch: MAIN
Changes since 1.15: +1 -2 lines
Diff to previous 1.15 (colored)

Cleanup interface code a minimal bit. There is no need for if_shutdown(),
especially it got called in the wrong place.  OK norby@

Revision 1.15 / (download) - annotate - [select for diffs], Thu May 26 20:42:10 2005 UTC (19 years ago) by norby
Branch: MAIN
CVS Tags: OPENBSD_3_8_BASE, OPENBSD_3_8
Changes since 1.14: +1 -4 lines
Diff to previous 1.14 (colored)

Remove unused neighbor state.

ok claudio@

Revision 1.14 / (download) - annotate - [select for diffs], Mon Apr 25 11:31:50 2005 UTC (19 years, 1 month ago) by claudio
Branch: MAIN
Changes since 1.13: +2 -2 lines
Diff to previous 1.13 (colored)

Call if_init() later and for each interface separately.
Move code from if_act_start() to if_init() that needs to be called only
once per interface. Especially event_set should be called only once as it
initializes struct event and so may cause corruption of the event queue if
called twice.

Revision 1.13 / (download) - annotate - [select for diffs], Mon Apr 25 09:55:18 2005 UTC (19 years, 1 month ago) by claudio
Branch: MAIN
Changes since 1.12: +4 -1 lines
Diff to previous 1.12 (colored)

Move the creation of the ospf_socket from if_init() directly into ospfe().
This makes it possible to call if_init() at a much later time.

Revision 1.12 / (download) - annotate - [select for diffs], Tue Apr 12 09:54:59 2005 UTC (19 years, 1 month ago) by claudio
Branch: MAIN
Changes since 1.11: +1 -2 lines
Diff to previous 1.11 (colored)

Support for self originated AS-external LSA.
With "redistribute (static|connected|default|none)" it is possible to
tell ospfd which external routes should be announced.
Connected routes will be announced only if there is no corresponding
interface configured, in that case the prefix is not external.
Adding and removing of announced prefixes are done automaticaly.
OK norby@

Revision 1.11 / (download) - annotate - [select for diffs], Tue Apr 5 13:01:22 2005 UTC (19 years, 2 months ago) by claudio
Branch: MAIN
Changes since 1.10: +3 -3 lines
Diff to previous 1.10 (colored)

Use the dynamic buffer API for packet generation and sending.
OK norby@

Revision 1.10 / (download) - annotate - [select for diffs], Thu Mar 31 19:32:10 2005 UTC (19 years, 2 months ago) by norby
Branch: MAIN
Changes since 1.9: +10 -3 lines
Diff to previous 1.9 (colored)

Add support for crypt authentication (MD5).

ok and input claudio@

Revision 1.9 / (download) - annotate - [select for diffs], Tue Mar 22 22:13:48 2005 UTC (19 years, 2 months ago) by norby
Branch: MAIN
Changes since 1.8: +5 -6 lines
Diff to previous 1.8 (colored)

Remove bool cruft.

ok claudio@

Revision 1.8 / (download) - annotate - [select for diffs], Thu Mar 17 21:17:12 2005 UTC (19 years, 2 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_3_7_BASE, OPENBSD_3_7
Changes since 1.7: +5 -2 lines
Diff to previous 1.7 (colored)

Handle the retransmission queues correctly. Mainly iface state DROTHER
needs to be handled specially because the backup DR does not send acks and
so his retransmission queue fills up and does not get cleared.
Also implement the retransmission timeout correctly.

OK henning@ norby@ deraadt@

Revision 1.7 / (download) - annotate - [select for diffs], Mon Mar 7 10:28:14 2005 UTC (19 years, 3 months ago) by claudio
Branch: MAIN
Changes since 1.6: +3 -2 lines
Diff to previous 1.6 (colored)

Track interface state (up/down) and media status. Simplify the code a bit
by using the kif/kroute info while allocating interfaces.

Revision 1.6 / (download) - annotate - [select for diffs], Thu Feb 10 14:05:48 2005 UTC (19 years, 3 months ago) by claudio
Branch: MAIN
Changes since 1.5: +2 -2 lines
Diff to previous 1.5 (colored)

Work around a timing issue in the db exchange phase. The DB description
packets comming from the net are looped through the RDE and may get
delayed because of this. The result is that the neighbor FSM ends in
state FULL instead of LOADING and so the LSDB is not correctly
synchronized. Issue found by norby@ OK norby@

Revision 1.5 / (download) - annotate - [select for diffs], Wed Feb 9 20:47:04 2005 UTC (19 years, 3 months ago) by claudio
Branch: MAIN
Changes since 1.4: +2 -2 lines
Diff to previous 1.4 (colored)

NBR_STA_ACTIVE is just ~NBR_STA_DOWN instead of some hardcoded magic.

Revision 1.4 / (download) - annotate - [select for diffs], Wed Feb 9 20:40:23 2005 UTC (19 years, 3 months ago) by claudio
Branch: MAIN
Changes since 1.3: +3 -1 lines
Diff to previous 1.3 (colored)

Rework of self originated LSA. First of all the code to generate the LSA
is rewritten to use the dynamic buffer api introduced lately.
Add missing parts in the RDE to merge these LSA originated from the OE into
the LSDB with correct seq_num, etc.
Add hooks to the neighbor and interface fsm so that the LSA get updated if
needed. This is not perfect, still many things are missing. OK norby@

Revision 1.3 / (download) - annotate - [select for diffs], Wed Feb 2 19:15:07 2005 UTC (19 years, 4 months ago) by henning
Branch: MAIN
Changes since 1.2: +2 -2 lines
Diff to previous 1.2 (colored)

KNF

Revision 1.2 / (download) - annotate - [select for diffs], Fri Jan 28 17:53:33 2005 UTC (19 years, 4 months ago) by norby
Branch: MAIN
Changes since 1.1: +2 -2 lines
Diff to previous 1.1 (colored)

Change my email address to the OpenBSD one since Ericsson has nothing to
do with this software, just happend to be my only valid email address at
the time.

Revision 1.1 / (download) - annotate - [select for diffs], Fri Jan 28 14:05:40 2005 UTC (19 years, 4 months ago) by claudio
Branch: MAIN

Welcome ospfd
started by Esben Norby some time ago by using the imsg/three process framework
of bgpd. He implemented the basic concept plus the ospf finite state machines.
Later I joined and helped him cleanup, debug and extend his work.
Right now it is not particularly useful, major parts are still missing but is
imported to allow more people to work on it.
status:
The basic protocol works for broadcast networks and the LS database is
synchronized and updated. It is not possible to be DR or BDR on a network
and other interface types like point-to-point are not yet supported.
The shortest path tree is not calculated and so no routing information is
exchanged with the kernel FIB.

Not yet connected to the builds.
OK 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.