17 Jul, 2012
3 commits
-
Lenght field should be encoded using big endian byte order, such as intend in the specs.
As it is currently written, the len field would not be decoded properly on an implementation using the correct byte ordering. Hence, it could lead to interroperability issues.Also, I rewrote the code so that iphc0 argument of lowpan_alloc_new_frame could be removed.
Signed-off-by: Tony Cheneau
Signed-off-by: David S. Miller -
The tag field should be stored and accessed using big endian byte order (as
intended in the specs). Or else, when displayed with a trafic analyser, such a
Wireshark, the field not properly displayed (e.g. 0x01 00 instead of 0x00 01,
and so on).Signed-off-by: Tony Cheneau
Signed-off-by: David S. Miller -
When a UDP packet gets fragmented, a crash will occur at reassembly time.
This is because skb->transport_header is not set during earlier period of fragment reassembly.
As a consequence, call to udp_hdr() return NULL and uh (which is NULL) gets
dereferenced without much test.Signed-off-by: Tony Cheneau
Signed-off-by: David S. Miller
12 Jul, 2012
4 commits
-
6lowpan module starts collecting incomming frames and fragments
right after lowpan_module_init() therefor it will be better to
clean unfinished fragments in lowpan_cleanup_module() function
instead of doing it when link goes down.Changed spinlocks type to prevent deadlock with expired timer event
and removed unused one.Signed-off-by: Alexander Smirnov
Signed-off-by: David S. Miller -
Function lowpan_alloc_new_frame() takes u8 tag as an argument. However,
its only caller, lowpan_process_data() passes down a u16. Hence,
the tag value can get corrupted. This prevent 6lowpan fragment reassembly of a
message when the fragment tag value is over 256.Signed-off-by: Alexander Smirnov
Cc: Tony Cheneau
Signed-off-by: David S. Miller -
Use netdev_alloc_skb_ip_align() instead of alloc_skb() to get some
extra headroom in case we need to forward this frame in a tunnel or
something else.Signed-off-by: Alexander Smirnov
Signed-off-by: David S. Miller -
Revert the commit 768f7c7c121e80f458a9d013b2e8b169e5dfb1e5 to initialize
spinlock in the more preferable way and make it static to avoid sparse
warning.Signed-off-by: Alexander Smirnov
Signed-off-by: David S. Miller
11 Jul, 2012
1 commit
-
Conflicts:
net/batman-adv/bridge_loop_avoidance.c
net/batman-adv/bridge_loop_avoidance.h
net/batman-adv/soft-interface.c
net/mac80211/mlme.cWith merge help from Antonio Quartulli (batman-adv) and
Stephen Rothwell (drivers/net/usb/qmi_wwan.c).The net/mac80211/mlme.c conflict seemed easy enough, accounting for a
conversion to some new tracing macros.Signed-off-by: David S. Miller
09 Jul, 2012
1 commit
-
Currently when sending data over datagram, the send function will attempt to
allocate any size passed on from the userspace.We should make sure that this size is checked and limited. We'll limit it
to the MTU of the device, which is checked later anyway.Signed-off-by: Sasha Levin
Signed-off-by: David S. Miller
05 Jul, 2012
1 commit
-
This reverts the commit cdf49c283e2e105da86ca575ad35b453f5ff24ea which
replaces lowpan '.ndo_set_mac_address' method by ethernet's one.Accorind to the IEEE 802.15.4 standard, device has 8-byte length address,
so this hook loses the last 2 bytes which may rise a compatibility problems
with other IEEE 802.15.4 standard implementations.Signed-off-by: Alexander Smirnov
Signed-off-by: David S. Miller
29 Jun, 2012
1 commit
-
Using NLMSG_GOODSIZE results in multiple pages being used as
nlmsg_new() will automatically add the size of the netlink
header to the payload thus exceeding the page limit.NLMSG_DEFAULT_SIZE takes this into account.
Signed-off-by: Thomas Graf
Cc: Jiri Pirko
Cc: Dmitry Eremin-Solenikov
Cc: Sergey Lapin
Cc: Johannes Berg
Cc: Lauro Ramos Venancio
Cc: Aloisio Almeida Jr
Cc: Samuel Ortiz
Reviewed-by: Jiri Pirko
Signed-off-by: David S. Miller
27 Jun, 2012
1 commit
-
We already unlocked a few lines earlier here, so we can go directly to
drop without passing through unlock. This was introduced recently in
c5d3687f6c ('6lowpan: read data from skb safely').Signed-off-by: Dan Carpenter
Acked-by: Alexander Smirnov
Signed-off-by: David S. Miller
26 Jun, 2012
3 commits
-
Remove excessive __func__ argument in pr_debug function and some
excessive debug messages.Signed-off-by: Alexander Smirnov
Signed-off-by: David S. Miller -
Add missing pointer shift for the 'default' case.
Signed-off-by: Alexander Smirnov
Cc: Tony Cheneau
Signed-off-by: David S. Miller -
Check if skb buffer can pull requested amount of bytes and return
an error in opposite case.Signed-off-by: Alexander Smirnov
Signed-off-by: David S. Miller
17 May, 2012
1 commit
-
This stack implementation distinguishes several types of slave
interfaces. Another parameter to 'add_iface_' function is added
to clarify the interface type is going to be registered.Signed-off-by: Alexander Smirnov
Signed-off-by: David S. Miller
08 May, 2012
1 commit
-
Conflicts:
drivers/net/ethernet/intel/e1000e/param.c
drivers/net/wireless/iwlwifi/iwl-agn-rx.c
drivers/net/wireless/iwlwifi/iwl-trans-pcie-rx.c
drivers/net/wireless/iwlwifi/iwl-trans.hResolved the iwlwifi conflict with mainline using 3-way diff posted
by John Linville and Stephen Rothwell. In 'net' we added a bug
fix to make iwlwifi report a more accurate skb->truesize but this
conflicted with RX path changes that happened meanwhile in net-next.In e1000e a conflict arose in the validation code for settings of
adapter->itr. 'net-next' had more sophisticated logic so that
logic was used.Signed-off-by: David S. Miller
26 Apr, 2012
5 commits
-
The same macros is defined in 'include/net/af_ieee802154.h' and is called
IEEE802154_ADDR_LEN. No need another one, so remove it.Signed-off-by: Alexander Smirnov
Signed-off-by: David S. Miller -
Separate frame allocation routine from data processing function.
This makes code more human readable and easier for understanding.Signed-off-by: Alexander Smirnov
Signed-off-by: David S. Miller -
Add missing spin_lock_init() for frames list lock.
Signed-off-by: Alexander Smirnov
Signed-off-by: David S. Miller -
Clean all the pending fragments and relative timers if 6lowpan link
is going to be deleted.Signed-off-by: Alexander Smirnov
Signed-off-by: David S. Miller -
Add nescesary mlme callbacks to satisfy "iz list" request from user space.
Due to 6lowpan device doesn't have its own phy, mlme implemented as a pipe
to a real phy to which 6lowpan is attached.Signed-off-by: Alexander Smirnov
Signed-off-by: David S. Miller
16 Apr, 2012
1 commit
-
Use of "unsigned int" is preferred to bare "unsigned" in net tree.
Signed-off-by: Eric Dumazet
Signed-off-by: David S. Miller
02 Apr, 2012
1 commit
-
These macros contain a hidden goto, and are thus extremely error
prone and make code hard to audit.Signed-off-by: David S. Miller
23 Feb, 2012
1 commit
-
Use eth_mac_addr() for .ndo_set_mac_address, remove
lowpan_set_address since it do currently the same as
eth_mac_addr(). Additional advantage: eth_mac_addr() already
checks if the given address is validSigned-off-by: Danny Kukawka
Acked-by: Dmitry Eremin-Solenikov
Signed-off-by: David S. Miller
19 Nov, 2011
1 commit
-
net: Remove all uses of LL_ALLOCATED_SPACE
The macro LL_ALLOCATED_SPACE was ill-conceived. It applies the
alignment to the sum of needed_headroom and needed_tailroom. As
the amount that is then reserved for head room is needed_headroom
with alignment, this means that the tail room left may be too small.This patch replaces all uses of LL_ALLOCATED_SPACE with the macro
LL_RESERVED_SPACE and direct reference to needed_tailroom.This also fixes the problem with needed_headroom changing between
allocating the skb and reserving the head room.Signed-off-by: Herbert Xu
Signed-off-by: David S. Miller
17 Nov, 2011
1 commit
-
dev_queue_xmit() consumes its own skb, so the call to dev_kfree_skb()
in lowpan_fragment_xmit() is a double free.Signed-off-by: Dan Carpenter
Acked-by: Alexander Smirnov
Signed-off-by: David S. Miller
14 Nov, 2011
5 commits
-
This patch provides possibility to decompress UDP headers.
Derived from Contiki OS.Signed-off-by: Alexander Smirnov
Signed-off-by: David S. Miller -
This patch adds support for UDP header compression.
Derived from Contiki OS.Signed-off-by: Alexander Smirnov
Signed-off-by: David S. Miller -
This patch fixes settings for device initialization which makes possible to
use NDISC and TCP.Signed-off-by: Alexander Smirnov
Acked-by: Dmitry Eremin-Solenikov
Signed-off-by: David S. Miller -
This patch disables debug output enabled by default.
Signed-off-by: Alexander Smirnov
Acked-by: Dmitry Eremin-Solenikov
Signed-off-by: David S. Miller -
This patch adds support for frame fragmentation.
Signed-off-by: Alexander Smirnov
Signed-off-by: David S. Miller
01 Nov, 2011
1 commit
-
These files are non modular, but need to export symbols using
the macros now living in export.h -- call out the include so
that things won't break when we remove the implicit presence
of module.h from everywhere.Signed-off-by: Paul Gortmaker
16 Sep, 2011
4 commits
-
This patch fixes 2 issues in lowpan_skb_deliver function:
1. Check for return status of skb_copy call;
2. Use skb_copy with proper GFP flag, drop check for non-interrupt
context.Signed-off-by: Alexander Smirnov
Signed-off-by: Eric Dumazet
Signed-off-by: David S. Miller -
We should release the dev_hold() on error before returning here.
Signed-off-by: Dan Carpenter
Signed-off-by: David S. Miller -
When we kfree(entry) that causes a use-after-free bug so we have to
use list_for_each_entry_safe() safe here.Signed-off-by: Dan Carpenter
Signed-off-by: David S. Miller -
Use kfree_skb() to free sbk_buffs.
Signed-off-by: Dan Carpenter
Signed-off-by: David S. Miller
25 Aug, 2011
1 commit
-
This patch provides base support for transmission of IPv6 packets as
well as the formation of IPv6 link-local addresses and statelessly
autoconfigured addresses on top of IEEE 802.15.4 networks.For more information please look at the RFC4944 "Compression Format
for IPv6 Datagrams in Low Power and Losst Networks (6LoWPAN).Signed-off-by: Alexander Smirnov
Signed-off-by: David S. Miller
30 Jun, 2011
2 commits
-
Signed-off-by: Alexander Smirnov
Signed-off-by: Dmitry Eremin-Solenikov -
Signed-off-by: Dmitry Eremin-Solenikov