Up to [local] / src / sys / netmpls
Request diff between arbitrary revisions
Default branch: MAIN
Revision 1.46 / (download) - annotate - [select for diffs], Tue May 25 22:45:10 2021 UTC (3 years ago) by bluhm
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,
HEAD
Changes since 1.45: +1 -3 lines
Diff to previous 1.45 (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.45 / (download) - annotate - [select for diffs], Wed Mar 10 10:21:49 2021 UTC (3 years, 3 months ago) by jsg
Branch: MAIN
CVS Tags: OPENBSD_6_9_BASE,
OPENBSD_6_9
Changes since 1.44: +2 -2 lines
Diff to previous 1.44 (colored)
spelling ok gnezdo@ semarie@ mpi@
Revision 1.44 / (download) - annotate - [select for diffs], Wed Aug 19 19:22:53 2020 UTC (3 years, 9 months ago) by gnezdo
Branch: MAIN
CVS Tags: OPENBSD_6_8_BASE,
OPENBSD_6_8
Changes since 1.43: +1 -11 lines
Diff to previous 1.43 (colored)
Convert mpls_sysctl to sysctl_bounded_args OK claudio@
Revision 1.43 / (download) - annotate - [select for diffs], Tue Nov 5 08:26:38 2019 UTC (4 years, 7 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_6_7_BASE,
OPENBSD_6_7
Changes since 1.42: +3 -5 lines
Diff to previous 1.42 (colored)
Remove mpls_inkloop and the corresponding sysctl net.mpls.maxloop_inkernel. The value is no longer needed since the MPLS code got refactored some time ago. Found by Thomas Habets (thomas (at) habets se)
Revision 1.42 / (download) - annotate - [select for diffs], Wed Jan 30 01:01:01 2019 UTC (5 years, 4 months ago) by dlg
Branch: MAIN
CVS Tags: OPENBSD_6_6_BASE,
OPENBSD_6_6,
OPENBSD_6_5_BASE,
OPENBSD_6_5
Changes since 1.41: +4 -1 lines
Diff to previous 1.41 (colored)
add some macros to help turn labels into shims and back again.
Revision 1.41 / (download) - annotate - [select for diffs], Sun Jan 27 05:13:04 2019 UTC (5 years, 4 months ago) by dlg
Branch: MAIN
Changes since 1.40: +6 -2 lines
Diff to previous 1.40 (colored)
use mpls_ip_adjttl and mpls_ip6_adjttl in mpe instead of rolling it again. mpls_ip_adjttl now patches the checksum rather than check it and calculate it again. both mpls_ip_adjttl and mpls_ip6_adjttl now rely on the caller to check the sysctls for whether they should run or not, which paves the way for making it configurable in mpe via the tunnel ioctls.
Revision 1.40 / (download) - annotate - [select for diffs], Sun Jan 27 04:20:59 2019 UTC (5 years, 4 months ago) by dlg
Branch: MAIN
Changes since 1.39: +1 -6 lines
Diff to previous 1.39 (colored)
change how packets are pushed into mpe(4). mpe(4) adds itself ot the mpls rtable with RTF_LOCAL set, which pushes the packet through mpe_output, which sees RTF_LOCAL can calls mpe_input. this follows what mpw(4) does, and removes a special case in mpls_input.
Revision 1.39 / (download) - annotate - [select for diffs], Sun Jan 27 02:41:56 2019 UTC (5 years, 4 months ago) by dlg
Branch: MAIN
Changes since 1.38: +1 -13 lines
Diff to previous 1.38 (colored)
move the mpe_softc definition and mpe macros into the mpe driver.
Revision 1.38 / (download) - annotate - [select for diffs], Tue Jan 9 06:24:15 2018 UTC (6 years, 5 months ago) by dlg
Branch: MAIN
CVS Tags: OPENBSD_6_4_BASE,
OPENBSD_6_4,
OPENBSD_6_3_BASE,
OPENBSD_6_3
Changes since 1.37: +2 -2 lines
Diff to previous 1.37 (colored)
make mpls_input take a struct ifnet *ifp argument. this makes it like all our other protocol family input functions. mpls_input always looks up the interface the mbuf was received on, but it's always called by code that already has a reference to that interface anyway. the result of this is a few less if_get/if_put calls. ok mpi@ bluhm@ visa@ claudio@
Revision 1.37 / (download) - annotate - [select for diffs], Tue Feb 28 07:07:07 2017 UTC (7 years, 3 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_6_2_BASE,
OPENBSD_6_2,
OPENBSD_6_1_BASE,
OPENBSD_6_1
Changes since 1.36: +1 -4 lines
Diff to previous 1.36 (colored)
Remove mpls_raw_usrreq() prototype, that function is gone.
Revision 1.36 / (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.35: +1 -4 lines
Diff to previous 1.35 (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.35 / (download) - annotate - [select for diffs], Wed Dec 2 08:47:00 2015 UTC (8 years, 6 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_6_0_BASE,
OPENBSD_6_0,
OPENBSD_5_9_BASE,
OPENBSD_5_9
Changes since 1.34: +2 -2 lines
Diff to previous 1.34 (colored)
Rework the MPLS handling. Remove the lookup loops since nothing is using them and they make everything so much harder with no gain. Remove the ifp argument from mpls_input since it is not needed. On the input side the lookup side is modified a bit when it comes to BOS handling. Tested in a L3VPN setup with ldpd and bgpd. Commiting now so we can move on with cleaning up rt_ifp usage. If this breaks L2VPN I will fix it once reported. OK mpi@
Revision 1.34 / (download) - annotate - [select for diffs], Wed Jul 29 00:04:03 2015 UTC (8 years, 10 months ago) by rzalamena
Branch: MAIN
CVS Tags: OPENBSD_5_8_BASE,
OPENBSD_5_8
Changes since 1.33: +2 -3 lines
Diff to previous 1.33 (colored)
Don't use mpls_input() as input handler anymore and instead call it directly. Also protect non mp-safe functions while at it. ok mpi@.
Revision 1.33 / (download) - annotate - [select for diffs], Mon Jul 20 22:16:41 2015 UTC (8 years, 10 months ago) by rzalamena
Branch: MAIN
Changes since 1.32: +18 -1 lines
Diff to previous 1.32 (colored)
Implemented MPLS pseudowire (mpw(4)) to be used with VPLS and VPWS. ok mpi@, claudio@.
Revision 1.32 / (download) - annotate - [select for diffs], Mon Jul 20 21:16:39 2015 UTC (8 years, 10 months ago) by rzalamena
Branch: MAIN
Changes since 1.31: +3 -5 lines
Diff to previous 1.31 (colored)
Kill NETISR_MPLS, from now on we will use interface input handlers to deal with MPLS packets. ok mpi@, claudio@
Revision 1.31 / (download) - annotate - [select for diffs], Fri Apr 10 13:58:20 2015 UTC (9 years, 2 months ago) by dlg
Branch: MAIN
Changes since 1.30: +2 -2 lines
Diff to previous 1.30 (colored)
replace the use of ifqueues for most input queues serviced by netisr with niqueues. this change is so big because there's a lot of code that takes pointers to different input queues (eg, ether_input picks between ipv4, ipv6, pppoe, arp, and mpls input queues) and falls through to code to enqueue packets against the pointer. if i changed only one of the input queues id have to add sepearate code paths, one for ifqueues and one for niqueues in each of these places by flipping all these input queues at once i can keep the currently common code common. testing by mpi@ sthen@ and rafael zalamena ok mpi@ sthen@ claudio@ henning@
Revision 1.30 / (download) - annotate - [select for diffs], Thu Mar 26 11:02:44 2015 UTC (9 years, 2 months ago) by mpi
Branch: MAIN
Changes since 1.29: +3 -2 lines
Diff to previous 1.29 (colored)
Use rt_ifa_add(9) and rt_ifa_del(9) to configure MPLS labels. Since the removal of the link-layer ifa from "struct ifnet" it was impossible to configure MPLS routes on mpe(4). Because just like enc(4), mpe(4) was abusing the link-layer ifa to attach its route entries. So explicitly pass a "glue" ifa to the routing layer. From Rafael Zalamena who discovered this the hardway, thanks! ok claudio@
Revision 1.29 / (download) - annotate - [select for diffs], Thu Jan 15 23:50:31 2015 UTC (9 years, 4 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_5_7_BASE,
OPENBSD_5_7
Changes since 1.28: +1 -8 lines
Diff to previous 1.28 (colored)
Do not include 5 header files, including <sys/param.h> ok millert
Revision 1.28 / (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.27: +4 -1 lines
Diff to previous 1.27 (colored)
Move various extern declarations into their corresponding header file.
Revision 1.27 / (download) - annotate - [select for diffs], Wed Mar 27 02:00:08 2013 UTC (11 years, 2 months ago) by tedu
Branch: MAIN
Changes since 1.26: +1 -2 lines
Diff to previous 1.26 (colored)
a little header cleanup. ok deraadt
Revision 1.26 / (download) - annotate - [select for diffs], Tue Mar 26 13:19:26 2013 UTC (11 years, 2 months ago) by mpi
Branch: MAIN
Changes since 1.25: +1 -2 lines
Diff to previous 1.25 (colored)
Remove various read-only *maxlen variables and use IFQ_MAXLEN directly. ok beck@, mikeb@
Revision 1.25 / (download) - annotate - [select for diffs], Wed Sep 8 08:00:56 2010 UTC (13 years, 9 months ago) by claudio
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,
OPENBSD_4_9_BASE,
OPENBSD_4_9
Changes since 1.24: +4 -1 lines
Diff to previous 1.24 (colored)
Map the TTL when building the initial MPLS stack from the encapsulated packet. For IP and IPv6 the corresponding mapttl sysctl needs to be set. This is needed to make traceroute work over MPLS. OK michele@
Revision 1.24 / (download) - annotate - [select for diffs], Wed Jun 9 11:40:36 2010 UTC (14 years ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_4_8_BASE,
OPENBSD_4_8
Changes since 1.23: +1 -4 lines
Diff to previous 1.23 (colored)
Fix the pop operation to make PHP work again. When popping the last label by a pop operation we need to forward the packet to the specified nexthop as is. This is done by calling the interface output routine directly. This is different to the local operation since that one injects the packets into ip_input() via netisr. OK michele
Revision 1.23 / (download) - annotate - [select for diffs], Wed Jun 2 15:41:06 2010 UTC (14 years ago) by claudio
Branch: MAIN
Changes since 1.22: +8 -9 lines
Diff to previous 1.22 (colored)
Kill the mpls enable sysctl knob. Since MPLS needs to be enabled explicitly on each interface there is no need for yet another knob. OK michele@
Revision 1.22 / (download) - annotate - [select for diffs], Fri May 28 12:09:10 2010 UTC (14 years ago) by claudio
Branch: MAIN
Changes since 1.21: +3 -2 lines
Diff to previous 1.21 (colored)
Rework the way we handle MPLS in the kernel. Instead of fumbling MPLS into ether_output() and later on other L2 output functions use a trick and over- load the ifp->if_output() function pointer on MPLS enabled interfaces to go through mpls_output() which will then call the link level output function. By setting IFXF_MPLS on an interface the output pointers are switched. This now allows to cleanup the MPLS input and output pathes and fix mpe(4) so that the MPLS code now actually works for both P and PE systems. Tested by myself and michele (A custom kernel with MPLS and mpe enabled is still needed).
Revision 1.21 / (download) - annotate - [select for diffs], Tue Apr 28 12:07:43 2009 UTC (15 years, 1 month ago) by michele
Branch: MAIN
CVS Tags: OPENBSD_4_7_BASE,
OPENBSD_4_7,
OPENBSD_4_6_BASE,
OPENBSD_4_6
Changes since 1.20: +2 -1 lines
Diff to previous 1.20 (colored)
Introduce a new dummy operation to easily handle packets that have to leave the MPLS cloud and join ipv4/ipv6 stack. ok claudio@ laurent@
Revision 1.20 / (download) - annotate - [select for diffs], Fri Apr 17 12:10:08 2009 UTC (15 years, 1 month ago) by michele
Branch: MAIN
Changes since 1.19: +4 -1 lines
Diff to previous 1.19 (colored)
Correctly handle packets that are leaving the MPLS cloud and joining the ipv4/ipv6 stack. Get also rid of the dependency on mpe(4) for packets not belonging to VPN traffic. ok laurent@, ok and input claudio@
Revision 1.19 / (download) - annotate - [select for diffs], Tue Feb 3 16:42:54 2009 UTC (15 years, 4 months ago) by michele
Branch: MAIN
CVS Tags: OPENBSD_4_5_BASE,
OPENBSD_4_5
Changes since 1.18: +5 -5 lines
Diff to previous 1.18 (colored)
Use our own flags to set the operations and not RTF_PROTOX. Switch the padding field into a MPLS one in rt_msghdr to store relevant informations. OK claudio@ laurent@
Revision 1.18 / (download) - annotate - [select for diffs], Thu Jan 29 11:11:33 2009 UTC (15 years, 4 months ago) by michele
Branch: MAIN
Changes since 1.17: +2 -2 lines
Diff to previous 1.17 (colored)
mpls_operation have to be 2 bytes long to store operations correctly ok claudio@ laurent@
Revision 1.17 / (download) - annotate - [select for diffs], Wed Jan 28 22:18:44 2009 UTC (15 years, 4 months ago) by michele
Branch: MAIN
Changes since 1.16: +14 -8 lines
Diff to previous 1.16 (colored)
Get rid of the ugly rtentry hack. We can now act as edge node and allow ipv4 packets to enter a Label Switched Path and not just forwarding MPLS packets. OK claudio@
Revision 1.16 / (download) - annotate - [select for diffs], Thu Jan 8 12:47:45 2009 UTC (15 years, 5 months ago) by michele
Branch: MAIN
Changes since 1.15: +6 -3 lines
Diff to previous 1.15 (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.15 / (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.14: +4 -13 lines
Diff to previous 1.14 (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.14 / (download) - annotate - [select for diffs], Sat Nov 1 16:37:55 2008 UTC (15 years, 7 months ago) by michele
Branch: MAIN
Changes since 1.13: +10 -4 lines
Diff to previous 1.13 (colored)
Introduced Uniform Model for TTL handling. MPLS TTL is mapped into network layer one as the packet exits the LSP. Just IPv4 support for now. Added the relevant sysctls to enable this behaviour. Input and OK claudio@
Revision 1.13 / (download) - annotate - [select for diffs], Tue Oct 28 01:16:14 2008 UTC (15 years, 7 months ago) by michele
Branch: MAIN
Changes since 1.12: +2 -1 lines
Diff to previous 1.12 (colored)
Added mpls_output() used to output mpls packets originating from local host. Strictly similar to mpls_input(). Input and OK claudio@, OK laurent@
Revision 1.12 / (download) - annotate - [select for diffs], Tue Oct 14 20:43:33 2008 UTC (15 years, 8 months ago) by michele
Branch: MAIN
Changes since 1.11: +3 -1 lines
Diff to previous 1.11 (colored)
Now mpls_input() handles ipv4 and ipv6 explicit null labels. Added mpe_input6 to manage also ipv6 packets insted of just ipv4 ones. OK claudio@ laurent@
Revision 1.11 / (download) - annotate - [select for diffs], Fri May 23 16:03:03 2008 UTC (16 years ago) by thib
Branch: MAIN
CVS Tags: OPENBSD_4_4_BASE,
OPENBSD_4_4
Changes since 1.10: +2 -2 lines
Diff to previous 1.10 (colored)
Make this compile again, by adding a struct proc * argument to the usrreq's. (Both MPLS and NETATALK are disabled in GENERIC).
Revision 1.10 / (download) - annotate - [select for diffs], Fri May 9 15:08:36 2008 UTC (16 years, 1 month ago) by claudio
Branch: MAIN
Changes since 1.9: +1 -3 lines
Diff to previous 1.9 (colored)
Kill some useless makros.
Revision 1.9 / (download) - annotate - [select for diffs], Thu May 8 03:18:39 2008 UTC (16 years, 1 month ago) by claudio
Branch: MAIN
Changes since 1.8: +3 -2 lines
Diff to previous 1.8 (colored)
Hook mpe(4) correctly into mpls so that it is possible to tunnel packets over MPLS. Still a bit hackish but getting closer. hai norby@
Revision 1.8 / (download) - annotate - [select for diffs], Wed May 7 08:00:50 2008 UTC (16 years, 1 month ago) by pyr
Branch: MAIN
Changes since 1.7: +3 -1 lines
Diff to previous 1.7 (colored)
add mpe_input() to be able to be fed packets that will reenter ip. no consumers yet, they should come soon. ok norby@
Revision 1.7 / (download) - annotate - [select for diffs], Wed May 7 07:16:49 2008 UTC (16 years, 1 month ago) by pyr
Branch: MAIN
Changes since 1.6: +4 -1 lines
Diff to previous 1.6 (colored)
Make mpe a point-to-point interface. Make the mtu user definable. ok claudio@
Revision 1.6 / (download) - annotate - [select for diffs], Wed May 7 06:53:42 2008 UTC (16 years, 1 month ago) by pyr
Branch: MAIN
Changes since 1.5: +2 -1 lines
Diff to previous 1.5 (colored)
Correctly initialize labels by byte-swapping and inserting BoS and TTL. While there bump MTU to 1500 and set the receiving interface before calling mpls_input. mpestart will eventually call mpls_output when it exists. ``yaaaaayyy'' and ok claudio@ and norby@
Revision 1.5 / (download) - annotate - [select for diffs], Tue May 6 13:33:50 2008 UTC (16 years, 1 month ago) by pyr
Branch: MAIN
Changes since 1.4: +14 -1 lines
Diff to previous 1.4 (colored)
bring in the mpe interface - for ``MPLS Provider Edge'' - this is a work in progress and some bits need to be cleaned up but will be in-tree for convenience. ok claudio@, norby@
Revision 1.4 / (download) - annotate - [select for diffs], Wed Apr 30 07:39:48 2008 UTC (16 years, 1 month ago) by norby
Branch: MAIN
Changes since 1.3: +2 -1 lines
Diff to previous 1.3 (colored)
Drop all MPLS packets when MPLS is not enabled. Discussed with claudio@ dlg@ laurent@ Remember to enable MPLS vith sysctl(8). sysctl -w net.mpls.enable=1 ok claudio@ dlg@ laurent@
Revision 1.3 / (download) - annotate - [select for diffs], Wed Apr 23 12:28:49 2008 UTC (16 years, 1 month ago) by norby
Branch: MAIN
Changes since 1.2: +19 -1 lines
Diff to previous 1.2 (colored)
add missing prototypes
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
Changes since 1.1: +1 -160 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@