Age | Commit message (Collapse) | Author |
|
ifconfig mp* mplslabel N" validates the label both in ifconfig(8) and each
driver's ioctl handler, but there is one case where all drivers install
a route without looking at the label at all.
SIOCSLIFPHYRTABLE in all three drivers just validates the rdomain and sets
the label to itself (0) such that the route is (re)installed accordingly.
None of the driver's helper functions dealing with labels and routes
validate labels themselves but instead expect the callees, e.g. the ioctl
handler to do so.
That means we can install routes for the explicit NULL label in non-default
routing tables but are never able to clean them up without reboot.
Fix this by adding the inverse of mp*_clone_destroy()'s label check to the
routines installing the MPLS route to avoid bogus ones in the first place.
OK claudio
|
|
Code is there, noone ever used it, I guess.
This makes ifconfig(8) documentation actually hold true.
OK claudio
|
|
mpip(4) always adds and deletes routes in rdomain 0 regardless of the
`tunneldomain', i.e. the `sc_rdomain' value.
mpw(4) adds routes with the specified rdomain but always deletes them
in rdomain 0.
mpe(4) consistently uses the softc's rdomain which is tracked
consistently across the various ioctls -- no fix needed.
Found while reading the code and testing ifconfig(8)'s "tunneldomain" in
order to document MPLS ioctls.
OK claudio
|
|
Most clonable interface drivers (except bridge, enc, loop, pppx,
switch, trunk and vlan) initialise the send queue's length to IFQ_MAXLEN
during *_clone_create() even though ifq_init(), which is eventually called
through if_attach(), does the same.
Remove all early "ifq_set_maxlen(&ifq->if_snd, IFQ_MAXLEN);" lines to leave
it to ifq_init() and have clonable drivers a tad more in sync.
OK mvs
|
|
ok dlg@ tobhe@
|
|
ok dlg@ tobhe@
|
|
i've been wanting to do this for a while, and now that we've got
stoeplitz and it gives us 16 bits, it seems like the right time.
|
|
passed though pf_test(). So there is no need to try to call
pf_pkt_addr_changed() instead just check that the PF statekey is NULL.
Initial problem of not including pf.h found by jsg@
OK jsg@ sashan@
|
|
this let's input processing bypass ifiqs. there's a performance
benefit from this, and it will let me tweak the backpressure detection
mechanism that ifiqs use without impacting on a stack of virtual
interfaces.
ive tested all of these except mpw, which i will end up testing
soon anyway.
|
|
reduces code duplication and chance for error.
|
|
|
|
|
|
by default txprio is set to 0, so the exp field will be 0. howerver,
txprio on mpe/mpw/mpip can be configured with other values or
settings like our other tunnel or encapsulation interfaces.
intermediate LSPs can use the exp field to manage their prioritisation
of encapsulated traffic.
|
|
if these remain set then output on the underlying interface may
mistakenly be done with the wrong protocol type (eg, MPLS_MCAST
instead of MPLS), and to the wrong link layer address.
reported by Lee Nelson
the specific problem was identified by Mitchell Krome
|
|
consistently set the rtabled for "outgoing" packets to the encap
rdomain. use this for rtallocs in mpip too instead of assuming 0.
|
|
this makes ifconfig print "(unset)" to show the label isn't set yet.
|
|
whether the mpw interface is advertising "ethernet" or "ethernet-
tagged" is something the ends of the wire agree on (ie, ldpd is
configured a certain way), it is not something that affects ethernet
encap or decap.
the MPW ioctls can still configure it and read it, but it has no
bearing on how the driver operates on packets.
|
|
the existing mpw ioctl is still available for ldpd to use for a
(short) while.
discussed with claudio@ at a2k19
ok mpi@
|
|
this basically adds a dummy mpls tag to the stack for pseudowires
and uses a flow as the label on that dummy tag. this allows
intermediate systems that hash packets onto multiple links to use
the extra tag as input to the hash, providing more entropy and
therefore better load balancing.
it's a pity there's no way to turn it on yet...
|
|
this is to prepare for flow aware transport for FAT from RFC 6391
|
|
the only flag used with sc_flags was the one to turn the control
word on and off.
this is in preparation for split ioctls for controlling pseudowire
behaviour. sc_cword can be set atomically and indepentently as a
separate variable.
|
|
no functional change
|
|
no functional change
|
|
this is a first step in breaking up the monolithic and redundant
SIOCSETMPWCFG ioctls
discussed with claudio@
|
|
this adds an rwlock like mpe has which means only one thing can be
adding or removing a local mpls label, and those things check if
the interface is dying before doing their thing.
|
|
this is based on the changes to mpe i made yesterday. unfortunately
mpw has a monstor ioctl that configures all the things, which makes
the kernel side complicated. hopefully i can split them up.
|
|
it was using ifp->if_rdomain for the rtalloc of the mpls encapsulated
tunnel in mpw_start.
|
|
experience with mpe shows you need RTF_LOCAL everywhere for del to work.
|
|
this allows mpls interfaces (mpe, mpw) to pass the rdomain they
wish the local label to be in, rather than have it implicitly forced
to 0 by these functions. right now they'll pass 0, but it will soon
be possible to have them rx packets in other rdomains.
previously the functions used ifp->if_rdomain for the rdomain.
everything other than mpls still passes ifp->if_rdomain.
ok mpi@
|
|
fails.
|
|
|
|
|
|
|
|
|
|
as well as allowing for larger frames to be transported, it also
gets rid of the dependancy on mpe defines.
|
|
this means the current mpls header will be passed along with the
mbuf for mpw to look at. right now this doesn't do anything, but
it will allow for implementation of RFC 6391 (flow aware transport)
and using the exp header for cos.
when mpe gets moved to adding an RTF_LOCAL route, this will be used
for cos and ttl handling.
|
|
copy the semantics for guaranteeing this from egre. when sending
an encapsulated frame, prepend a whole new mbuf for the tags and
transport headers. when rxing a packet, check the alignment of the
ethernet payload and duplicate it on the right boundary if it isn't
already aligned.
|
|
this will allow for a lot of special casing in places like vlan and
bridge to go away since mpw will do all the same things as any other
ethernet tunnel. another benefit is you can run stuff directly on
the mpw interface to interact with the pseudowire, rather than
requiring a bridge and vether interface. this is like what juniper
calls Pseudowire Service Interfaces.
the caveat is that the implicit vlan or svlan tagging that mpw did
in ethernet-tagged mode now has to be done by hand. however, there
is some indication that different vendors pick different types of
tags, ie, one uses vlan tags and another uses svlan, so being able
to configure the right one has value. it is also possible you would
want to bridge the entire tag stack to another site, so being able
to bridge mpw without it playing with the tags can be useful.
because the if_type on mpw changes from IFT_MPLSTUNNEL to IFT_ETHER,
the semantic used to handle incoming packets in mpls_input is
changed. instead of mpls_input pushing the packets into mpw based
on the if_type being IFT_MPLSTUNNEL, mpw now adds an RTF_LOCAL route
to the mpls table. mpls_input falls through to "outputting" the
packet to mpw_output, which then uses the RTF_LOCAL flag to decide
to input to mpw_input and then ether_input. this semantic will be
applied to mpe soon, which removes all the interface special casing
in mpls_input. the if_type change also means mpw implements the
SIOCGPWE3 ioctl so ldpd can still figure out that the interface is
a pseudowire.
ok claudio@
|
|
The account flag `ASU' will no longer be set but that makes suser()
mpsafe since it no longer mess with a per-process field.
No objection from millert@, ok tedu@, bluhm@
|
|
memory shortage. As it is invoked from a system call, it should
not fail and wait instead.
OK visa@ mpi@
|
|
ok rzalamena@
|
|
inline function instead of casting it to sockaddr. While there,
use inline instead of __inline for all these conversions. Some
struct sockaddr casts can be avoided completely.
OK dhill@ mpi@
|
|
OK claudio@ mpi@
|
|
rectification.
|
|
an ifq to transmit a packet is picked by the current traffic
conditioner (ie, priq or hfsc) by providing an index into an array
of ifqs. by default interfaces get a single ifq but can ask for
more using if_attach_queues().
the vast majority of our drivers still think there's a 1:1 mapping
between interfaces and transmit queues, so their if_start routines
take an ifnet pointer instead of a pointer to the ifqueue struct.
instead of changing all the drivers in the tree, drivers can opt
into using an if_qstart routine and setting the IFXF_MPSAFE flag.
the stack provides a compatability wrapper from the new if_qstart
handler to the previous if_start handlers if IFXF_MPSAFE isnt set.
enabling hfsc on an interface configures it to transmit everything
through the first ifq. any other ifqs are left configured as priq,
but unused, when hfsc is enabled.
getting this in now so everyone can kick the tyres.
ok mpi@ visa@ (who provided some tweaks for cnmac).
|
|
only once per packet.
Fix a regression introduced when if_input() started to be called by
every pseudo-driver.
ok claudio@, dlg@
|
|
ok rzalamena@
|
|
|
|
|
|
previously mpw would walk around our interface hierarchy so it could
reinject vlan tags for packets that were received on a stack of
vlan interfaces. this got in the way of making vlan mpsafe, but is
also unecessary according to how i read RFC 4448 which describes
how mpls pseudowires should function.
the behaviour is now:
- in raw mode mpw(4) acts like a normal ethernet interface
it no longer injects a tag from a vlan interface that may be on the
same bridge as it, and it allows you to configure ip addresses on
the local interface and use them without panicking the kernel.
- in tagged mode it will only add tags from vlan interfaces on the
same bridge as it, but not any parent/child tags from interfaces
on top of that vlan. if the packet did not come from a vlan interface
on a bridge it will inject a tag for vlan 0.
this will also allow vlan to move forward.
ok mpi@ rzalamena@ claudio@
|