]> git.karo-electronics.de Git - mv-sheeva.git/log
mv-sheeva.git
18 years ago[IPSEC] esp: Defer output IV initialization to first use.
David S. Miller [Fri, 22 Sep 2006 22:17:35 +0000 (15:17 -0700)]
[IPSEC] esp: Defer output IV initialization to first use.

First of all, if the xfrm_state only gets used for input
packets this entropy is a complete waste.

Secondly, it is often the case that a configuration loads
many rules (perhaps even dynamically) and they don't all
necessarily ever get used.

This get_random_bytes() call was showing up in the profiles
for xfrm_state inserts which is how I noticed this.

Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[XFRM]: Extract common hashing code into xfrm_hash.[ch]
David S. Miller [Thu, 24 Aug 2006 11:50:50 +0000 (04:50 -0700)]
[XFRM]: Extract common hashing code into xfrm_hash.[ch]

Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[XFRM]: Hash policies when non-prefixed.
David S. Miller [Thu, 24 Aug 2006 11:45:07 +0000 (04:45 -0700)]
[XFRM]: Hash policies when non-prefixed.

This idea is from Alexey Kuznetsov.

It is common for policies to be non-prefixed.  And for
that case we can optimize lookups, insert, etc. quite
a bit.

For each direction, we have a dynamically sized policy
hash table for non-prefixed policies.  We also have a
hash table on policy->index.

For prefixed policies, we have a list per-direction which
we will consult on lookups when a non-prefix hashtable
lookup fails.

This still isn't as efficient as I would like it.  There
are four immediate problems:

1) Lots of excessive refcounting, which can be fixed just
   like xfrm_state was
2) We do 2 hash probes on insert, one to look for dups and
   one to allocate a unique policy->index.  Althought I wonder
   how much this matters since xfrm_state inserts do up to
   3 hash probes and that seems to perform fine.
3) xfrm_policy_insert() is very complex because of the priority
   ordering and entry replacement logic.
4) Lots of counter bumping, in addition to policy refcounts,
   in the form of xfrm_policy_count[].  This is merely used
   to let code path(s) know that some IPSEC rules exist.  So
   this count is indexed per-direction, maybe that is overkill.

Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[XFRM]: Hash xfrm_state objects by source address too.
David S. Miller [Thu, 24 Aug 2006 11:00:03 +0000 (04:00 -0700)]
[XFRM]: Hash xfrm_state objects by source address too.

The source address is always non-prefixed so we should use
it to help give entropy to the bydst hash.

Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[XFRM]: Kill excessive refcounting of xfrm_state objects.
David S. Miller [Thu, 24 Aug 2006 10:54:22 +0000 (03:54 -0700)]
[XFRM]: Kill excessive refcounting of xfrm_state objects.

The refcounting done for timers and hash table insertions
are just wasted cycles.  We can eliminate all of this
refcounting because:

1) The implicit refcount when the xfrm_state object is active
   will always be held while the object is in the hash tables.
   We never kfree() the xfrm_state until long after we've made
   sure that it has been unhashed.

2) Timers are even easier.  Once we mark that x->km.state as
   anything other than XFRM_STATE_VALID (__xfrm_state_delete
   sets it to XFRM_STATE_DEAD), any timer that fires will
   do nothing and return without rearming the timer.

   Therefore we can defer the del_timer calls until when the
   object is about to be freed up during GC.  We have to use
   del_timer_sync() and defer it to GC because we can't do
   a del_timer_sync() while holding x->lock which all callers
   of __xfrm_state_delete hold.

This makes SA changes even more light-weight.

Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[XFRM]: Purge dst references to deleted SAs passively.
David S. Miller [Thu, 24 Aug 2006 10:30:28 +0000 (03:30 -0700)]
[XFRM]: Purge dst references to deleted SAs passively.

Just let GC and other normal mechanisms take care of getting
rid of DST cache references to deleted xfrm_state objects
instead of walking all the policy bundles.

Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[XFRM]: Do not flush all bundles on SA insert.
David S. Miller [Thu, 24 Aug 2006 10:29:04 +0000 (03:29 -0700)]
[XFRM]: Do not flush all bundles on SA insert.

Instead, simply set all potentially aliasing existing xfrm_state
objects to have the current generation counter value.

This will make routes get relooked up the next time an existing
route mentioning these aliased xfrm_state objects gets used,
via xfrm_dst_check().

Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[XFRM]: Simplify xfrm_spi_hash
David S. Miller [Thu, 24 Aug 2006 10:26:44 +0000 (03:26 -0700)]
[XFRM]: Simplify xfrm_spi_hash

It can use __xfrm{4,6}_addr_hash().

Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[XFRM]: Put more keys into destination hash function.
David S. Miller [Thu, 24 Aug 2006 10:24:33 +0000 (03:24 -0700)]
[XFRM]: Put more keys into destination hash function.

Besides the daddr, key the hash on family and reqid too.

Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[XFRM]: Add generation count to xfrm_state and xfrm_dst.
David S. Miller [Thu, 24 Aug 2006 10:18:09 +0000 (03:18 -0700)]
[XFRM]: Add generation count to xfrm_state and xfrm_dst.

Each xfrm_state inserted gets a new generation counter
value.  When a bundle is created, the xfrm_dst objects
get the current generation counter of the xfrm_state
they will attach to at dst->xfrm.

xfrm_bundle_ok() will return false if it sees an
xfrm_dst with a generation count different from the
generation count of the xfrm_state that dst points to.

This provides a facility by which to passively and
cheaply invalidate cached IPSEC routes during SA
database changes.

Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[XFRM]: Dynamic xfrm_state hash table sizing.
David S. Miller [Thu, 24 Aug 2006 10:08:07 +0000 (03:08 -0700)]
[XFRM]: Dynamic xfrm_state hash table sizing.

The grow algorithm is simple, we grow if:

1) we see a hash chain collision at insert, and
2) we haven't hit the hash size limit (currently 1*1024*1024 slots), and
3) the number of xfrm_state objects is > the current hash mask

All of this needs some tweaking.

