01 Aug, 2015

1 commit

  • This patch adds net argument to ipv6_stub_impl.ipv6_dst_lookup
    for use cases where sk is not available (like mpls).
    sk appears to be needed to get the namespace 'net' and is optional
    otherwise. This patch series changes ipv6_stub_impl.ipv6_dst_lookup
    to take net argument. sk remains optional.

    All callers of ipv6_stub_impl.ipv6_dst_lookup have been modified
    to pass net. I have modified them to use already available
    'net' in the scope of the call. I can change them to
    sock_net(sk) to avoid any unintended change in behaviour if sock
    namespace is different. They dont seem to be from code inspection.

    Signed-off-by: Roopa Prabhu
    Signed-off-by: David S. Miller

    Roopa Prabhu
     

09 Jun, 2015

1 commit

  • The memory pointed to by idev->stats.icmpv6msgdev,
    idev->stats.icmpv6dev and idev->stats.ipv6 can each be used in an RCU
    read context without taking a reference on idev. For example, through
    IP6_*_STATS_* calls in ip6_rcv. These memory blocks are freed without
    waiting for an RCU grace period to elapse. This could lead to the
    memory being written to after it has been freed.

    Fix this by using call_rcu to free the memory used for stats, as well
    as idev after an RCU grace period has elapsed.

    Signed-off-by: Robert Shearman
    Acked-by: Hannes Frederic Sowa
    Signed-off-by: David S. Miller

    Robert Shearman
     

01 Apr, 2015

1 commit

  • The ipv6 code uses a mixture of coding styles. In some instances check for NULL
    pointer is done as x != NULL and sometimes as x. x is preferred according to
    checkpatch and this patch makes the code consistent by adopting the latter
    form.

    No changes detected by objdiff.

    Signed-off-by: Ian Morris
    Signed-off-by: David S. Miller

    Ian Morris
     

01 Oct, 2014

1 commit

  • Eric Dumazet noticed that all no-nonexthop or no-gateway routes which
    are already marked DST_HOST (e.g. input routes routes) will always be
    invalidated during sk_dst_check. Thus per-socket dst caching absolutely
    had no effect and early demuxing had no effect.

    Thus this patch removes rt6i_genid: fn_sernum already gets modified during
    add operations, so we only must ensure we mutate fn_sernum during ipv6
    address remove operations. This is a fairly cost extensive operations,
    but address removal should not happen that often. Also our mtu update
    functions do the same and we heard no complains so far. xfrm policy
    changes also cause a call into fib6_flush_trees. Also plug a hole in
    rt6_info (no cacheline changes).

    I verified via tracing that this change has effect.

    Cc: Eric Dumazet
    Cc: YOSHIFUJI Hideaki
    Cc: Vlad Yasevich
    Cc: Nicolas Dichtel
    Cc: Martin Lau
    Signed-off-by: Hannes Frederic Sowa
    Signed-off-by: David S. Miller

    Hannes Frederic Sowa
     

08 May, 2014

1 commit

  • commit 8f0ea0fe3a036a47767f9c80e (snmp: reduce percpu needs by 50%)
    reduced snmp array size to 1, so technically it doesn't have to be
    an array any more. What's more, after the following commit:

    commit 933393f58fef9963eac61db8093689544e29a600
    Date: Thu Dec 22 11:58:51 2011 -0600

    percpu: Remove irqsafe_cpu_xxx variants

    We simply say that regular this_cpu use must be safe regardless of
    preemption and interrupt state. That has no material change for x86
    and s390 implementations of this_cpu operations. However, arches that
    do not provide their own implementation for this_cpu operations will
    now get code generated that disables interrupts instead of preemption.

    probably no arch wants to have SNMP_ARRAY_SZ == 2. At least after
    almost 3 years, no one complains.

    So, just convert the array to a single pointer and remove snmp_mib_init()
    and snmp_mib_free() as well.

    Cc: Christoph Lameter
    Cc: Eric Dumazet
    Cc: David S. Miller
    Signed-off-by: Cong Wang
    Signed-off-by: David S. Miller

    WANG Cong
     

01 Sep, 2013

3 commits


25 Jun, 2013

1 commit

  • commit f88c91ddba95 ("ipv6: statically link
    register_inet6addr_notifier()" added following sparse warnings :

    net/ipv6/addrconf_core.c:83:5: warning: symbol
    'register_inet6addr_notifier' was not declared. Should it be static?
    net/ipv6/addrconf_core.c:89:5: warning: symbol
    'unregister_inet6addr_notifier' was not declared. Should it be static?
    net/ipv6/addrconf_core.c:95:5: warning: symbol
    'inet6addr_notifier_call_chain' was not declared. Should it be static?

    Signed-off-by: Eric Dumazet
    Cc: Cong Wang
    Signed-off-by: David S. Miller

    Eric Dumazet
     

15 Apr, 2013

1 commit

  • Tomas reported the following build error:

    net/built-in.o: In function `ieee80211_unregister_hw':
    (.text+0x10f0e1): undefined reference to `unregister_inet6addr_notifier'
    net/built-in.o: In function `ieee80211_register_hw':
    (.text+0x10f610): undefined reference to `register_inet6addr_notifier'
    make: *** [vmlinux] Error 1

    when built IPv6 as a module.

    So we have to statically link these symbols.

    Reported-by: Tomas Melin
    Cc: Tomas Melin
    Cc: "David S. Miller"
    Cc: YOSHIFUJI Hidaki
    Signed-off-by: Cong Wang
    Signed-off-by: David S. Miller

    Cong Wang
     

16 Apr, 2012

1 commit


02 Apr, 2012

1 commit


01 Nov, 2011

1 commit


26 Feb, 2010

1 commit

  • RFC 4291 section 2.4 states that all uncategorized addresses
    should be considered as Global Unicast.

    This will remove IPV6_ADDR_RESERVED completely
    and return IPV6_ADDR_UNICAST in ipv6_addr_type() instead.

    Signed-off-by: Ulrich Weber
    Signed-off-by: David S. Miller

    Ulrich Weber
     

31 Jul, 2007

1 commit

  • ipv6_addr_type() doesn't check for 'Unique Local IPv6 Unicast
    Addresses' (RFC4193) and returns IPV6_ADDR_RESERVED for that range.

    SCTP uses this function and will fail bind() and connect() calls that
    use RFC4193 addresses, SCTP will also ignore inbound connections from
    RFC4193 addresses if listening on IPV6_ADDR_ANY.

    There may be other users of ipv6_addr_type() that could also have
    problems.

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

    Dave Johnson
     

27 Feb, 2007

2 commits