10 Dec, 2013
3 commits
-
Signed-off-by: Jiri Pirko
Signed-off-by: David S. Miller -
This will be needed later on to provide better management of default values.
Signed-off-by: Jiri Pirko
Signed-off-by: David S. Miller -
This patch converts the neigh param members to an array. This allows easier
manipulation which will be needed later on to provide better management of
default values.Signed-off-by: Jiri Pirko
Signed-off-by: David S. Miller
03 Dec, 2013
1 commit
-
when dealing with a RA message, if accept_ra_defrtr is false,
the kernel will not add the default route, and then deal with
the following route information options. Unfortunately, those
options maybe contain default route, so let's judge the
accept_ra_defrtr before calling rt6_route_rcv.Signed-off-by: Duan Jiong
Signed-off-by: David S. Miller
19 Nov, 2013
1 commit
-
When CONFIG_SYSCTL=n the following build warning happens:
net/ipv6/ndisc.c:1730:1: warning: label 'out' defined but not used [-Wunused-label]
The 'out' label is only used when CONFIG_SYSCTL=y, so move it inside the
'ifdef CONFIG_SYSCTL' block.Signed-off-by: Fabio Estevam
Signed-off-by: David S. Miller
12 Sep, 2013
1 commit
-
When loading the ipv6 module, ndisc_init() is called before
ip6_route_init(). As the former registers a handler calling
fib6_run_gc(), this opens a window to run the garbage collector
before necessary data structures are initialized. If a network
device is initialized in this window, adding MAC address to it
triggers a NETDEV_CHANGEADDR event, leading to a crash in
fib6_clean_all().Take the event handler registration out of ndisc_init() into a
separate function ndisc_late_init() and move it after
ip6_route_init().Signed-off-by: Michal Kubecek
Signed-off-by: David S. Miller
06 Sep, 2013
2 commits
-
Conflicts:
drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
net/bridge/br_multicast.c
net/ipv6/sit.cThe conflicts were minor:
1) sit.c changes overlap with change to ip_tunnel_xmit() signature.
2) br_multicast.c had an overlap between computing max_delay using
msecs_to_jiffies and turning MLDV2_MRC() into an inline function
with a name using lowercase instead of uppercase letters.3) stmmac had two overlapping changes, one which conditionally allocated
and hooked up a dma_cfg based upon the presence of the pbl OF property,
and another one handling store-and-forward DMA made. The latter of
which should not go into the new of_find_property() basic block.Signed-off-by: David S. Miller
-
RFC 4861 says that the IP source address of the Redirect is the
same as the current first-hop router for the specified ICMP
Destination Address, so the gateway should be taken into
consideration when we find the route for redirect.There was once a check in commit
a6279458c534d01ccc39498aba61c93083ee0372 ("NDISC: Search over
all possible rules on receipt of redirect.") and the check
went away in commit b94f1c0904da9b8bf031667afc48080ba7c3e8c9
("ipv6: Use icmpv6_notify() to propagate redirect, instead of
rt6_redirect()").The bug is only "exploitable" on layer-2 because the source
address of the redirect is checked to be a valid link-local
address but it makes spoofing a lot easier in the same L2
domain nonetheless.Thanks very much for Hannes's help.
Signed-off-by: Duan Jiong
Acked-by: Hannes Frederic Sowa
Signed-off-by: David S. Miller
05 Sep, 2013
1 commit
-
Allocating skbs when sending out neighbour discovery messages
currently uses sock_alloc_send_skb() based on a per net namespace
socket and thus share a socket wmem buffer space.If a netdevice is temporarily unable to transmit due to carrier
loss or for other reasons, the queued up ndisc messages will cosnume
all of the wmem space and will thus prevent from any more skbs to
be allocated even for netdevices that are able to transmit packets.The number of neighbour discovery messages sent is very limited,
use of alloc_skb() bypasses the socket wmem buffer size enforcement
while the manual call to skb_set_owner_w() maintains the socket
reference needed for the IPv6 output path.This patch has orginally been posted by Eric Dumazet in a modified
form.Signed-off-by: Thomas Graf
Cc: Eric Dumazet
Cc: Hannes Frederic Sowa
Cc: Stephen Warren
Cc: Fabio Estevam
Tested-by: Fabio Estevam
Tested-by: Stephen Warren
Acked-by: Hannes Frederic Sowa
Signed-off-by: David S. Miller
04 Sep, 2013
1 commit
-
This config option is superfluous in that it only guards a call
to neigh_app_ns(). Enabling CONFIG_ARPD by default has no
change in behavior. There will now be call to __neigh_notify()
for each ARP resolution, which has no impact unless there is a
user space daemon waiting to receive the notification, i.e.,
the case for which CONFIG_ARPD was designed anyways.Suggested-by: Eric W. Biederman
Cc: "David S. Miller"
Cc: Alexey Kuznetsov
Cc: James Morris
Cc: Hideaki YOSHIFUJI
Cc: Patrick McHardy
Cc: "Eric W. Biederman"
Cc: Gao feng
Cc: Joe Perches
Cc: Veaceslav Falico
Signed-off-by: Tim Gardner
Reviewed-by: "Eric W. Biederman"
Signed-off-by: David S. Miller
01 Sep, 2013
1 commit
-
This patch adds the IPv6 version of "arp_reduce", ndisc_send_na()
will be needed.Cc: David S. Miller
Cc: David Stevens
Signed-off-by: Cong Wang
Signed-off-by: David S. Miller
31 Aug, 2013
1 commit
-
A sk variable initialized to ndisc_sk is already available outside
of the branch.Signed-off-by: Thomas Graf
Signed-off-by: David S. Miller
30 Aug, 2013
1 commit
-
This patch implements RFC6980: Drop fragmented ndisc packets by
default. If a fragmented ndisc packet is received the user is informed
that it is possible to disable the check.Cc: Fernando Gont
Cc: YOSHIFUJI Hideaki
Signed-off-by: Hannes Frederic Sowa
Signed-off-by: David S. Miller
23 Aug, 2013
1 commit
-
rfc 4861 says the Redirected Header option is optional, so
the kernel should not drop the Redirect Message that has no
Redirected Header option. In this patch, the function
ip6_redirect_no_header() is introduced to deal with that
condition.Signed-off-by: Duan Jiong
Acked-by: Hannes Frederic Sowa
02 Aug, 2013
1 commit
-
On a high-traffic router with many processors and many IPv6 dst
entries, soft lockup in fib6_run_gc() can occur when number of
entries reaches gc_thresh.This happens because fib6_run_gc() uses fib6_gc_lock to allow
only one thread to run the garbage collector but ip6_dst_gc()
doesn't update net->ipv6.ip6_rt_last_gc until fib6_run_gc()
returns. On a system with many entries, this can take some time
so that in the meantime, other threads pass the tests in
ip6_dst_gc() (ip6_rt_last_gc is still not updated) and wait for
the lock. They then have to run the garbage collector one after
another which blocks them for quite long.Resolve this by replacing special value ~0UL of expire parameter
to fib6_run_gc() by explicit "force" parameter to choose between
spin_lock_bh() and spin_trylock_bh() and call fib6_run_gc() with
force=false if gc_thresh is reached but not max_size.Signed-off-by: Michal Kubecek
Signed-off-by: David S. Miller
17 Jul, 2013
1 commit
-
Signed-off-by: Daniel Baluta
Signed-off-by: David S. Miller
20 Jun, 2013
1 commit
-
Conflicts:
drivers/net/wireless/ath/ath9k/Kconfig
drivers/net/xen-netback/netback.c
net/batman-adv/bat_iv_ogm.c
net/wireless/nl80211.cThe ath9k Kconfig conflict was a change of a Kconfig option name right
next to the deletion of another option.The xen-netback conflict was overlapping changes involving the
handling of the notify list in xen_netbk_rx_action().Batman conflict resolution provided by Antonio Quartulli, basically
keep everything in both conflict hunks.The nl80211 conflict is a little more involved. In 'net' we added a
dynamic memory allocation to nl80211_dump_wiphy() to fix a race that
Linus reported. Meanwhile in 'net-next' the handlers were converted
to use pre and post doit handlers which use a flag to determine
whether to hold the RTNL mutex around the operation.However, the dump handlers to not use this logic. Instead they have
to explicitly do the locking. There were apparent bugs in the
conversion of nl80211_dump_wiphy() in that we were not dropping the
RTNL mutex in all the return paths, and it seems we very much should
be doing so. So I fixed that whilst handling the overlapping changes.To simplify the initial returns, I take the RTNL mutex after we try
to allocate 'tb'.Signed-off-by: David S. Miller
18 Jun, 2013
1 commit
-
Since some refactoring in 5f5a011, ndisc_send_redirect called
ndisc_fill_redirect_hdr_option on the wrong skb, leading to data corruption or
in the worst case a panic when the skb_put failed.Signed-off-by: Matthias Schiffer
Reviewed-by: Cong Wang
Signed-off-by: David S. Miller
29 May, 2013
2 commits
-
This corrects an regression introduced by "net: Use 16bits for *_headers
fields of struct skbuff" when NET_SKBUFF_DATA_USES_OFFSET is not set. In
that case skb->tail will be a pointer whereas skb->transport_header
will be an offset from head. This is corrected by using wrappers that
ensure that comparisons and calculations are always made using pointers.Signed-off-by: Simon Horman
Signed-off-by: David S. Miller -
So far, only net_device * could be passed along with netdevice notifier
event. This patch provides a possibility to pass custom structure
able to provide info that event listener needs to know.Signed-off-by: Jiri Pirko
v2->v3: fix typo on simeth
shortened dev_getter
shortened notifier_info struct name
v1->v2: fix notifier_call parameter in call_netdevice_notifier()
Signed-off-by: David S. Miller
09 Mar, 2013
1 commit
-
send_sllao is already initialized with the value of dev->addr_len
Cc: Hideaki YOSHIFUJI
Signed-off-by: Thomas Graf
Acked-by: YOSHIFUJI Hideaki
Signed-off-by: David S. Miller
22 Jan, 2013
19 commits
-
Signed-off-by: YOSHIFUJI Hideaki
Signed-off-by: David S. Miller -
Construct NS/NA/RS message directly using C99 compound literals.
Signed-off-by: YOSHIFUJI Hideaki
Signed-off-by: David S. Miller -
Signed-off-by: YOSHIFUJI Hideaki
Signed-off-by: David S. Miller -
Signed-off-by: YOSHIFUJI Hideaki
Signed-off-by: David S. Miller -
Reuse dst if one is attached with skb.
Signed-off-by: YOSHIFUJI Hideaki
Signed-off-by: David S. Miller -
skb_transport_header() (thus icmp6_hdr()) is available here,
use it.Signed-off-by: YOSHIFUJI Hideaki
Signed-off-by: David S. Miller -
Signed-off-by: YOSHIFUJI Hideaki
Signed-off-by: David S. Miller -
Signed-off-by: YOSHIFUJI Hideaki
Signed-off-by: David S. Miller -
Signed-off-by: YOSHIFUJI Hideaki
Signed-off-by: David S. Miller -
Build ICMPv6 message first and make buffer management easier;
we can use skb->len when filling checksum in ICMPv6 header,
and then build IP header with length field.Signed-off-by: YOSHIFUJI Hideaki
Signed-off-by: David S. Miller -
Since we have skb->dev, use it.
Signed-off-by: YOSHIFUJI Hideaki
Signed-off-by: David S. Miller -
Signed-off-by: YOSHIFUJI Hideaki
Signed-off-by: David S. Miller -
Signed-off-by: YOSHIFUJI Hideaki
Signed-off-by: David S. Miller -
- move ip6_nd_hdr() to its users' source files.
In net/ipv6/mcast.c, it will be called ip6_mc_hdr().
- make return type to void since this function never fails.Signed-off-by: YOSHIFUJI Hideaki
Signed-off-by: David S. Miller -
Signed-off-by: YOSHIFUJI Hideaki
Signed-off-by: David S. Miller -
Signed-off-by: YOSHIFUJI Hideaki
Signed-off-by: David S. Miller -
Suggested by Eric Dumazet .
Signed-off-by: YOSHIFUJI Hideaki
Signed-off-by: David S. Miller -
This also makes ndisc_opt_addr_data() and ndisc_fill_addr_option()
use ndisc_opt_addr_space().Signed-off-by: YOSHIFUJI Hideaki
Signed-off-by: David S. Miller -
Add pointer to struct net_device (dev) and remove
data_len (= dev->addr_len) and addr_type (= dev->type).Signed-off-by: YOSHIFUJI Hideaki
Signed-off-by: David S. Miller