Remove __initdata from "hashdist" so we can use it safely at run time.

Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[XFRM]: Convert xfrm_state hash linkage to hlists.
David S. Miller [Thu, 24 Aug 2006 09:45:07 +0000 (02:45 -0700)]
[XFRM]: Convert xfrm_state hash linkage to hlists.

Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[XFRM]: Pull xfrm_state_by{spi,src} hash table knowledge out of afinfo.
David S. Miller [Thu, 24 Aug 2006 07:42:45 +0000 (00:42 -0700)]
[XFRM]: Pull xfrm_state_by{spi,src} hash table knowledge out of afinfo.

Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[XFRM]: Pull xfrm_state_bydst hash table knowledge out of afinfo.
David S. Miller [Thu, 24 Aug 2006 07:13:10 +0000 (00:13 -0700)]
[XFRM]: Pull xfrm_state_bydst hash table knowledge out of afinfo.

Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[XFRM] IPV6: Support Mobile IPv6 extension headers sorting.
Masahide NAKAMURA [Thu, 24 Aug 2006 05:54:07 +0000 (22:54 -0700)]
[XFRM] IPV6: Support Mobile IPv6 extension headers sorting.

Support Mobile IPv6 extension headers sorting for two transformation policies.
Mobile IPv6 extension headers should be placed after IPsec
transport mode, but before transport AH when outbound.

Signed-off-by: Masahide NAKAMURA <nakam@linux-ipv6.org>
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[XFRM] IPV6: Add sort functions to combine templates/states for IPsec.
Masahide NAKAMURA [Thu, 24 Aug 2006 05:51:02 +0000 (22:51 -0700)]
[XFRM] IPV6: Add sort functions to combine templates/states for IPsec.

Add sort functions to combine templates/states for IPsec.
Think of outbound transformation order we should be careful with transport AH
which must be the last of all transport ones.

Signed-off-by: Masahide NAKAMURA <nakam@linux-ipv6.org>
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[XFRM] POLICY: Support netlink socket interface for sub policy.
Masahide NAKAMURA [Thu, 24 Aug 2006 05:49:28 +0000 (22:49 -0700)]
[XFRM] POLICY: Support netlink socket interface for sub policy.

Sub policy can be used through netlink socket.
PF_KEY uses main only and it is TODO to support sub.

Signed-off-by: Masahide NAKAMURA <nakam@linux-ipv6.org>
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[XFRM]: Add sorting interface for state and template.
Masahide NAKAMURA [Thu, 24 Aug 2006 05:48:31 +0000 (22:48 -0700)]
[XFRM]: Add sorting interface for state and template.

Under two transformation policies it is required to merge them.
This is a platform to sort state for outbound and templates
for inbound respectively.
It will be used when Mobile IPv6 and IPsec are used at the same time.

Signed-off-by: Masahide NAKAMURA <nakam@linux-ipv6.org>
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[XFRM] POLICY: sub policy support.
Masahide NAKAMURA [Thu, 24 Aug 2006 05:43:30 +0000 (22:43 -0700)]
[XFRM] POLICY: sub policy support.

Sub policy is introduced. Main and sub policy are applied the same flow.
(Policy that current kernel uses is named as main.)
It is required another transformation policy management to keep IPsec
and Mobile IPv6 lives separate.
Policy which lives shorter time in kernel should be a sub i.e. normally
main is for IPsec and sub is for Mobile IPv6.
(Such usage as two IPsec policies on different database can be used, too.)

Limitation or TODOs:
 - Sub policy is not supported for per socket one (it is always inserted as main).
 - Current kernel makes cached outbound with flowi to skip searching database.
   However this patch makes it disabled only when "two policies are used and
   the first matched one is bypass case" because neither flowi nor bundle
   information knows about transformation template size.

Signed-off-by: Masahide NAKAMURA <nakam@linux-ipv6.org>
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
18 years ago[XFRM] POLICY: Add Kconfig to support sub policy.
Masahide NAKAMURA [Thu, 24 Aug 2006 05:38:14 +0000 (22:38 -0700)]
[XFRM] POLICY: Add Kconfig to support sub policy.

Add Kconfig to support sub policy.

Signed-off-by: Masahide NAKAMURA <nakam@linux-ipv6.org>
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[IPV6] MIP6: Ignore to report if mobility headers is rejected.
Masahide NAKAMURA [Thu, 24 Aug 2006 03:47:44 +0000 (20:47 -0700)]
[IPV6] MIP6: Ignore to report if mobility headers is rejected.

Ignore to report user-space for known mobility headers rejected by
destination options header transformation.
Mobile IPv6 specification (RFC3775) says that mobility header
is used with destination options header carrying home address option
only for binding update message. Other type message cannot be used
and node must drop it silently (and must not send binding error) if
receving such packet.
To achieve it, (1) application should use transformation policy and
wild-card states to catch binding update message prior other packets
(2) kernel doesn't report the reject to user-space not to send
binding error message by application.
This patch is for (2).
Based on MIPL2 kernel patch.

This patch was also written by: Ville Nuorvala <vnuorval@tcs.hut.fi>

Signed-off-by: Masahide NAKAMURA <nakam@linux-ipv6.org>
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[IPV6] MIP6: Report to user-space when home address option is rejected.
Masahide NAKAMURA [Thu, 24 Aug 2006 03:45:55 +0000 (20:45 -0700)]
[IPV6] MIP6: Report to user-space when home address option is rejected.

Report to user-space when home address option is rejected.
In receiving this message user-space application will send Mobile IPv6 binding
error. It is rate-limited by kernel.
Based on MIPL2 kernel patch.

This patch was also written by: Ville Nuorvala <vnuorval@tcs.hut.fi>

Signed-off-by: Masahide NAKAMURA <nakam@linux-ipv6.org>
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[XFRM]: Introduce XFRM_MSG_REPORT.
Masahide NAKAMURA [Thu, 24 Aug 2006 03:44:06 +0000 (20:44 -0700)]
[XFRM]: Introduce XFRM_MSG_REPORT.

