29 Jan, 2008
40 commits
-
RFC 4301 requires us to relookup ICMP traffic that does not match any
policies using the reverse of its payload. This patch implements this
for ICMP traffic that originates from or terminates on localhost.This is activated on outbound with the new policy flag XFRM_POLICY_ICMP,
and on inbound by the new state flag XFRM_STATE_ICMP.On inbound the policy check is now performed by the ICMP protocol so
that it can repeat the policy check where necessary.Signed-off-by: Herbert Xu
Signed-off-by: David S. Miller -
RFC 4301 requires us to relookup ICMP traffic that does not match any
policies using the reverse of its payload. This patch adds the functions
xfrm_decode_session_reverse and xfrmX_policy_check_reverse so we can get
the reverse flow to perform such a lookup.Signed-off-by: Herbert Xu
Signed-off-by: David S. Miller -
This patch introduces an enum for bits in the flags argument of xfrm_lookup.
This is so that we can cram more information into it later.Since all current users use just the values 0 and 1, XFRM_LOOKUP_WAIT has
been added with the value 1 << 0 to represent the current meaning of flags.The test in __xfrm_lookup has been changed accordingly.
Signed-off-by: Herbert Xu
Signed-off-by: David S. Miller -
Signed-off-by: Gerrit Renker
Signed-off-by: Ian McDonald
Signed-off-by: Arnaldo Carvalho de Melo
Signed-off-by: David S. Miller -
This hooks up the TFRC Loss Interval database with CCID 3 packet reception.
In addition, it makes the CCID-specific computation of the first loss
interval (which requires access to all the guts of CCID3) local to ccid3.c.The patch also fixes an omission in the DCCP code, that of a default /
fallback RTT value (defined in section 3.4 of RFC 4340 as 0.2 sec); while
at it, the upper bound of 4 seconds for an RTT sample has been reduced to
match the initial TCP RTO value of 3 seconds from[RFC 1122, 4.2.3.1].Signed-off-by: Gerrit Renker
Signed-off-by: Ian McDonald
Signed-off-by: Arnaldo Carvalho de Melo
Signed-off-by: David S. Miller -
This moves two inlines back to packet_history.h: these are not private
to packet_history.c, but are needed by CCID3/4 to detect whether a new
loss is indicated, or whether a loss is already pending.Signed-off-by: Gerrit Renker
Signed-off-by: Arnaldo Carvalho de Melo
Signed-off-by: David S. Miller -
Each time feedback is sent two lines are printed:
ccid3_hc_rx_send_feedback: client ... - entry
ccid3_hc_rx_send_feedback: Interval ...usec, X_recv=..., 1/p=...The first line is redundant and thus removed.
Further, documentation of ccid3_hc_rx_sock (capitalisation) is made consistent.
Signed-off-by: Gerrit Renker
Signed-off-by: Arnaldo Carvalho de Melo
Signed-off-by: David S. Miller -
A ringbuffer-based implementation of loss interval history is easier to
maintain, allocate, and update.The `swap' routine to keep the RX history sorted is due to and was written
by Arnaldo Carvalho de Melo, simplifying an earlier macro-based variant.Details:
* access to the Loss Interval Records via macro wrappers (with safety checks);
* simplified, on-demand allocation of entries (no extra memory consumption on
lossless links); cache allocation is local to the module / exported as service;
* provision of RFC-compliant algorithm to re-compute average loss interval;
* provision of comprehensive, new loss detection algorithm
- support for all cases of loss, including re-ordered/duplicate packets;
- waiting for NDUPACK=3 packets to fill the hole;
- updating loss records when a late-arriving packet fills a hole.Signed-off-by: Gerrit Renker
Signed-off-by: Ian McDonald
Signed-off-by: Arnaldo Carvalho de Melo
Signed-off-by: David S. Miller -
This moves the inlines (which were previously declared as macros) back into
packet_history.h since the loss detection code needs to be able to read entries
from the RX history in order to create the relevant loss entries: it needs at
least tfrc_rx_hist_loss_prev() and tfrc_rx_hist_last_rcv(), which in turn
require the definition of the other inlines (macros).Signed-off-by: Gerrit Renker
Signed-off-by: Arnaldo Carvalho de Melo
Signed-off-by: David S. Miller -
This separates RX/TX initialisation and puts all packet history / loss intervals
initialisation into tfrc.c.
The organisation is uniform: slab declaration -> {rx,tx}_init() -> {rx,tx}_exit()Signed-off-by: Gerrit Renker
Signed-off-by: Arnaldo Carvalho de Melo
Signed-off-by: David S. Miller -
Signed-off-by: Denis V. Lunev
Signed-off-by: David S. Miller -
Recently David Miller and Herbert Xu pointed out that struct net becomes
overbloated and un-maintainable. There are two solutions:
- provide a pointer to a network subsystem definition from struct net.
This costs an additional dereferrence
- place sub-system definition into the structure itself. This will speedup
run-time access at the cost of recompilation timeThe second approach looks better for us. Other sub-systems will follow.
Signed-off-by: Denis V. Lunev
Acked-by: Daniel Lezcano
Signed-off-by: David S. Miller -
Signed-off-by: Denis V. Lunev
Signed-off-by: David S. Miller -
This patchset makes the different protocols to return an error code, so
the af_inet6 module can check the initialization was correct or not.The raw6 was taken into account to be consistent with the rest of the
protocols, but the registration is at the same place.
Because the raw6 has its own init function, the proto and the ops structure
can be moved inside the raw6.c file.Signed-off-by: Daniel Lezcano
Signed-off-by: David S. Miller -
This patch makes the inet6_register_protosw to return an error code.
The different protocols can be aware the registration was successful or
not and can pass the error to the initial caller, af_inet6.Signed-off-by: Daniel Lezcano
Signed-off-by: David S. Miller -
This patch makes the frag_init to return an error code, so the af_inet6
module can handle the error.Signed-off-by: Daniel Lezcano
Signed-off-by: David S. Miller -
This patch factorize the code for the differents init functions for rthdr,
nodata, destopt in a single function exthdrs_init.
This function returns an error so the af_inet6 module can check correctly
the initialization.Signed-off-by: Daniel Lezcano
Signed-off-by: David S. Miller -
This patch makes the flowlab subsystem to return an error code and makes
some cleanup with procfs ifdefs.
The af_inet6 will use the flowlabel init return code to check the initialization
was correct.Signed-off-by: Daniel Lezcano
Signed-off-by: David S. Miller -
This includes:
* moving neigh_sysctl_(un)register calls inside
devinet_sysctl_(un)register ones, as they are always
called in pairs;
* making __devinet_sysctl_unregister() to unregister
the ipv4_devconf struct, while original devinet_sysctl_unregister()
works with the in_device to handle both - devconf and
neigh sysctls;
* make stubs for CONFIG_SYSCTL=n case to get rid of
in-code ifdefs.Signed-off-by: Pavel Emelyanov
Signed-off-by: David S. Miller -
This is essentially IN_DEV_ANDCONF with proper arguments.
Signed-off-by: Pavel Emelyanov
Signed-off-by: David S. Miller -
Make the INET_TWDR_TWKILL_SLOTS vs sizeof(twdr->thread_slots)
check nicer.Signed-off-by: Pavel Emelyanov
Signed-off-by: David S. Miller -
The sizeof(struct tcp_skb_cb) should not be less than the
sizeof(skb->cb). This is checked in net/ipv4/tcp.c, but
this check can be made more gracefully.Signed-off-by: Pavel Emelyanov
Signed-off-by: David S. Miller -
nl_pid_hash_alloc() is renamed to nl_pid_hash_zalloc().
It is now returning zeroed memory to its callers.Signed-off-by: Eric Dumazet
Signed-off-by: David S. Miller -
This cleanup shrinks size of net/core/dst.o on i386 from 1299 to 1289 bytes.
(This is because dev_hold()/dev_put() are doing atomic_inc()/atomic_dec() and
force compiler to re-evaluate memory contents.)Signed-off-by: Eric Dumazet
Signed-off-by: David S. Miller -
This patch adds the xfrm_input_state helper function which returns the
current xfrm state being processed on the input path given an sk_buff.
This is currently only used by xfrm_input but will be used by ESP upon
asynchronous resumption.Signed-off-by: Herbert Xu
Signed-off-by: David S. Miller -
Signed-off-by: Gerrit Renker
Signed-off-by: Arnaldo Carvalho de Melo
Signed-off-by: David S. Miller -
Signed-off-by: Gerrit Renker
Signed-off-by: Arnaldo Carvalho de Melo
Signed-off-by: David S. Miller -
Moved up the comment "Receiver routines" above the first occurrence of
RX history routines.Signed-off-by: Gerrit Renker
Signed-off-by: Arnaldo Carvalho de Melo
Signed-off-by: David S. Miller -
With fixes from Arnaldo Carvalho de Melo.
Signed-off-by: YOSHIFUJI Hideaki
Signed-off-by: Arnaldo Carvalho de Melo
Signed-off-by: David S. Miller -
Signed-off-by: Denis V. Lunev
Acked-by: Alexey Kuznetsov
Signed-off-by: David S. Miller -
Signed-off-by: Denis V. Lunev
Acked-by: Alexey Kuznetsov
Signed-off-by: David S. Miller -
ipv4: no need pass pointer to a default into fib_detect_death
Signed-off-by: Denis V. Lunev
Acked-by: Alexey Kuznetsov
Signed-off-by: David S. Miller -
The patch defines the usual static inline functions when the code is
disabled for fib6_rules. That's allow to remove some ifdef in route.c
file and make the code a little more clear.Signed-off-by: Daniel Lezcano
Acked-by: YOSHIFUJI Hideaki
Signed-off-by: David S. Miller -
The following patch create the usual static inline functions to disable
the xfrm6_init and xfrm6_fini function when XFRM is off.
That's allow to remove some ifdef and make the code a little more clear.Signed-off-by: Daniel Lezcano
Acked-by: YOSHIFUJI Hideaki
Signed-off-by: David S. Miller -
Make the proc creation/destruction to be a separate function. That
allows to remove the #ifdef CONFIG_PROC_FS in the init/fini function
and make them more readable.Signed-off-by: Daniel Lezcano
Acked-by: YOSHIFUJI Hideaki
Signed-off-by: David S. Miller -
Just move the variable on the struct net and adjust
its usage.Others sysctls from sys.net.core table are more
difficult to virtualize (i.e. make them per-namespace),
but I'll look at them as well a bit later.Signed-off-by: Pavel Emelyanov
Signed-off-by: David S. Miller -
Some of ctl variables are going to be on the struct
net. Here's the way to adjust the ->data pointer on the
ctl_table-s to point on the right variable.Since some pointers still point on the global variables,
I keep turning the write bits off on such tables.This looks to become a common procedure for net sysctls,
so later parts of this code may migrate to some more
generic place.Signed-off-by: Pavel Emelyanov
Signed-off-by: David S. Miller -
Making them per-namespace is required for the following
two reasons:First, some ctl values have a per-namespace meaning.
Second, making them writable from the sub-namespace
is an isolation hole.So I introduce the pernet operations to create these
tables. For init_net I use the existing statically
declared tables, for sub-namespace they are duplicated
and the write bits are removed from the mode.Signed-off-by: Pavel Emelyanov
Signed-off-by: David S. Miller -
The SNMP_INC_STATS_OFFSET_BH is used only by ICMP6_INC_STATS_OFFSET_BH.
The ICMP6_INC_STATS_OFFSET_BH is unused.Signed-off-by: Pavel Emelyanov
Signed-off-by: David S. Miller -
these three list_head are all local variables, but can also use
LIST_HEAD.Signed-off-by: Denis Cheng
Signed-off-by: David S. Miller