OpenBSD CVS

CVS log for src/sys/netmpls/mpls_proto.c


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

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.20 / (download) - annotate - [select for diffs], Tue Feb 22 01:15:02 2022 UTC (2 years, 3 months ago) by guenther
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, HEAD
Changes since 1.19: +1 -2 lines
Diff to previous 1.19 (colored)

Delete unnecessary #includes of <sys/domain.h> and/or <sys/protosw.h>

net/if_pppx.c pointed out by jsg@
ok gnezdo@ deraadt@ jsg@ mpi@ millert@

Revision 1.19 / (download) - annotate - [select for diffs], Tue May 25 22:45:10 2021 UTC (3 years ago) by bluhm
Branch: MAIN
CVS Tags: OPENBSD_7_0_BASE, OPENBSD_7_0
Changes since 1.18: +2 -2 lines
Diff to previous 1.18 (colored)

As network features are not added dynamically, the domain structures
are constant.  Having more const makes MP review easier.  More
pointers are mapped read-only in the kernel image.
OK deraadt@ mvs@

Revision 1.18 / (download) - annotate - [select for diffs], Thu Jun 13 08:12:11 2019 UTC (4 years, 11 months ago) by claudio
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.17: +2 -1 lines
Diff to previous 1.17 (colored)

Copy the user provided sockaddr into a normalized sockaddr in rtrequest()
before adding it to the routing table. The rtable code is doing memcmp()
of those rt_dest sockaddrs so it is important that they are stored in a
canonical form. To do this struct domain is extended to include the
sockaddr size for this address family.
OK bluhm@ anton@

Reported-by: syzbot+10fe9cd8d0211c562ead@syzkaller.appspotmail.com