XFRM_MSG_REPORT is a message as notification of state protocol and
selector from kernel to user-space.

Mobile IPv6 will use it when inbound reject is occurred at route
optimization to make user-space know a binding error requirement.

Based on MIPL2 kernel patch.

Signed-off-by: Masahide NAKAMURA <nakam@linux-ipv6.org>
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[XFRM]: Trace which secpath state is reject factor.
Masahide NAKAMURA [Thu, 24 Aug 2006 03:41:00 +0000 (20:41 -0700)]
[XFRM]: Trace which secpath state is reject factor.

For Mobile IPv6 usage, it is required to trace which secpath state is
reject factor in order to notify it to user space (to know the address
which cannot be used route optimized communication).

Based on MIPL2 kernel patch.

This patch was also written by: Henrik Petander <petander@tcs.hut.fi>

Signed-off-by: Masahide NAKAMURA <nakam@linux-ipv6.org>
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[IPV6] MIP6: Transformation support mobility header.
Masahide NAKAMURA [Thu, 24 Aug 2006 03:39:03 +0000 (20:39 -0700)]
[IPV6] MIP6: Transformation support mobility header.

Transformation support mobility header.
Based on MIPL2 kernel patch.

Signed-off-by: Masahide NAKAMURA <nakam@linux-ipv6.org>
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[IPV6] MIP6: Add sending mobility header functions through raw socket.
Masahide NAKAMURA [Thu, 24 Aug 2006 03:36:47 +0000 (20:36 -0700)]
[IPV6] MIP6: Add sending mobility header functions through raw socket.

Mobility header is built by user-space and sent through raw socket.
Kernel just extracts its type to flow.
Based on MIPL2 kernel patch.

Signed-off-by: Masahide NAKAMURA <nakam@linux-ipv6.org>
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[IPV6] MIP6: Add receiving mobility header functions through raw socket.
Masahide NAKAMURA [Thu, 24 Aug 2006 03:35:31 +0000 (20:35 -0700)]
[IPV6] MIP6: Add receiving mobility header functions through raw socket.

Like ICMPv6, mobility header is handled through raw socket.
In inbound case, check only whether ICMPv6 error should be sent as a reply
or not by kernel.
Based on MIPL2 kernel patch.

This patch was also written by: Ville Nuorvala <vnuorval@tcs.hut.fi>
This patch was also written by: Antti Tuominen <anttit@tcs.hut.fi>

Signed-off-by: Masahide NAKAMURA <nakam@linux-ipv6.org>
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[IPV6] MIP6: Add Mobility header definition.
Masahide NAKAMURA [Thu, 24 Aug 2006 03:34:26 +0000 (20:34 -0700)]
[IPV6] MIP6: Add Mobility header definition.

Add Mobility header definition for Mobile IPv6.
Based on MIPL2 kernel patch.

This patch was also written by: Antti Tuominen <anttit@tcs.hut.fi>

Signed-off-by: Masahide NAKAMURA <nakam@linux-ipv6.org>
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[XFRM] STATE: Add Mobile IPv6 route optimization protocols to netlink interface.
Masahide NAKAMURA [Thu, 24 Aug 2006 03:33:28 +0000 (20:33 -0700)]
[XFRM] STATE: Add Mobile IPv6 route optimization protocols to netlink interface.

Add Mobile IPv6 route optimization protocols to netlink interface.
Route optimization states carry care-of address.
Based on MIPL2 kernel patch.

Signed-off-by: Masahide NAKAMURA <nakam@linux-ipv6.org>
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[IPV6] MIP6: Add destination options header transformation.
Noriaki TAKAMIYA [Thu, 24 Aug 2006 03:32:34 +0000 (20:32 -0700)]
[IPV6] MIP6: Add destination options header transformation.

Add destination options header transformation for Mobile IPv6.
Based on MIPL2 kernel patch.

This patch was also written by: Ville Nuorvala <vnuorval@tcs.hut.fi>

Signed-off-by: Noriaki TAKAMIYA <takamiya@po.ntts.co.jp>
Signed-off-by: Masahide NAKAMURA <nakam@linux-ipv6.org>
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[IPV6] MIP6: Add routing header type 2 transformation.
Noriaki TAKAMIYA [Thu, 24 Aug 2006 03:31:11 +0000 (20:31 -0700)]
[IPV6] MIP6: Add routing header type 2 transformation.

Add routing header type 2 transformation for Mobile IPv6.
Based on MIPL2 kernel patch.

Signed-off-by: Noriaki TAKAMIYA <takamiya@po.ntts.co.jp>
Signed-off-by: Masahide NAKAMURA <nakam@linux-ipv6.org>
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[IPV6] IPSEC: Support sending with Mobile IPv6 extension headers.
Masahide NAKAMURA [Thu, 24 Aug 2006 02:29:47 +0000 (19:29 -0700)]
[IPV6] IPSEC: Support sending with Mobile IPv6 extension headers.

Mobile IPv6 defines home address option as an option of destination
options header. It is placed before fragment header then
ip6_find_1stfragopt() is fixed to know about it.

Home address option also carries final source address of the flow,
then outbound AH calculation should take care of it like routing
header case.  Based on MIPL2 kernel patch.

Signed-off-by: Masahide NAKAMURA <nakam@linux-ipv6.org>
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[IPV6] MIP6: Revert address to send ICMPv6 error.
Masahide NAKAMURA [Thu, 24 Aug 2006 02:27:25 +0000 (19:27 -0700)]
[IPV6] MIP6: Revert address to send ICMPv6 error.

IPv6 source address is replaced in receiving packet
with home address option carried by destination options header.
To send ICMPv6 error back, original address which is received one on wire
should be used. This function checks such header is included
and reverts them.
Based on MIPL2 kernel patch.

This patch was also written by: Ville Nuorvala <vnuorval@tcs.hut.fi>

