summaryrefslogtreecommitdiffstats
path: root/sys/netmpls/mpls_output.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* correct INET6 path in mpls_getttl() and avoid uninitialised variablejsg2019-09-031-2/+2
| | | | ok dlg@
* use m_getptr to get to the right mbuf and offset for the ttl in mpls_gettl.dlg2019-08-271-29/+27
| | | | | problem found by and this fix was tested by groos at xiplink dot com on bugs@
* Rework the MPLS handling. Remove the lookup loops since nothing is usingclaudio2015-12-021-63/+39
| | | | | | | | | 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@
* Always increment rt_use inside rtalloc(9) instead of doing it in somempi2015-09-231-2/+1
| | | | | | specific places. ok claudio@, benno@
* There's no point in abstracting ifp->if_output() as long as pf_test()mpi2015-09-131-2/+2
| | | | | | needs to see lo0 in the output path. ok claudio@
* Stop overwriting the rt_ifp pointer of RTF_LOCAL routes with lo0ifp.mpi2015-09-121-2/+2
| | | | | | | | | Use instead the RTF_LOCAL flag to loop local traffic back to the corresponding protocol queue. With this change rt_ifp is now always the same as rt_ifa->ifa_ifp. ok claudio@
* Use rtfree() instead of playing with the refcount directly. Some care isclaudio2015-09-121-6/+11
| | | | | | needed since rt0 as passed from the upper layer is freed by that layer. Also if_output does not free the rt so handle that as well. With and OK mpi@
* m_freem() can handle NULL, do not check for this condition beforehands.deraadt2015-07-151-3/+2
| | | | ok stsp mpi
* unifdef some more INET. v4 4life.tedu2014-12-231-5/+1
|
* Explicitly include <net/if_var.h> instead of pulling it in <net/if.h>.mpi2014-12-051-1/+2
| | | | ok mikeb@, krw@, bluhm@, tedu@
* Rename rtalloc1() into rtalloc(9) and convert its flags to only enablempi2014-11-011-2/+2
| | | | | | functionnality instead of a mix of enable/disable. ok bluhm@, jca@
* Fewer <netinet/in_systm.h> !mpi2014-07-221-2/+1
|
* Move various extern declarations into their corresponding header file.mpi2013-04-241-3/+1
|
* de-guttenberg our stack a bithenning2011-04-041-5/+3
| | | | | we don't need 7 f***ing copies of the same code to do the protocol checksums (or not, depending on hw capabilities). claudio ok
* no need to check the csum flags before calling mpls_do_cksum whichhenning2011-04-041-4/+2
| | | | immediately checks exactly those flags, claudio ok
* make mpls compile w/o errors when inet6 is not definedmikeb2011-01-211-1/+5
| | | | | diff from form@ who's too busy drinking vodka with pelmeni to commit this; ok claudio
* Map the TTL when building the initial MPLS stack from the encapsulatedclaudio2010-09-081-3/+49
| | | | | | packet. For IP and IPv6 the corresponding mapttl sysctl needs to be set. This is needed to make traceroute work over MPLS. OK michele@
* Remove duplicate mtod(). No need to do it twice since the mbuf is notclaudio2010-07-071-3/+1
| | | | modified in between.
* Kill the mpls enable sysctl knob. Since MPLS needs to be enabled explicitlyclaudio2010-06-021-2/+2
| | | | | on each interface there is no need for yet another knob. OK michele@
* Rework the way we handle MPLS in the kernel. Instead of fumbling MPLS intoclaudio2010-05-281-51/+97
| | | | | | | | | | | 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).
* Start cleaning up the mess called rtalloc*. Kill rtalloc2, make rtalloc1claudio2010-05-071-2/+2
| | | | | | | | accept flags for report and nocloning. Move the rtableid into struct route (with a minor twist for now) and make a few more codepathes rdomain aware. Appart from the pf.c and route.c bits the diff is mostly mechanical. More to come... OK michele, henning
* Remove commented variable.michele2009-07-091-2/+1
|
* Split up functionalities between mpls_input and mpls_output.michele2009-04-291-3/+5
| | | | | | | | The former is responsible to handle packets destined to localhost, the latter handles packet that have to be forwarded or the ones originated from localhost. "i like it" claudio@
* Get rid of the ugly rtentry hack.michele2009-01-281-72/+53
| | | | | | | | 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@
* Fix sockaddr_mpls structure.michele2009-01-081-9/+16
| | | | | | | | | 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@
* Initial fixup of sockaddr_mpls struct.michele2008-12-151-10/+7
| | | | | | | | 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@
* Fix cvs id tag.michele2008-11-061-1/+1
|
* Added mpls_output() used to output mpls packets originating from local host.michele2008-10-281-0/+153
Strictly similar to mpls_input(). Input and OK claudio@, OK laurent@