OpenBSD CVS

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


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

Request diff between arbitrary revisions


Default branch: MAIN


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

remove prototypes with no matching function; ok claudio@

Revision 1.22 / (download) - annotate - [select for diffs], Mon Jul 3 09:51:38 2023 UTC (11 months, 1 week ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_7_5_BASE, OPENBSD_7_5, OPENBSD_7_4_BASE, OPENBSD_7_4
Changes since 1.21: +2 -2 lines
Diff to previous 1.21 (colored)

Use ibuf_data() instead of direct access to ibuf->buf,
use ibuf_size() instead of direct access to ibuf->wpos,
use ibuf_left() in places where the code checks if there is enough
space left in the ibuf.
OK tb@

Revision 1.21 / (download) - annotate - [select for diffs], Wed Jun 21 07:45:47 2023 UTC (11 months, 2 weeks ago) by claudio
Branch: MAIN
Changes since 1.20: +9 -9 lines
Diff to previous 1.20 (colored)

Update ospf6d to use new ibuf api.

This mostly moves away from memcpy(ibuf_seek(buf, off, size), data, size) to
ibuf_set(buf, off, data, size). Also ibuf_reserve() is replaced with
ibuf_add_zero().

OK tb@

Revision 1.20 / (download) - annotate - [select for diffs], Tue Jan 19 16:02:06 2021 UTC (3 years, 4 months ago) by claudio
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, OPENBSD_6_9_BASE, OPENBSD_6_9
Changes since 1.19: +8 -3 lines
Diff to previous 1.19 (colored)

Like ospfd 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.19 / (download) - annotate - [select for diffs], Tue Jan 19 09:43:40 2021 UTC (3 years, 4 months ago) by claudio
Branch: MAIN
Changes since 1.18: +2 -1 lines
Diff to previous 1.18 (colored)

Like in ospfd use a static pkt_ptr buffer.

Revision 1.18 / (download) - annotate - [select for diffs], Tue Jan 12 09:54:44 2021 UTC (3 years, 4 months ago) by claudio
Branch: MAIN
Changes since 1.17: +11 -16 lines
Diff to previous 1.17 (colored)

In recv_packet() verify that non-multicast packets where sent to the right
IPv6 address. Compare against all possible interface addresses instead of
only against iface->addr which is set to the last link-local address and
so there is a high chance of failure when multiple link-local addresses
are present.

Also simplify send_packet(), there is no need to use sendmsg() just use
sendto().

OK benno@

Revision 1.17 / (download) - annotate - [select for diffs], Mon Dec 23 07:33:49 2019 UTC (4 years, 5 months ago) by denis
Branch: MAIN
CVS Tags: OPENBSD_6_8_BASE, OPENBSD_6_8, OPENBSD_6_7_BASE, OPENBSD_6_7
Changes since 1.16: +3 -3 lines
Diff to previous 1.16 (colored)

Area is now part of struct iface

OK remi@

Revision 1.16 / (download) - annotate - [select for diffs], Wed Dec 11 21:33:56 2019 UTC (4 years, 5 months ago) by denis
Branch: MAIN
Changes since 1.15: +14 -5 lines
Diff to previous 1.15 (colored)

Convert sendto() to sendmsg().

This makes code similar to ospfd(8).

OK claudio@ deraadt@

Revision 1.15 / (download) - annotate - [select for diffs], Fri May 10 01:29:31 2019 UTC (5 years, 1 month ago) by guenther
Branch: MAIN
CVS Tags: OPENBSD_6_6_BASE, OPENBSD_6_6
Changes since 1.14: +1 -2 lines
Diff to previous 1.14 (colored)

Delete superfluous #includes of <ifaddrs.h>, <net/if_dl.h>, and <net/if_enc.h>

ok krw@, jsg@

Revision 1.14 / (download) - annotate - [select for diffs], Tue May 5 01:26:37 2015 UTC (9 years, 1 month ago) by jsg
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
Changes since 1.13: +2 -2 lines
Diff to previous 1.13 (colored)

use the sizeof the struct not the sizeof a pointer to the struct
ok claudio@

Revision 1.13 / (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_5_7_BASE, OPENBSD_5_7
Changes since 1.12: +1 -2 lines
Diff to previous 1.12 (colored)

Remove unnecessary netinet/in_systm.h include.

ok millert@

Revision 1.12 / (download) - annotate - [select for diffs], Mon Mar 24 11:01:47 2014 UTC (10 years, 2 months ago) by mpi
Branch: MAIN
CVS Tags: OPENBSD_5_6_BASE, OPENBSD_5_6
Changes since 1.11: +2 -2 lines
Diff to previous 1.11 (colored)

Passing MSG_DONTROUTE to sendto() here has no effect since SO_DONTROUTE
is only implemented for IPv4.  Just remove it.

Tested by and ok florian@

Revision 1.11 / (download) - annotate - [select for diffs], Fri Dec 31 21:22:42 2010 UTC (13 years, 5 months ago) by guenther
Branch: MAIN
CVS Tags: 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
Changes since 1.10: +2 -1 lines
Diff to previous 1.10 (colored)

Add missing #includes instead of assuming that some system header pulls in
the needed bits

ok deraadt@, millert@

Revision 1.10 / (download) - annotate - [select for diffs], Wed May 26 13:56:08 2010 UTC (14 years ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_4_8_BASE, OPENBSD_4_8
Changes since 1.9: +5 -5 lines
Diff to previous 1.9 (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.9 / (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_7_BASE, OPENBSD_4_7, OPENBSD_4_6_BASE, OPENBSD_4_6, OPENBSD_4_5_BASE, OPENBSD_4_5, OPENBSD_4_4_BASE, OPENBSD_4_4
Changes since 1.8: +2 -2 lines
Diff to previous 1.8 (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.8 / (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.7: +2 -2 lines
Diff to previous 1.7 (colored)

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

Revision 1.7 / (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.6: +7 -4 lines
Diff to previous 1.6 (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.6 / (download) - annotate - [select for diffs], Thu Dec 13 08:54:05 2007 UTC (16 years, 6 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_4_3_BASE, OPENBSD_4_3
Changes since 1.5: +5 -5 lines
Diff to previous 1.5 (colored)

Monster commit of stuff I did mostly last month. What it does:
 * removes kif and uses iface for everything interface related.
   This removes unneeded data redundancy which makes the code more complex.
 * adds the link local prefix to struct iface and attaches a list with
   the other prefixes to the struct iface. This is needed to generate the
   link LSA.
 * disconnects struct iface from struct area (the backpointer is gone)
   this will make the reload code a bit easier.
norby@ agrees with the direction we're heading with this

Revision 1.5 / (download) - annotate - [select for diffs], Tue Oct 16 21:31:37 2007 UTC (16 years, 7 months ago) by claudio
Branch: MAIN
Changes since 1.4: +1 -3 lines
Diff to previous 1.4 (colored)

remove log_debug() packet sending is now solid so no need to fill the log
with it.

Revision 1.4 / (download) - annotate - [select for diffs], Sun Oct 14 20:42:05 2007 UTC (16 years, 7 months ago) by claudio
Branch: MAIN
Changes since 1.3: +2 -2 lines
Diff to previous 1.3 (colored)

Switch log_sockaddr() to take a void * so it is not necessary to cast the
sockaddr_in6 or sockaddr_in to a sockaddr.

Revision 1.3 / (download) - annotate - [select for diffs], Wed Oct 10 14:09:25 2007 UTC (16 years, 8 months ago) by claudio
Branch: MAIN
Changes since 1.2: +17 -14 lines
Diff to previous 1.2 (colored)

send_packet() now takes a struct in6_addr as destination instead of a
struct sockaddr_in6 and builds the struct sockaddr_in6 internaly adding scope
if necessary. While there switch to sendto() we don't need any of the sendmsg()
features here.
OK norby@

Revision 1.2 / (download) - annotate - [select for diffs], Tue Oct 9 06:26:47 2007 UTC (16 years, 8 months ago) by claudio
Branch: MAIN
Changes since 1.1: +42 -83 lines
Diff to previous 1.1 (colored)

Remaining bit of last night work. Make packet reception use all the goodies
introduced (checksumming is no longer needed, no IP header checking is needed,
get a in6_pktinfo with the ifindex and dest addr, cleanup and remove a lot
of other code). With this ospf6d is able to send and receive first hello
packets.  OK norby@

Revision 1.1 / (download) - annotate - [select for diffs], Mon Oct 8 10:44:50 2007 UTC (16 years, 8 months ago) by norby
Branch: MAIN

Welcome ospf6d

The new ospf6d daemon will support OSPFv3, basically OSPF for IPv6 networks.

It is heavily based on ospfd(8), it is more or less a copy and paste of it.
Currently some unneeded stuff has been removed and the trasition from
IPv4 to IPv6 has begun.

ospf6d is not very usefull at the moment, it is being imported to allow more
people to work on it concurrently.

Not yet connected to the builds.

ok claudio@ dlg@

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.