Signed-off-by: Masahide NAKAMURA <nakam@linux-ipv6.org>
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[IPV6]: Put dsthao after flags in order to pack inet6_skb_parm better.
David S. Miller [Thu, 24 Aug 2006 02:25:55 +0000 (19:25 -0700)]
[IPV6]: Put dsthao after flags in order to pack inet6_skb_parm better.

Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[IPV6] MIP6: Add inbound interface of home address option.
Masahide NAKAMURA [Thu, 24 Aug 2006 02:24:48 +0000 (19:24 -0700)]
[IPV6] MIP6: Add inbound interface of home address option.

Add inbound function of home address option by registering it to TLV
table for destination options header.

Based on MIPL2 kernel patch.

This patch was also written by: Ville Nuorvala <vnuorval@tcs.hut.fi>

Signed-off-by: Masahide NAKAMURA <nakam@linux-ipv6.org>
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[IPV6] MIP6: Add home address option definition.
Noriaki TAKAMIYA [Thu, 24 Aug 2006 02:21:34 +0000 (19:21 -0700)]
[IPV6] MIP6: Add home address option definition.

Add home address option definition for Mobile IPv6.
Based on MIPL2 kernel patch.

Signed-off-by: Noriaki TAKAMIYA <takamiya@po.ntts.co.jp>
Signed-off-by: Masahide NAKAMURA <nakam@linux-ipv6.org>
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[IPV6]: Allow to replace skbuff by TLV parser.
Masahide NAKAMURA [Thu, 24 Aug 2006 02:19:50 +0000 (19:19 -0700)]
[IPV6]: Allow to replace skbuff by TLV parser.

In receiving Mobile IPv6 home address option which is a TLV carried by
destination options header, kernel will try to mangle source adderss
of packet. Think of cloned skbuff it is required to replace it by the
parser just like routing header case.

This is a framework to achieve that to allow TLV parser to replace
inbound skbuff pointer.

Signed-off-by: Masahide NAKAMURA <nakam@linux-ipv6.org>
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[IPV6]: Find option offset by type.
Masahide NAKAMURA [Thu, 24 Aug 2006 02:18:35 +0000 (19:18 -0700)]
[IPV6]: Find option offset by type.

This is a helper to search option offset from extension header which
can carry TLV option like destination options header.

Mobile IPv6 home address option will use it.

Based on MIPL2 kernel patch.

Signed-off-by: Masahide NAKAMURA <nakam@linux-ipv6.org>
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[IPV6] MIP6: Add socket option and ancillary data interface of routing header type 2.
Masahide NAKAMURA [Thu, 24 Aug 2006 02:17:12 +0000 (19:17 -0700)]
[IPV6] MIP6: Add socket option and ancillary data interface of routing header type 2.

Add socket option and ancillary data interface of routing header type
2.  Mobile IPv6 application will use this to send binding
acknowledgement with the header without relation of confirmed route
optimization (binding).

Based on MIPL2 kernel patch.

Signed-off-by: Masahide NAKAMURA <nakam@linux-ipv6.org>
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[IPV6] MIP6: Add inbound interface of routing header type 2.
Masahide NAKAMURA [Thu, 24 Aug 2006 02:16:22 +0000 (19:16 -0700)]
[IPV6] MIP6: Add inbound interface of routing header type 2.

Add inbound interface of routing header type 2 for Mobile IPv6.
Based on MIPL2 kernel patch.

This patch was also written by: Ville Nuorvala <vnuorval@tcs.hut.fi>

Signed-off-by: Masahide NAKAMURA <nakam@linux-ipv6.org>
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[IPV6] MIP6: Add routing header type 2 definition.
Noriaki TAKAMIYA [Thu, 24 Aug 2006 02:15:07 +0000 (19:15 -0700)]
[IPV6] MIP6: Add routing header type 2 definition.

Add routing header type 2 definition for Mobile IPv6.
Based on MIPL2 kernel patch.

Signed-off-by: Noriaki TAKAMIYA <takamiya@po.ntts.co.jp>
Signed-off-by: Masahide NAKAMURA <nakam@linux-ipv6.org>
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
18 years ago[IPV6]: Add Kconfig to enable Mobile IPv6.
Masahide NAKAMURA [Thu, 24 Aug 2006 02:13:46 +0000 (19:13 -0700)]
[IPV6]: Add Kconfig to enable Mobile IPv6.

Add Kconfig to enable Mobile IPv6.
Based on MIPL2 kernel patch.

Signed-off-by: Noriaki TAKAMIYA <takamiya@po.ntts.co.jp>
Signed-off-by: Masahide NAKAMURA <nakam@linux-ipv6.org>
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
18 years ago[XFRM]: Fix message about transformation user interface.
Masahide NAKAMURA [Thu, 24 Aug 2006 02:12:56 +0000 (19:12 -0700)]
[XFRM]: Fix message about transformation user interface.

Transformation user interface is not only for IPsec.
Based on MIPL2 kernel patch.

Signed-off-by: Masahide NAKAMURA <nakam@linux-ipv6.org>
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[XFRM] IPV6: Restrict bundle reusing
Masahide NAKAMURA [Thu, 24 Aug 2006 02:12:01 +0000 (19:12 -0700)]
[XFRM] IPV6: Restrict bundle reusing

For outbound transformation, bundle is checked whether it is
suitable for current flow to be reused or not. In such IPv6 case
as below, transformation may apply incorrect bundle for the flow instead
of creating another bundle:

- The policy selector has destination prefix length < 128
  (Two or more addresses can be matched it)
- Its bundle holds dst entry of default route whose prefix length < 128
  (Previous traffic was used such route as next hop)
- The policy and the bundle were used a transport mode state and
  this time flow address is not matched the bundled state.

This issue is found by Mobile IPv6 usage to protect mobility signaling
by IPsec, but it is not a Mobile IPv6 specific.
This patch adds strict check to xfrm_bundle_ok() for each
state mode and address when prefix length is less than 128.

Signed-off-by: Masahide NAKAMURA <nakam@linux-ipv6.org>
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[XFRM] IPV6: Update outbound state timestamp for each sending.
Masahide NAKAMURA [Thu, 24 Aug 2006 01:20:16 +0000 (18:20 -0700)]
[XFRM] IPV6: Update outbound state timestamp for each sending.

