Age | Commit message (Collapse) | Author |
|
|
|
This will help transitionning to an un-KERNEL_LOCK()ed IP
forwarding path.
Disucssed with bluhm@, ok claudio@
|
|
already, for PPPoE case as first step.
ok mpi
|
|
packets. This fixes the problem when pipex connects with pppoe(4)
through pair(4).
|
|
|
|
them by NET_LOCK/NET_UNLOCK. Also make the timeout for pipex_timer
run with a thread context and replace pipex softintr by NETISR_PIPEX.
ok mpi
|
|
doesn't trigger rn_initmask() and first session had caused panics.
Reported by VOblezov at mtsbank.ru.
|
|
|
|
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
|
|
rectification.
|
|
|
|
each counter is identified by an enum value which correspond to the
original members of the udpstat struct.
udpstat_inc(udps_foo) replaces udpstat.udps_foo++ for the actual
updates. udpstat_inc is a thin wrapper around counters_inc.
counters are still returned to userland via the udpstat struct for
now.
ok mpi@ mikeb@ deraadt@
|
|
the ioff argument to pool_init() is unused and has been for many
years, so this replaces it with an ipl argument. because the ipl
will be set on init we no longer need pool_setipl.
most of these changes have been done with coccinelle using the spatch
below. cocci sucks at formatting code though, so i fixed that by hand.
the manpage and subr_pool.c bits i did myself.
ok tedu@ jmatthew@
@ipl@
expression pp;
expression ipl;
expression s, a, o, f, m, p;
@@
-pool_init(pp, s, a, o, f, m, p);
-pool_setipl(pp, ipl);
+pool_init(pp, s, a, ipl, f, m, p);
|
|
ok yasuoka@
|
|
ok yasuoka@
|
|
this gives us preallocated space at the start of the packet for
headers so later calls to M_PREPEND are far less likely to fail.
ok yasuoka@
|
|
We don't expect inbound packets to come to PF with statekey attached.
- I've also found missing call to pf_pkt_addr_changed() at various
places, which needs to get fixed to prevent KASSERT() from firing.
OK mpi@, sthen@
|
|
Found by LLVM/Clang Static Analyzer.
ok yasuoka@ mpi@
|
|
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@
|
|
diff from Yuuichi Someya
|
|
ok yasuoka@
|
|
needs to see lo0 in the output path.
ok claudio@
|
|
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@
|
|
ifpp - XXX: just for statistics
ifpp is always NULL in all callers so that statistic confirms ifpp is
dying
OK mpi@
|
|
In all but two calls NULL is passed and in the other 2 cases the ifp
is only used to maybe feed it to in6_selecthlim() to select the hoplimit
for the link. Since in6_embedscope() only works on link-local addresses
it does not matter what hop limit we select since the destination is
directly reachable.
OK florian@ mpi@
|
|
the 3rd argument of in6_recoverscope() and make it return void.
OK dlg@ mikeb@
|
|
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@
|
|
From David Hill; OK mpi@; tested kspillner@; tweaks bluhm@
|
|
everywhere to avoid passing around pointers to uninitialized stack
memory. While there, fix the call to in6_recoverscope() in
fill_drlist().
OK deraadt@ mpi@
|
|
ok guenther@, henning@
|
|
ok stsp mpi
|
|
receiving interface in the packet header of every mbuf.
The interface pointer should now be retrieved when necessary with
if_get(). If a NULL pointer is returned by if_get(), the interface
has probably been destroy/removed and the mbuf should be freed.
Such mechanism will simplify garbage collection of mbufs and limit
problems with dangling ifp pointers.
Tested by jmatthew@ and krw@, discussed with many.
ok mikeb@, bluhm@, dlg@
|
|
this has a slight semantic change. previously pipex would only
process up to 128 packets on the input and output queues at a time
and would reschedule the softint if there were any left. now it
mq_delists the current set of pending packets and only processes
them. if anything is added to the queues later they'll cause the
softint to run again.
this in turn lets us deprecate sysctl_ifq since nothing uses it
anymore. because niqueues are mostly wrappers around mbuf_queues,
we can provide sysctl_mq and just #define sysctl_niq to it.
pipex bits are ok yasuoka@
|
|
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@
|
|
by a subsystem to stash some state while the mbuf gets queued. eg,
net80211 uses it to keep track of the wireless node associated with
a packet before submitting it to a drivers snd queue for transmission.
this makes pipex use ph_cookie to keep track of the pipex session
associated with a packet before submitting it to the softint queues.
this lets us get rid of an mbuf tag type, and avoids the cost of
tag allocation.
ok yasuoka@
|
|
its only used for the ip and ip6 network stack input queues, so it
seems unfair that every instance of ifqueue has to carry a pointer
around for this specific use case.
this moves the congestion marker to a kernel global. if we detect
that we're congested, we assume the whole system is busy and punish
all input queues.
marking a system as congested is done by setting the global to the
current value of ticks. as the system moves away from that value,
it moves away from being congested until the comparison fails.
written at s2k15
ok henning@ beck@ bluhm@ claudio@
|
|
long live the one true internet.
ok henning mikeb
|
|
|
|
ok deraadt@ tedu@
|
|
ok dlg@, uebayasi@, mikeb@
|
|
handle them. Also use M_NOWAIT for copying a multicast packet.
|
|
sesssion for multicast in proper way.
|
|
Without this, the packets larger than the minimum MTU on the routes to
the L2TP peer had been dropped.
|
|
wasn't freeed when the interface is destroyed. Free it properly.
ok dlg
|
|
OK blambert@ yasuoka@
|
|
|
|
|
|
after discussions with beck deraadt kettenis.
|
|
by the pipex session whose mppe is not accepted. Fix ppp_common_input()
to not pass such frames to pipex.
|