Age | Commit message (Collapse) | Author |
|
exist and we get another matching one instead.
This bug has been here since the KAME area and recently exposed by a
refactoring at n2k15. The problem is that rtrequest(9) does not check
on which interface the route entry is attached when issuing a RTM_DELETE.
So the kernel would end up deleting the route attached on a different ifp
when in_ifinit() fails.
This fix is currently a workaround, a better fix is in the pipeline.
Reported by Laurence Tratt <laurie AT tratt DOT net>, thanks!
|
|
RTF_CLONED routes attached.
In thise case if_get(9) can return NULL inside rtflushclone1() because
ifdetach() starts by clearing the interface pointer in the index map.
So it is perfectly correct to bail and we're not going to leak any route
entry because we're garbage collecting all of them.
Reported by daniel@ and Aaron Miller <aaron DOT miller04 AT gmail DOT com>
|
|
work is represented by struct task.
the start routine is now wrapped by a task which is serialised by the
infrastructure. if_start_barrier has been renamed to ifq_barrier and
is now implemented as a task that gets serialised with the start
routine.
this also adds an ifq_restart() function. it serialises a call to
ifq_clr_oactive and calls the start routine again. it exists to
avoid a race that kettenis@ identified in between when a start
routine discovers theres no space left on a ring, and when it calls
ifq_set_oactive. if the txeof side of the driver empties the ring
and calls ifq_clr_oactive in between the above calls in start, the
queue will be marked oactive and the stack will never call the start
routine again.
by serialising the ifq_set_oactive call in the start routine and
ifq_clr_oactive calls we avoid that race.
tested on various nics
ok mpi@
|
|
ok mpi@
|
|
ok dlg@
|
|
ok mpi@
|
|
the intention is to make it more clear what belongs to a transmit
queue and what belongs to an interface.
suggested by and ok mpi@
|
|
NULL. inspired by Richard Procter <richard.n.procter@gmail.com>'s mail on
tech from Aug 17, but redone. ok sashan vgross
|
|
ok goda@, yasuoka@
|
|
both af and naf (af-to case) are in the pf_pdesc
some code shuffling to actually set these before calling pf_change_ap/_icmp
inspired by Richard Procter <richard.n.procter@gmail.com>'s mail on tech
from Aug 17, but redone
ok bluhm vgross
|
|
|
|
<net/if_var.h> because some other operating systems have defines in
there.
ok jasper@
|
|
without pipex.enable=1. Also fix tun(4) not to pass the packets to pipex
when pipex.enable=0.
"go for it" dlg
|
|
local one. While we always intended to keep the logging in pf_test_rule
and pf_test so seperate that we don't end up with a wrong reason, this
is just too fragile and I can't even convince myself that it still is
right. pointed out by markus, ok bluhm benno
|
|
|
|
allocator for the 4K heap.
In this configuration a fullfeed BGP server for v4 and v6 consumes
10M more than with the radix tree.
This double the depth of the tree and makes the lookup slower. But
the ratio speed/memory can be adjusted in the future, for now we are
interested in a lock-free route lookup.
Tested by and ok benno@
|
|
ok claudio@
|
|
not when the version is wrong and the pad is non-zero.
OK goda@
|
|
It is now safe to call if_enqueue() without holding the KERNEL_LOCK()
even on an interface part of a bridge(4).
ok dlg@, henning@, kettenis@
|
|
bridge_output() is used by the stack to duplicate a packet coming from a
bridge member to its other ports.
Confusion pointed by Momtchil Momtchev on misc@
ok reyk@
|
|
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@
|
|
this avoids current recursion to pf_test() function. the change also
switches icmp_error()/icmp6_error() to use ip_send()/ip6_send() so
they are safe for PF.
The idea comes from Markus Friedl. bluhm, mikeb and mpi helped me
a lot to get it into shape.
OK bluhm@, mpi@
|
|
element. Otherwise the kernel paniced with "ipintr no HDR" if the
data passed to pppxwrite() had a certain length.
Bug reported and fix tested by Sevan / Venture37.
Debugged with and OK mikeb@
|
|
fallback to a SLIST.
ok dlg@, jasper@
|
|
required.
ok bluhm@ mpi@.
|
|
no change in .o file checksum
ok claudio@
|
|
This reduces the size of the structure by 8 bytes on amd64 now that
we are using an index instead of a pointer for reaching interfaces.
|
|
These indexes are unique and should be used with if_get() to get a
pointer to the corresponding ``ifp''. Such pointer is guaranteed to
be valid in a MP environment until if_put() is called.
ok claudio@, sthen@
|
|
pf_inp_...() lookup, link and unlink functions as an interface.
Locking can be added to them later. Remove the first linking at
the beginning of tcp_input() and udp_input() as it is not necessary.
It will be done later anyway. That code was a relict, from the
time before I had added the second linking.
Input from mikeb@ and sashan@; OK sashan@
|
|
|
|
This commit is not removing the existing EtherIP part of gif(4) and
it keeps EtherIP of gif(4) working.
ok jbg@ sthen@ mpi@ reyk@ yasuoka@
|
|
|
|
existing start routines will still be called under the kernel lock
and at IPL_NET.
mpsafe start routines will be serialised so only one instance of
each interfaces function will be running in the kernel at any point
in time. this guarantees packets will be dequeued in order, and the
start routines dont have to lock against themselves because if_start
does it for them.
the code to do that is based on the scsi runqueue code.
this also provides an if_start_barrier() function that should wait
until any currently running instances of if_start have finished.
a driver can opt in to the mpsafe if_start call by doing the following:
1. setting ifp->if_xflags = IFXF_MPSAFE
2. only calling if_start() instead of its own start routine
3. clearing IFF_RUNNING before calling if_start_barrier() on its way down
4. only using IFQ_DEQUEUE (not ifq_deq_begin/commit/rollback)
to simplify the implementation the tx mitigation code has been removed.
tested by several
ok mpi@ jmatthew@
|
|
ok henning@ claudio@
|
|
collide with the statekey to inp unlinking.
OK sashan@ mpi@
|
|
OK mpi@
|
|
are not used anymore. This has to be done before any interface
fields become invalid.
As the route delete request cannot call if_get() anymore, pass down
the interface. Split rtrequest_delete() into a separate function
that may take an existing inteface.
OK mpi@
|
|
OK mpi@, bluhm@
|
|
for failed route lookups. This is something that was maybe useful in the
90is but in this modern times it is just annoying and nothing expect it
anyway. OK mpi@, sthen@
|
|
|
|
|
|
ok claudio@, mpi@
|
|
This will helps for unlocking the routing table and will prevent further
mistake by keeping the multipath logic inside the rtable_* API.
ok dlg@, claudio@
|
|
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@
|
|
|
|
changing.
|
|
ok bluhm@
|
|
Splitting functions in if_bridge.c into if_bridge.c for the forwarding part
and bridgectl.c for the control part. It shouldn't have any functional change.
ok reyk@ mpi@ yasuoka@
|
|
With input and ok mpi@.
|
|
ok reyk@ mpi@ yasuoka@
|