With this patch transformation state is updated last used time
for each sending. Xtime is used for it like other state lifetime
expiration.
Mobile IPv6 enabled nodes will want to know traffic status of each
binding (e.g. judgement to request binding refresh by correspondent node,
or to keep home/care-of nonce alive by mobile node).
The last used timestamp is an important hint about it.
Based on MIPL2 kernel patch.

This patch was also written by: Henrik Petander <petander@tcs.hut.fi>

Signed-off-by: Masahide NAKAMURA <nakam@linux-ipv6.org>
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[XFRM] STATE: Introduce care-of address.
Noriaki TAKAMIYA [Thu, 24 Aug 2006 01:18:55 +0000 (18:18 -0700)]
[XFRM] STATE: Introduce care-of address.

Care-of address is carried by state as a transformation option like
IPsec encryption/authentication algorithm.

Based on MIPL2 kernel patch.

Signed-off-by: Noriaki TAKAMIYA <takamiya@po.ntts.co.jp>
Signed-off-by: Masahide NAKAMURA <nakam@linux-ipv6.org>
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
18 years ago[XFRM] STATE: Support non-fragment outbound transformation headers.
Masahide NAKAMURA [Thu, 24 Aug 2006 01:11:50 +0000 (18:11 -0700)]
[XFRM] STATE: Support non-fragment outbound transformation headers.

For originated outbound IPv6 packets which will fragment, ip6_append_data()
should know length of extension headers before sending them and
the length is carried by dst_entry.
IPv6 IPsec headers fragment then transformation was
designed to place all headers after fragment header.
OTOH Mobile IPv6 extension headers do not fragment then
it is a good idea to make dst_entry have non-fragment length to tell it
to ip6_append_data().

Signed-off-by: Masahide NAKAMURA <nakam@linux-ipv6.org>
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[XFRM] STATE: Add a hook to obtain local/remote outbound address.
Masahide NAKAMURA [Thu, 24 Aug 2006 01:10:33 +0000 (18:10 -0700)]
[XFRM] STATE: Add a hook to obtain local/remote outbound address.

Outbound transformation replaces both source and destination address with
state's end-point addresses at the same time when IPsec tunnel mode.
It is also required to change them for Mobile IPv6 route optimization, but we
should care about the following differences:
 - changing result is not end-point but care-of address
 - either source or destination is replaced for each state
This hook is a common platform to change outbound address.
Based on MIPL2 kernel patch.

Signed-off-by: Masahide NAKAMURA <nakam@linux-ipv6.org>
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[XFRM]: Rename secpath_has_tunnel to secpath_has_nontransport.
Masahide NAKAMURA [Thu, 24 Aug 2006 01:09:09 +0000 (18:09 -0700)]
[XFRM]: Rename secpath_has_tunnel to secpath_has_nontransport.

On current kernel inbound transformation state is allowed transport and
disallowed tunnel mode when mismatch is occurred between tempates and states.
As the result of adding two more modes by Mobile IPv6, this function name
is misleading. Inbound transformation can allow only transport mode
when mismatch is occurred between template and secpath.
Based on MIPL2 kernel patch.

Signed-off-by: Masahide NAKAMURA <nakam@linux-ipv6.org>
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[XFRM] STATE: Common receive function for route optimization extension headers.
Masahide NAKAMURA [Thu, 24 Aug 2006 01:08:21 +0000 (18:08 -0700)]
[XFRM] STATE: Common receive function for route optimization extension headers.

XFRM_STATE_WILDRECV flag is introduced; the last resort state is set
it and receives packet which is not route optimized but uses such
extension headers i.e. Mobile IPv6 signaling (binding update and
acknowledgement).  A node enabled Mobile IPv6 adds the state.

Based on MIPL2 kernel patch.

Signed-off-by: Masahide NAKAMURA <nakam@linux-ipv6.org>
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[XFRM]: Restrict authentication algorithm only when inbound transformation protocol...
Masahide NAKAMURA [Thu, 24 Aug 2006 01:00:48 +0000 (18:00 -0700)]
[XFRM]: Restrict authentication algorithm only when inbound transformation protocol is IPsec.

For Mobile IPv6 usage, routing header or destination options header is
used and it doesn't require this comparison. It is checked only for
IPsec template.

Based on MIPL2 kernel patch.

Signed-off-by: Masahide NAKAMURA <nakam@linux-ipv6.org>
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[XFRM] STATE: Introduce route optimization mode.
Masahide NAKAMURA [Thu, 24 Aug 2006 00:59:44 +0000 (17:59 -0700)]
[XFRM] STATE: Introduce route optimization mode.

Route optimization is used with routing header and destination options
header for Mobile IPv6.

At outbound it makes header space like IPsec transport. At inbound it
does nothing because exhdrs.c functions have responsibility to update
skbuff information for these headers.

Signed-off-by: Masahide NAKAMURA <nakam@linux-ipv6.org>
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[XFRM] STATE: Add a hook to find offset to be inserted header in outbound.
Masahide NAKAMURA [Thu, 24 Aug 2006 00:57:28 +0000 (17:57 -0700)]
[XFRM] STATE: Add a hook to find offset to be inserted header in outbound.

On current kernel, ip6_find_1stfragopt() is used by IPv6 IPsec to find
offset to be inserted header in outbound for transport mode. (BTW, no
usage may be needed for IPv4 case.)  Mobile IPv6 requires another
logic for routing header and destination options header
respectively. This patch is common platform for the offset and adopts
it to IPsec.

Based on MIPL2 kernel patch.

Signed-off-by: Masahide NAKAMURA <nakam@linux-ipv6.org>
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[XFRM] STATE: Search by address using source address list.
Masahide NAKAMURA [Thu, 24 Aug 2006 00:56:04 +0000 (17:56 -0700)]
[XFRM] STATE: Search by address using source address list.

This is a support to search transformation states by its addresses
by using source address list for Mobile IPv6 usage.
To use it from user-space, it is also added a message type for
source address as a xfrm state option.
Based on MIPL2 kernel patch.