Revision 1.17 / (download) - annotate - [select for diffs], Mon Nov 19 10:15:04 2018 UTC (5 years, 6 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_6_5_BASE, OPENBSD_6_5
Changes since 1.16: +1 -2 lines
Diff to previous 1.16 (colored)

Retire dom_rtkeylen from struct domain. Nothing is using this anymore.
It was used by the original patricia tree.
OK mpi@

Revision 1.16 / (download) - annotate - [select for diffs], Thu Mar 2 08:58:24 2017 UTC (7 years, 3 months ago) by mpi
Branch: MAIN
CVS Tags: 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
Changes since 1.15: +6 -6 lines
Diff to previous 1.15 (colored)

Convert domain declarations to C99 initializers.

ok dhill@, florian@, bluhm@

Revision 1.15 / (download) - annotate - [select for diffs], Mon Feb 27 19:16:56 2017 UTC (7 years, 3 months ago) by claudio
Branch: MAIN
Changes since 1.14: +5 -24 lines
Diff to previous 1.14 (colored)

Retire the AF_MPLS protosw struct. Nothing is using it and the code was super
basic anyway. Simplifies the code a lot also by calling the mpls sysctl no
longer via the protosw but instead directly.
OK mpi@ on a previous diff. Also tested by renato@ who actually found a bug
which is now fixed.

Revision 1.14 / (download) - annotate - [select for diffs], Thu Dec 3 21:57:59 2015 UTC (8 years, 6 months ago) by mpi
Branch: MAIN
CVS Tags: OPENBSD_6_0_BASE, OPENBSD_6_0, OPENBSD_5_9_BASE, OPENBSD_5_9
Changes since 1.13: +2 -2 lines
Diff to previous 1.13 (colored)

Get rid of rt_mask() and stop allocating a "struct sockaddr" for every
route entry in ART.

rt_plen() now represents the prefix length of a route entry and should
be used instead.

For now use a "struct sockaddr_in6" to represent the mask when needed,
this should be then replaced by the prefix length and RTA_NETMASK only
used for compatibility with userland.

ok claudio@

Revision 1.13 / (download) - annotate - [select for diffs], Wed Oct 7 10:50:35 2015 UTC (8 years, 7 months ago) by mpi
Branch: MAIN
Changes since 1.12: +3 -3 lines
Diff to previous 1.12 (colored)

Initialize the routing table before domains.

The routing table is not an optional component of the network stack
and initializing it inside the "routing domain" requires some ugly
introspection in the domain interface.

This put the rtable* layer at the same level of the if* level.  These
two subsystem are organized around the two global data structure used
in the network stack:

- the global &ifnet list, to be used in process context only, and
- the routing table which can be read in interrupt context.

This change makes the rtable_* layer domain-aware and extends the
"struct domain" such that INET, INET6 and MPLS can specify the length
of the binary key used in lookups.  This allows us to keep, or move
towards, AF-free route and rtable layers.

While here stop the madness and pass the size of the maximum key length
in *byte* to rn_inithead0().

ok claudio@, mikeb@

Revision 1.12 / (download) - annotate - [select for diffs], Fri Sep 4 08:43:39 2015 UTC (8 years, 9 months ago) by mpi
Branch: MAIN
Changes since 1.11: +2 -3 lines
Diff to previous 1.11 (colored)

Make every subsystem using a radix tree call rn_init() and pass the
length of the key as argument.

This way every consumer of the radix tree has a chance to explicitly
initialize the shared data structures and no longer rely on another
subsystem to do the initialization.

As a bonus ``dom_maxrtkey'' is no longer used an die.

ART kernels should now be fully usable because pf(4) and IPSEC properly
initialized the radix tree.

ok chris@, reyk@

Revision 1.11 / (download) - annotate - [select for diffs], Sun Aug 30 10:39:16 2015 UTC (8 years, 9 months ago) by mpi
Branch: MAIN
Changes since 1.10: +2 -2 lines
Diff to previous 1.10 (colored)

Use a global table for domains instead of building a list at run time.

As a side effect there's no need to run if_attachdomain() after the
list of domains has been built.

ok claudio@, reyk@

Revision 1.10 / (download) - annotate - [select for diffs], Sat Jul 18 15:51:17 2015 UTC (8 years, 10 months ago) by mpi
Branch: MAIN
CVS Tags: OPENBSD_5_8_BASE, OPENBSD_5_8
Changes since 1.9: +3 -4 lines
Diff to previous 1.9 (colored)

Abstract the routing table internals behind an rtable_* API.

Code abusing the radix internals for the routing table should now
includes <net/rtable.h> and only deal with "struct rtentry".

Code using a radix tree for another purpose can still include
<net/radix.h>.

Inputs from and ok claudio@, mikeb@

Revision 1.9 / (download) - annotate - [select for diffs], Fri Dec 5 15:50:04 2014 UTC (9 years, 5 months ago) by mpi
Branch: MAIN
CVS Tags: OPENBSD_5_7_BASE, OPENBSD_5_7
Changes since 1.8: +2 -1 lines
Diff to previous 1.8 (colored)

Explicitly include <net/if_var.h> instead of pulling it in <net/if.h>.

ok mikeb@, krw@, bluhm@, tedu@

Revision 1.8 / (download) - annotate - [select for diffs], Mon Sep 8 06:24:13 2014 UTC (9 years, 8 months ago) by jsg
Branch: MAIN
Changes since 1.7: +3 -2 lines
Diff to previous 1.7 (colored)

remove uneeded route.h includes
ok miod@ mpi@

Revision 1.7 / (download) - annotate - [select for diffs], Wed Apr 24 10:20:15 2013 UTC (11 years, 1 month ago) by mpi
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
Changes since 1.6: +1 -4 lines
Diff to previous 1.6 (colored)

Move various extern declarations into their corresponding header file.

Revision 1.6 / (download) - annotate - [select for diffs], Thu Mar 31 10:36:42 2011 UTC (13 years, 2 months ago) by jasper
Branch: MAIN
CVS Tags: 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
Changes since 1.5: +2 -2 lines
Diff to previous 1.5 (colored)

- use nitems(); no binary change

ok claudio@

Revision 1.5 / (download) - annotate - [select for diffs], Fri Oct 15 12:42:56 2010 UTC (13 years, 7 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_4_9_BASE, OPENBSD_4_9
Changes since 1.4: +2 -2 lines
Diff to previous 1.4 (colored)

Enable multipath support on the MPLS routing table. ldpd needs this and
the priority support that comes together with it. Currently no balancing
will happen, only the first path will be used.

Revision 1.4 / (download) - annotate - [select for diffs], Thu Jan 8 12:47:45 2009 UTC (15 years, 4 months ago) by michele
Branch: MAIN
CVS Tags: OPENBSD_4_8_BASE, OPENBSD_4_8, OPENBSD_4_7_BASE, OPENBSD_4_7, OPENBSD_4_6_BASE, OPENBSD_4_6, OPENBSD_4_5_BASE, OPENBSD_4_5
Changes since 1.3: +2 -2 lines
Diff to previous 1.3 (colored)

Fix sockaddr_mpls structure.
Now it contains just the label as it must be.

This introduces a ugly hack in rtentry that will be removed
as soon as possible.

OK claudio@

Revision 1.3 / (download) - annotate - [select for diffs], Mon Dec 15 16:13:55 2008 UTC (15 years, 5 months ago) by michele
Branch: MAIN
Changes since 1.2: +2 -2 lines
Diff to previous 1.2 (colored)

Initial fixup of sockaddr_mpls struct.

Remove smpls_in_iface as labels must be per platform unique.
Remove smpls_out_iface. It is redudant and can be inferred from nexthop.
Move smpls_operation to rt_flags and temporary remove smpls_out_exp.

ok claudio@

Revision 1.2 / (download) - annotate - [select for diffs], Wed Apr 23 11:22:23 2008 UTC (16 years, 1 month ago) by norby
Branch: MAIN
CVS Tags: OPENBSD_4_4_BASE, OPENBSD_4_4
Changes since 1.1: +1 -80 lines
Diff to previous 1.1 (colored)

I hate working outside the tree.

Fix my faulty import....

Revision 1.1 / (download) - annotate - [select for diffs], Wed Apr 23 11:00:35 2008 UTC (16 years, 1 month ago) by norby
Branch: MAIN

Import MPLS (Multi Protocol Label Switching)

MPLS support partly based on the (abandoned?) AYAME project.
Basic LSR (Label Switch Router) functionality is present, but not fully
functional yet.

It is currently possible to insert entries in the LIB (Label Information Base)
with route(8), but setting the operation type is not supported yet.

Imported to allow more people to work on this in the coming weeks.

ok claudio@ laurent@ 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.