OpenBSD CVS

CVS log for src/usr.sbin/ospfd/packet.c


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

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.37 / (download) - annotate - [select for diffs], Mon Jul 3 09:40:47 2023 UTC (11 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_7_5_BASE, OPENBSD_7_5, OPENBSD_7_4_BASE, OPENBSD_7_4, HEAD
Changes since 1.36: +2 -2 lines
Diff to previous 1.36 (colored)

Use ibuf_data() instead of directly accessing ibuf->buf.
OK tb@

Revision 1.36 / (download) - annotate - [select for diffs], Wed Nov 3 21:40:03 2021 UTC (2 years, 7 months ago) by sthen
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
Changes since 1.35: +8 -3 lines
Diff to previous 1.35 (colored)

log the interface along with the neighbour ID in various ospfd/ospf6d
messages.  ok remi@ benno@

if a neighbour is reachable over multiple network links, some problems
may be related to the link itself rather than the neighbour, so knowing
the interface can be important when trying to locate the source of a
problem.

Revision 1.35 / (download) - annotate - [select for diffs], Tue Jan 19 16:01:39 2021 UTC (3 years, 4 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_7_0_BASE, OPENBSD_7_0, OPENBSD_6_9_BASE, OPENBSD_6_9
Changes since 1.34: +8 -3 lines
Diff to previous 1.34 (colored)

Allocate the recv buffer with malloc() on first call. This code assumes
some alignment of the buffer which may not be the case with bss memory.

Revision 1.34 / (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.33: +2 -1 lines
Diff to previous 1.33 (colored)

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

Revision 1.33 / (download) - annotate - [select for diffs], Mon Aug 12 20:32:39 2019 UTC (4 years, 9 months ago) by remi
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
Changes since 1.32: +11 -7 lines
Diff to previous 1.32 (colored)

On broadcast and point-to-point interfaces only accept hello packets when
the destination is 224.0.0.5 (AllSPFRouters).

RFC 2328 sys in "9.5. Sending Hello packets" that hello packets are
sent to the multicast address AllSPFRouters on broadcast and physical
point-to-point networks.

With this new check the test for AllDRouters is not needed anymore.

ok benno@

Revision 1.32 / (download) - annotate - [select for diffs], Mon Jul 15 18:26:39 2019 UTC (4 years, 10 months ago) by remi
Branch: MAIN
Changes since 1.31: +3 -3 lines
Diff to previous 1.31 (colored)

Improve logging when sending a packet fails.

OK claudio@

Revision 1.31 / (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_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.30: +1 -2 lines
Diff to previous 1.30 (colored)

Remove unnecessary netinet/in_systm.h include.

ok millert@

Revision 1.30 / (download) - annotate - [select for diffs], Wed May 26 13:56:08 2010 UTC (14 years ago) by nicm
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, OPENBSD_5_2_BASE, OPENBSD_5_2, OPENBSD_5_1_BASE, OPENBSD_5_1, OPENBSD_5_0_BASE, OPENBSD_5_0, OPENBSD_4_9_BASE, OPENBSD_4_9, OPENBSD_4_8_BASE, OPENBSD_4_8
Changes since 1.29: +6 -6 lines
Diff to previous 1.29 (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.29 / (download) - annotate - [select for diffs], Tue Feb 16 18:04:39 2010 UTC (14 years, 3 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_4_7_BASE, OPENBSD_4_7
Changes since 1.28: +2 -5 lines
Diff to previous 1.28 (colored)

Don't log the same thing twice. From a much bigger diff.
OK dlg@, sthen@

Revision 1.28 / (download) - annotate - [select for diffs], Fri Jun 5 00:53:33 2009 UTC (15 years ago) by pyr
Branch: MAIN
CVS Tags: OPENBSD_4_6_BASE, OPENBSD_4_6
Changes since 1.27: +3 -3 lines
Diff to previous 1.27 (colored)

don't mess with buffer internals,
ok claudio@

Revision 1.27 / (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.26: +5 -5 lines
Diff to previous 1.26 (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.26 / (download) - annotate - [select for diffs], Fri Sep 12 09:54:47 2008 UTC (15 years, 8 months ago) by claudio
Branch: MAIN
Changes since 1.25: +1 -2 lines
Diff to previous 1.25 (colored)

Don't be to strict in find_iface() about what we accept on point-to-point
links. If a packet arrived on a point-to-point interface we should accept it
even if the source address of the packet is different to our iface destination
address. OK norby@

Revision 1.25 / (download) - annotate - [select for diffs], Mon Mar 24 16:11:04 2008 UTC (16 years, 2 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_4_4_BASE, OPENBSD_4_4
Changes since 1.24: +2 -2 lines
Diff to previous 1.24 (colored)

msg_controllen has to be CMSG_SPACE so that the kernel can account for
each cmsg_len (ie. msg_controllen = sum of CMSG_ALIGN(cmsg_len).  This
works now that kernel fd passing has been fixed to accept a bit of
sloppiness because of this ABI repair.
lots of discussion with kettenis

Revision 1.24 / (download) - annotate - [select for diffs], Sat Mar 15 16:25:00 2008 UTC (16 years, 2 months ago) by deraadt
Branch: MAIN
Changes since 1.23: +2 -2 lines
Diff to previous 1.23 (colored)

Repair more msg_controllen dealing with structures or arrays of
descriptors; ok hshoexer, also looked at by kettenis and henning

Revision 1.23 / (download) - annotate - [select for diffs], Thu Mar 13 01:49:53 2008 UTC (16 years, 3 months ago) by deraadt
Branch: MAIN
Changes since 1.22: +7 -4 lines
Diff to previous 1.22 (colored)

Correct CMSG_SPACE and CMSG_LEN usage everywhere in the tree. Due to
an extensive discussion with otto, kettenis, millert, and hshoexer

Revision 1.22 / (download) - annotate - [select for diffs], Fri Nov 17 08:55:31 2006 UTC (17 years, 6 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_4_3_BASE, OPENBSD_4_3, OPENBSD_4_2_BASE, OPENBSD_4_2, OPENBSD_4_1_BASE, OPENBSD_4_1
Changes since 1.21: +33 -6 lines
Diff to previous 1.21 (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.21 / (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.20: +54 -28 lines
Diff to previous 1.20 (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.20 / (download) - annotate - [select for diffs], Thu Mar 9 13:31:57 2006 UTC (18 years, 3 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_4_0_BASE, OPENBSD_4_0
Changes since 1.19: +2 -2 lines
Diff to previous 1.19 (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.19 / (download) - annotate - [select for diffs], Sun Feb 19 18:52:06 2006 UTC (18 years, 3 months ago) by norby
Branch: MAIN
CVS Tags: OPENBSD_3_9_BASE, OPENBSD_3_9
Changes since 1.18: +13 -20 lines
Diff to previous 1.18 (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.18 / (download) - annotate - [select for diffs], Sat Nov 12 18:18:24 2005 UTC (18 years, 7 months ago) by deraadt
Branch: MAIN
Changes since 1.17: +1 -2 lines
Diff to previous 1.17 (colored)

spacing mostly

Revision 1.17 / (download) - annotate - [select for diffs], Wed Oct 26 01:28:41 2005 UTC (18 years, 7 months ago) by stevesk
Branch: MAIN
Changes since 1.16: +1 -4 lines
Diff to previous 1.16 (colored)

some unneeded #includes; ok claudio@

Revision 1.16 / (download) - annotate - [select for diffs], Wed Oct 19 22:00:37 2005 UTC (18 years, 7 months ago) by stevesk
Branch: MAIN
Changes since 1.15: +2 -2 lines
Diff to previous 1.15 (colored)

small cleanups while reading; ok claudio@

Revision 1.15 / (download) - annotate - [select for diffs], Wed Oct 19 13:07:58 2005 UTC (18 years, 7 months ago) by stevesk
Branch: MAIN
Changes since 1.14: +2 -2 lines
Diff to previous 1.14 (colored)

use string.h; ok claudio@

Revision 1.14 / (download) - annotate - [select for diffs], Tue Oct 18 09:32:16 2005 UTC (18 years, 7 months ago) by claudio
Branch: MAIN
Changes since 1.13: +3 -2 lines
Diff to previous 1.13 (colored)

Correct log_debug(). Found while scrolling through that file.

Revision 1.13 / (download) - annotate - [select for diffs], Wed Oct 12 09:09:36 2005 UTC (18 years, 8 months ago) by claudio
Branch: MAIN
Changes since 1.12: +3 -3 lines
Diff to previous 1.12 (colored)

Minor cleanup. Use iface->state & IF_STA_DRORBDR as used in other places
instead of iface->state != (IF_STA_DR | IF_STA_BACKUP).  OK norby@

Revision 1.12 / (download) - annotate - [select for diffs], Sat Sep 17 20:03:35 2005 UTC (18 years, 8 months ago) by msf
Branch: MAIN
Changes since 1.11: +2 -2 lines
Diff to previous 1.11 (colored)

- add get_rtr_id() based on bgpd's get_bgpid()
- remove rtr_id from struct iface we don't need to keep a copy of this value
  per interface
- replace all references to iface->rtr_id.s_addr with calls to ospfe_rtr_id()

ok claudio@ norby@

Revision 1.11 / (download) - annotate - [select for diffs], Thu Aug 11 16:28:07 2005 UTC (18 years, 10 months ago) by henning
Branch: MAIN
CVS Tags: OPENBSD_3_8_BASE, OPENBSD_3_8
Changes since 1.10: +2 -3 lines
Diff to previous 1.10 (colored)

EINTR, and a little KNF in packet.c

Revision 1.10 / (download) - annotate - [select for diffs], Fri May 27 07:24:51 2005 UTC (19 years ago) by norby
Branch: MAIN
Changes since 1.9: +27 -9 lines
Diff to previous 1.9 (colored)

Virtual link support.

ok claudio@

Revision 1.9 / (download) - annotate - [select for diffs], Thu May 26 19:54:49 2005 UTC (19 years ago) by norby
Branch: MAIN
Changes since 1.8: +1 -7 lines
Diff to previous 1.8 (colored)

Simplify and cleanup passive interface handling.

ok claudio@

Revision 1.8 / (download) - annotate - [select for diffs], Thu Apr 14 20:02:10 2005 UTC (19 years, 1 month ago) by cloder
Branch: MAIN
Changes since 1.7: +2 -2 lines
Diff to previous 1.7 (colored)

Some format string cleanup. OK deraadt

Revision 1.7 / (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.6: +12 -16 lines
Diff to previous 1.6 (colored)

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

Revision 1.6 / (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.5: +19 -14 lines
Diff to previous 1.5 (colored)

Add support for crypt authentication (MD5).

ok and input claudio@

Revision 1.5 / (download) - annotate - [select for diffs], Wed Feb 16 15:23:33 2005 UTC (19 years, 3 months ago) by norby
Branch: MAIN
CVS Tags: OPENBSD_3_7_BASE, OPENBSD_3_7
Changes since 1.4: +7 -1 lines
Diff to previous 1.4 (colored)

Support point to point links.

ok claudio@

Revision 1.4 / (download) - annotate - [select for diffs], Mon Feb 7 05:51:00 2005 UTC (19 years, 4 months ago) by david
Branch: MAIN
Changes since 1.3: +2 -2 lines
Diff to previous 1.3 (colored)

spelling fixes

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

Use log_warn() insteade of log_warnx() after sendto() and if_set_mcast()
errors as errno was set by the call.

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.