Signed-off-by: Masahide NAKAMURA <nakam@linux-ipv6.org>
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[XFRM] STATE: Add source address list.
Masahide NAKAMURA [Thu, 24 Aug 2006 00:53:57 +0000 (17:53 -0700)]
[XFRM] STATE: Add source address list.

Support source address based searching.
Mobile IPv6 will use it.
Based on MIPL2 kernel patch.

Signed-off-by: Masahide NAKAMURA <nakam@linux-ipv6.org>
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[XFRM]: Expand XFRM_MAX_DEPTH for route optimization.
Masahide NAKAMURA [Thu, 24 Aug 2006 00:52:01 +0000 (17:52 -0700)]
[XFRM]: Expand XFRM_MAX_DEPTH for route optimization.

XFRM_MAX_DEPTH is a limit of transformation states to be applied to the same
flow. Two more extension headers are used by Mobile IPv6 transformation.
Based on MIPL2 kernel patch.

Signed-off-by: Masahide NAKAMURA <nakam@linux-ipv6.org>
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[XFRM] STATE: Allow non IPsec protocol.
Masahide NAKAMURA [Thu, 24 Aug 2006 00:49:52 +0000 (17:49 -0700)]
[XFRM] STATE: Allow non IPsec protocol.

It will be added two more transformation protocols (routing header
and destination options header) for Mobile IPv6.
xfrm_id_proto_match() can be handle zero as all, IPSEC_PROTO_ANY as
all IPsec and otherwise as exact one.
Based on MIPL2 kernel patch.

Signed-off-by: Masahide NAKAMURA <nakam@linux-ipv6.org>
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[XFRM]: Introduce a helper to compare id protocol.
Masahide NAKAMURA [Fri, 22 Sep 2006 22:06:24 +0000 (15:06 -0700)]
[XFRM]: Introduce a helper to compare id protocol.

Put the helper to header for future use.
Based on MIPL2 kernel patch.

Signed-off-by: Masahide NAKAMURA <nakam@linux-ipv6.org>
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[XFRM]: Add XFRM_MODE_xxx for future use.
Masahide NAKAMURA [Fri, 22 Sep 2006 22:05:15 +0000 (15:05 -0700)]
[XFRM]: Add XFRM_MODE_xxx for future use.

Transformation mode is used as either IPsec transport or tunnel.
It is required to add two more items, route optimization and inbound trigger
for Mobile IPv6.
Based on MIPL2 kernel patch.

This patch was also written by: Ville Nuorvala <vnuorval@tcs.hut.fi>

Signed-off-by: Masahide NAKAMURA <nakam@linux-ipv6.org>
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[IPV6] ROUTE: Unify RT6_F_xxx and RT6_SELECT_F_xxx flags
YOSHIFUJI Hideaki [Thu, 24 Aug 2006 00:25:05 +0000 (17:25 -0700)]
[IPV6] ROUTE: Unify RT6_F_xxx and RT6_SELECT_F_xxx flags

Unify RT6_F_xxx and RT6_SELECT_F_xxx flags into
RT6_LOOKUP_F_xxx flags, and put them into ip6_route.h

Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Acked-by: Ville Nuorvala <vnuorval@tcs.hut.fi
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[IPV6] KCONFIG: Add subtrees support.
YOSHIFUJI Hideaki [Thu, 24 Aug 2006 00:23:39 +0000 (17:23 -0700)]
[IPV6] KCONFIG: Add subtrees support.

This is for developers only.
Based on MIPL2 kernel patch.

Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: Ville Nuorvala <vnuorval@tcs.hut.fi
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[IPV6] ROUTE: Add credits about subtree fixes.
YOSHIFUJI Hideaki [Thu, 24 Aug 2006 00:23:25 +0000 (17:23 -0700)]
[IPV6] ROUTE: Add credits about subtree fixes.

Based on MIPL2 kernel patch.

Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[IPV6] NDISC: Search subtrees when backtracking on receipt of redirects.
YOSHIFUJI Hideaki [Thu, 24 Aug 2006 00:23:11 +0000 (17:23 -0700)]
[IPV6] NDISC: Search subtrees when backtracking on receipt of redirects.

Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Acked-by: Ville Nuorvala <vnuorval@tcs.hut.fi
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[IPV6] ROUTE: Purge clones on other trees when deleting a route.
YOSHIFUJI Hideaki [Thu, 24 Aug 2006 00:22:55 +0000 (17:22 -0700)]
[IPV6] ROUTE: Purge clones on other trees when deleting a route.

Based on MIPL2 kernel patch.

Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: Ville Nuorvala <vnuorval@tcs.hut.fi
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[IPV6] ROUTE: Search subtree when backtracking.
YOSHIFUJI Hideaki [Thu, 24 Aug 2006 00:22:39 +0000 (17:22 -0700)]
[IPV6] ROUTE: Search subtree when backtracking.

Based on MIPL2 kernel patch.

Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: Ville Nuorvala <vnuorval@tcs.hut.fi>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[IPV6] ROUTE: Put SUBTREE() as FIB6_SUBTREE() into ip6_fib.h for future use.
YOSHIFUJI Hideaki [Thu, 24 Aug 2006 00:22:24 +0000 (17:22 -0700)]
[IPV6] ROUTE: Put SUBTREE() as FIB6_SUBTREE() into ip6_fib.h for future use.

Based on MIPL2 kernel patch.

Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: Ville Nuorvala <vnuorval@tcs.hut.fi>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[IPV6] ROUTE: Allow searching subtree only.
YOSHIFUJI Hideaki [Thu, 24 Aug 2006 00:21:50 +0000 (17:21 -0700)]
[IPV6] ROUTE: Allow searching subtree only.

Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Acked-by: Ville Nuorvala <vnuorval@tcs.hut.fi>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[IPV6] ROUTE: Make sure we do not exceed args in fib6_lookup_1().
YOSHIFUJI Hideaki [Thu, 24 Aug 2006 00:21:29 +0000 (17:21 -0700)]
[IPV6] ROUTE: Make sure we do not exceed args in fib6_lookup_1().

Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Acked-by: Ville Nuorvala <vnuorval@tcs.hut.fi>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[IPV6] ROUTE: Fix looking up a route on subtree.
YOSHIFUJI Hideaki [Thu, 24 Aug 2006 00:21:12 +0000 (17:21 -0700)]
[IPV6] ROUTE: Fix looking up a route on subtree.

