11 Jul, 2007

3 commits

  • Make all initialized struct seq_operations in net/ const

    Signed-off-by: Philippe De Muyter
    Signed-off-by: David S. Miller

    Philippe De Muyter
     
  • This patch makes MIPv6 loadable module named "mip6".

    Here is a modprobe.conf(5) example to load it automatically
    when user application uses XFRM state for MIPv6:

    alias xfrm-type-10-43 mip6
    alias xfrm-type-10-60 mip6

    Some MIPv6 feature is not included by this modular, however,
    it should not be affected to other features like either IPsec
    or IPv6 with and without the patch.
    We may discuss XFRM, MH (RAW socket) and ancillary data/sockopt
    separately for future work.

    Loadable features:
    * MH receiving check (to send ICMP error back)
    * RO header parsing and building (i.e. RH2 and HAO in DSTOPTS)
    * XFRM policy/state database handling for RO

    These are NOT covered as loadable:
    * Home Address flags and its rule on source address selection
    * XFRM sub policy (depends on its own kernel option)
    * XFRM functions to receive RO as IPv6 extension header
    * MH sending/receiving through raw socket if user application
    opens it (since raw socket allows to do so)
    * RH2 sending as ancillary data
    * RH2 operation with setsockopt(2)

    Signed-off-by: Masahide NAKAMURA
    Signed-off-by: David S. Miller

    Masahide NAKAMURA
     
  • Kill unnecessary CONFIG_IPV6_MIP6.

    o It is redundant for RAW socket to keep MH out with the config then
    it can handle any protocol.
    o Clean-up at AH.

    Signed-off-by: Masahide NAKAMURA
    Signed-off-by: David S. Miller

    Masahide NAKAMURA
     

25 May, 2007

1 commit

  • The current IPSEC rule resolution behavior we have does not work for a
    lot of people, even though technically it's an improvement from the
    -EAGAIN buisness we had before.

    Right now we'll block until the key manager resolves the route. That
    works for simple cases, but many folks would rather packets get
    silently dropped until the key manager resolves the IPSEC rules.

    We can't tell these folks to "set the socket non-blocking" because
    they don't have control over the non-block setting of things like the
    sockets used to resolve DNS deep inside of the resolver libraries in
    libc.

    With that in mind I coded up the patch below with some help from
    Herbert Xu which provides packet-drop behavior during larval state
    resolution, controllable via sysctl and off by default.

    This lays the framework to either:

    1) Make this default at some point or...

    2) Move this logic into xfrm{4,6}_policy.c and implement the
    ARP-like resolution queue we've all been dreaming of.
    The idea would be to queue packets to the policy, then
    once the larval state is resolved by the key manager we
    re-resolve the route and push the packets out. The
    packets would timeout if the rule didn't get resolved
    in a certain amount of time.

    Signed-off-by: David S. Miller

    David S. Miller
     

26 Apr, 2007

10 commits


03 Apr, 2007

1 commit

  • In article (at Thu, 29 Mar 2007 14:26:44 -0700 (PDT)), David Miller says:

    > From: Sridhar Samudrala
    > Date: Thu, 29 Mar 2007 14:17:28 -0700
    >
    > > The check for length in rawv6_sendmsg() is incorrect.
    > > As len is an unsigned int, (len < 0) will never be TRUE.
    > > I think checking for IPV6_MAXPLEN(65535) is better.
    > >
    > > Is it possible to send ipv6 jumbo packets using raw
    > > sockets? If so, we can remove this check.
    >
    > I don't see why such a limitation against jumbo would exist,
    > does anyone else?
    >
    > Thanks for catching this Sridhar. A good compiler should simply
    > fail to compile "if (x < 0)" when 'x' is an unsigned type, don't
    > you think :-)

    Dave, we use "int" for returning value,
    so we should fix this anyway, IMHO;
    we should not allow len > INT_MAX.

    Signed-off-by: YOSHIFUJI Hideaki
    Acked-by: Sridhar Samudrala
    Signed-off-by: David S. Miller

    YOSHIFUJI Hideaki
     

15 Feb, 2007