Even on RTN_ROOT node, we need to process its subtree first.
Fix NULL pointer dereference in fib6_locate().

Based on MIPL2 kernel patch.

Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: Ville Nuorvala <vnuorval@tcs.hut.fi>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[IPV6] ROUTE: Prune clones from main tree as well.
YOSHIFUJI Hideaki [Thu, 24 Aug 2006 00:20:54 +0000 (17:20 -0700)]
[IPV6] ROUTE: Prune clones from main tree as well.

Based on MIPL2 kernel patch.

Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: Ville Nuorvala <vnuorval@tcs.hut.fi>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[IPV6] ROUTE: Make sure we have fn->leaf when adding a node on subtree.
YOSHIFUJI Hideaki [Thu, 24 Aug 2006 00:20:34 +0000 (17:20 -0700)]
[IPV6] ROUTE: Make sure we have fn->leaf when adding a node on subtree.

Based on MIPL2 kernel patch.

Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: Ville Nuorvala <vnuorval@tcs.hut.fi>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[IPV6]: Cache source address as well in ipv6_pinfo{}.
YOSHIFUJI Hideaki [Wed, 30 Aug 2006 00:15:09 +0000 (17:15 -0700)]
[IPV6]: Cache source address as well in ipv6_pinfo{}.

Based on MIPL2 kernel patch.

Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: Ville Nuorvala <vnuorval@tcs.hut.fi>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[IPV6] ROUTE: Introduce a helper to check route validity.
YOSHIFUJI Hideaki [Thu, 24 Aug 2006 00:19:18 +0000 (17:19 -0700)]
[IPV6] ROUTE: Introduce a helper to check route validity.

Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Acked-by: Ville Nuorvala <vnuorval@tcs.hut.fi>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[IPV6] NDISC: Initialize fl with outbound interface to lookup rules properly.
YOSHIFUJI Hideaki [Thu, 24 Aug 2006 00:18:57 +0000 (17:18 -0700)]
[IPV6] NDISC: Initialize fl with outbound interface to lookup rules properly.

Based on MIPL2 kernel patch.

Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: Ville Nuorvala <vnuorval@tcs.hut.fi>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[IPV6] NDISC: Search over all possible rules on receipt of redirect.
YOSHIFUJI Hideaki [Thu, 24 Aug 2006 00:18:26 +0000 (17:18 -0700)]
[IPV6] NDISC: Search over all possible rules on receipt of redirect.

Split up function for finding routes for redirects.

Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[IPV6] NDISC: Take source address into account for redirects.
YOSHIFUJI Hideaki [Thu, 24 Aug 2006 00:12:24 +0000 (17:12 -0700)]
[IPV6] NDISC: Take source address into account for redirects.

Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: Ville Nuorvala <vnuorval@tcs.hut.fi>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[RTNETLINK]: Don't return error on no-metrics.
David S. Miller [Wed, 23 Aug 2006 05:20:14 +0000 (22:20 -0700)]
[RTNETLINK]: Don't return error on no-metrics.

Instead just cancel the nested attribute and return 0.

Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[NETFILTER]: x_tables: Fix typos after conversion to use mass registation helper
Thomas Graf [Tue, 22 Aug 2006 20:52:17 +0000 (13:52 -0700)]
[NETFILTER]: x_tables: Fix typos after conversion to use mass registation helper

Signed-off-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[SCTP]: Remove multiple levels of msecs to jiffies conversions.
Vladislav Yasevich [Tue, 22 Aug 2006 20:29:17 +0000 (13:29 -0700)]
[SCTP]: Remove multiple levels of msecs to jiffies conversions.

The SCTP sysctl entries are displayed in milliseconds, but stored
internally in jiffies. This results in multiple levels of msecs to
jiffies conversion and as a result produces a truncation error. This
patch makes things consistent in that we store and display defaults
in milliseconds and only convert once for use by association.
This patch also adds some sane min/max values so that we don't go off
the deep end.

Signed-off-by: Vladislav Yasevich <vladislav.yasevich@hp.com>
Signed-off-by: Sridhar Samudrala <sri@us.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[NETFILTER]: xt_tcpmss: minor cleanups
Patrick McHardy [Tue, 22 Aug 2006 07:44:14 +0000 (00:44 -0700)]
[NETFILTER]: xt_tcpmss: minor cleanups

- remove unused define
- remove useless wrapper function
- use new line for expression after condition

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[NETFILTER]: ip6_tables: consolidate dst and hbh matches
Patrick McHardy [Tue, 22 Aug 2006 07:43:55 +0000 (00:43 -0700)]
[NETFILTER]: ip6_tables: consolidate dst and hbh matches

The matches are identical besides one looking for NEXTHDR_HOP, the other
for NEXTHDR_DEST. Remove ip6t_dst.c and handle both in ip6t_hbh.c.

Signed-off-by: Patrick McHardy <kaber@trash,net>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[NETFILTER]: x_tables: add data member to struct xt_match
Patrick McHardy [Tue, 22 Aug 2006 07:43:38 +0000 (00:43 -0700)]
[NETFILTER]: x_tables: add data member to struct xt_match

Shared match functions can use this to make runtime decisions basen on the
used match.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[NETFILTER]: nfnetlink: remove unnecessary packed attributes
Patrick McHardy [Tue, 22 Aug 2006 07:43:20 +0000 (00:43 -0700)]
[NETFILTER]: nfnetlink: remove unnecessary packed attributes

Remove unnecessary packed attributes in nfnetlink structures. Unfortunately
in a few cases they have to stay to avoid changing structure sizes.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[NETFILTER]: x_tables: remove unused size argument to check/destroy functions
Patrick McHardy [Tue, 22 Aug 2006 07:36:37 +0000 (00:36 -0700)]
[NETFILTER]: x_tables: remove unused size argument to check/destroy functions

The size is verified by x_tables and isn't needed by the modules anymore.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[NETFILTER]: x_tables: remove unused argument to target functions
Patrick McHardy [Tue, 22 Aug 2006 07:35:47 +0000 (00:35 -0700)]
[NETFILTER]: x_tables: remove unused argument to target functions

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[NETFILTER]: x_tables: make use of mass registation helpers
Patrick McHardy [Tue, 22 Aug 2006 07:34:04 +0000 (00:34 -0700)]
[NETFILTER]: x_tables: make use of mass registation helpers

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[NETFILTER]: x_tables: add helpers for mass match/target registration
Patrick McHardy [Tue, 22 Aug 2006 07:33:45 +0000 (00:33 -0700)]
[NETFILTER]: x_tables: add helpers for mass match/target registration

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[NETFILTER]: xt_CONNMARK: use tabs for indentation
Patrick McHardy [Tue, 22 Aug 2006 07:33:26 +0000 (00:33 -0700)]
[NETFILTER]: xt_CONNMARK: use tabs for indentation

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[NETFILTER]: replace open coded checksum updates
Patrick McHardy [Tue, 22 Aug 2006 07:33:09 +0000 (00:33 -0700)]
[NETFILTER]: replace open coded checksum updates

Replace open coded checksum update by nf_csum_update calls and clean up
the surrounding code a bit.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[NETFILTER]: nfnetlink_queue: fix typo in error message
Patrick McHardy [Tue, 22 Aug 2006 07:32:47 +0000 (00:32 -0700)]
[NETFILTER]: nfnetlink_queue: fix typo in error message

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[NETFILTER]: ctnetlink: remove impossible events tests for updates
Pablo Neira Ayuso [Tue, 22 Aug 2006 07:32:23 +0000 (00:32 -0700)]
[NETFILTER]: ctnetlink: remove impossible events tests for updates

IPCT_HELPER and IPCT_NATINFO bits are never set on updates.

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[NETFILTER]: ctnetlink: check for listeners before sending expectation events
Pablo Neira Ayuso [Tue, 22 Aug 2006 07:32:05 +0000 (00:32 -0700)]
[NETFILTER]: ctnetlink: check for listeners before sending expectation events

This patch uses nfnetlink_has_listeners to check for listeners in
userspace.

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[NETFILTER]: ctnetlink: dump connection mark
Pablo Neira Ayuso [Tue, 22 Aug 2006 07:31:49 +0000 (00:31 -0700)]
[NETFILTER]: ctnetlink: dump connection mark

ctnetlink dumps the mark iif the event mark happened

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[NETFILTER]: conntrack: introduce connection mark event
Pablo Neira Ayuso [Tue, 22 Aug 2006 07:31:24 +0000 (00:31 -0700)]
[NETFILTER]: conntrack: introduce connection mark event

This patch introduces the mark event. ctnetlink can use this to know if
the mark needs to be dumped.

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[NETFILTER]: ipt_recent: add module parameter for changing ownership of /proc/net...
Daniel De Graaf [Tue, 22 Aug 2006 07:30:55 +0000 (00:30 -0700)]
[NETFILTER]: ipt_recent: add module parameter for changing ownership of /proc/net/ipt_recent/*

Signed-off-by: Daniel De Graaf <danield@iastate.edu>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[NETFILTER]: x_tables: replace IPv4 DSCP target by address family independent version
Yasuyuki Kozakai [Tue, 22 Aug 2006 07:30:26 +0000 (00:30 -0700)]
[NETFILTER]: x_tables: replace IPv4 DSCP target by address family independent version

This replaces IPv4 DSCP target by address family independent version.
This also
- utilizes dsfield.h to get/mangle DS field in IPv4/IPv6 header
- fixes Kconfig help text.

Signed-off-by: Yasuyuki Kozakai <yasuyuki.kozakai@toshiba.co.jp>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[NETFILTER]: x_tables: replace IPv4 dscp match by address family independent version
Yasuyuki Kozakai [Tue, 22 Aug 2006 07:29:37 +0000 (00:29 -0700)]
[NETFILTER]: x_tables: replace IPv4 dscp match by address family independent version

This replaces IPv4 dscp match by address family independent version.
This also
- utilizes dsfield.h to get the DS field in IPv4/IPv6 header, and
- checks for the DSCP value from user space.
- fixes Kconfig help text.

Signed-off-by: Yasuyuki Kozakai <yasuyuki.kozakai@toshiba.co.jp>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[TG3]: Convert the pci_device_id table to PCI_DEVICE()
Henrik Kretzschmar [Tue, 22 Aug 2006 07:28:33 +0000 (00:28 -0700)]
[TG3]: Convert the pci_device_id table to PCI_DEVICE()

Convert the pci_device_ids to PCI_DEVICE() macro.  Saves 1.5k in the
sourcefile.

Signed-off-by: Henrik Kretzschmar <henne@nachtwindheim.de>
Acked-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[SCTP]: Use the flags value that is passed as an arg to sctp_accept.
Sridhar Samudrala [Tue, 22 Aug 2006 07:24:09 +0000 (00:24 -0700)]
[SCTP]: Use the flags value that is passed as an arg to sctp_accept.

No need to do multiple dereferences - sk->sk_socket->file->f_flags

Signed-off-by: Sridhar Samudrala <sri@us.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[SCTP]: Fix IPv6 address flag setting when doing peel-off/accept.
Vladislav Yasevich [Tue, 22 Aug 2006 07:23:13 +0000 (00:23 -0700)]
[SCTP]: Fix IPv6 address flag setting when doing peel-off/accept.

During accept/peeloff we try to copy the list of bound addresses from
the original endpoint to the new one. However, we forgot to set the flag
to say that IPv6 is allowed on the new endpoint.

Signed-off-by: Vladislav Yasevich <vladislav.yasevich@hp.com>
Signed-off-by: Sridhar Samudrala <sri@us.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>