1 commit

  • After Al Viro (finally) succeeded in removing the sched.h #include in module.h
    recently, it makes sense again to remove other superfluous sched.h includes.
    There are quite a lot of files which include it but don't actually need
    anything defined in there. Presumably these includes were once needed for
    macros that used to live in sched.h, but moved to other header files in the
    course of cleaning it up.

    To ease the pain, this time I did not fiddle with any header files and only
    removed #includes from .c-files, which tend to cause less trouble.

    Compile tested against 2.6.20-rc2 and 2.6.20-rc2-mm2 (with offsets) on alpha,
    arm, i386, ia64, mips, powerpc, and x86_64 with allnoconfig, defconfig,
    allmodconfig, and allyesconfig as well as a few randconfigs on x86_64 and all
    configs in arch/arm/configs on arm. I also checked that no new warnings were
    introduced by the patch (actually, some warnings are removed that were emitted
    by unnecessarily included header files).

    Signed-off-by: Tim Schmielau
    Acked-by: Russell King
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Tim Schmielau
     

13 Feb, 2007

1 commit

  • Many struct file_operations in the kernel can be "const". Marking them const
    moves these to the .rodata section, which avoids false sharing with potential
    dirty data. In addition it'll catch accidental writes at compile time to
    these shared resources.

    Signed-off-by: Arjan van de Ven
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Arjan van de Ven
     

11 Feb, 2007

1 commit


09 Feb, 2007

2 commits


07 Dec, 2006

1 commit

  • When user builds IPv6 header and send it through raw socket, kernel
    tries to release unlocked sock. (Kernel log shows
    "BUG: bad unlock balance detected" with enabled debug option.)

    The lock is held only for non-hdrincl sock in this function
    then this patch fix to do nothing about lock for hdrincl one.

    Signed-off-by: Masahide NAKAMURA
    Signed-off-by: David S. Miller

    Masahide NAKAMURA
     

03 Dec, 2006

7 commits


31 Oct, 2006

1 commit


23 Sep, 2006

4 commits

  • 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
    Signed-off-by: YOSHIFUJI Hideaki
    Signed-off-by: David S. Miller

    Masahide NAKAMURA
     
  • 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
    This patch was also written by: Antti Tuominen

    Signed-off-by: Masahide NAKAMURA
    Signed-off-by: YOSHIFUJI Hideaki
    Signed-off-by: David S. Miller

    Masahide NAKAMURA
     
  • Replace CHECKSUM_HW by CHECKSUM_PARTIAL (for outgoing packets, whose
    checksum still needs to be completed) and CHECKSUM_COMPLETE (for
    incoming packets, device supplied full checksum).

    Patch originally from Herbert Xu, updated by myself for 2.6.18-rc3.

    Signed-off-by: Patrick McHardy
    Signed-off-by: David S. Miller

    Patrick McHardy
     
  • This labels the flows that could utilize IPSec xfrms at the points the
    flows are defined so that IPSec policy and SAs at the right label can
    be used.

    The following protos are currently not handled, but they should
    continue to be able to use single-labeled IPSec like they currently
    do.

    ipmr
    ip_gre
    ipip
    igmp
    sit
    sctp
    ip6_tunnel (IPv6 over IPv6 tunnel device)
    decnet

    Signed-off-by: Venkat Yekkirala
    Signed-off-by: David S. Miller

    Venkat Yekkirala
     

18 Sep, 2006

1 commit


26 Jul, 2006

1 commit

  • From: Tetsuo Handa from-linux-kernel@i-love.sakura.ne.jp

    The recvmsg() for raw socket seems to return random u16 value
    from the kernel stack memory since port field is not initialized.
    But I'm not sure this patch is correct.
    Does raw socket return any information stored in port field?

    [ BSD defines RAW IP recvmsg to return a sin_port value of zero.
    This is described in Steven's TCP/IP Illustrated Volume 2 on
    page 1055, which is discussing the BSD rip_input() implementation. ]

    Acked-by: YOSHIFUJI Hideaki
    Signed-off-by: David S. Miller

    Tetsuo Handa
     

21 Mar, 2006

3 commits


14 Feb, 2006

1 commit


08 Feb, 2006

1 commit