[riot-notifications] [RIOT-OS/RIOT] drivers/cc2420: don't append to FIFO if iol->iol_len == 0 (#11331)

Martine Lenders notifications at github.com
Tue Apr 2 16:28:55 CEST 2019


miri64 approved this pull request.

I tested with `z1`. Since `gnrc_networking` is too big for that board, I used `examples/default` with `txtsnd` instead of the proposed testing procedures and sniffed the traffic.

Without this PR I can send non-zero payloads (see pkt 1 in wireshark screenshot beloow) but with an empty payload the node runs into an assertion:

```
> txtsnd 4 bcast "abcd"
2019-04-02 16:21:21,481 - INFO #  txtsnd 4 bcast "abcd"
> txtsnd 4 bcast ""
2019-04-02 16:21:27,297 - INFO #  txtsnd 4 bcast ""
2019-04-02 16:21:27,316 - INFO # n/a
2019-04-02 16:21:27,316 - INFO # *** RIOT kernel panic:
2019-04-02 16:21:27,316 - INFO # FAILED ASSERTION.
2019-04-02 16:21:27,316 - INFO # 
2019-04-02 16:21:27,317 - INFO # 	pid | name                 | state    Q | pri | stack  ( used) | base addr  | current     
2019-04-02 16:21:27,324 - INFO # 	  - | isr_stack            | -        - |   - |    256 (   -1) |     0xffff |     0xffff
2019-04-02 16:21:27,332 - INFO # 	  1 | idle                 | pending  Q |  15 |     96 (   58) |     0x111a |     0x1140 
2019-04-02 16:21:27,340 - INFO # 	  2 | main                 | pending  Q |   7 |    512 (  452) |     0x117a |     0x124e 
2019-04-02 16:21:27,349 - INFO # 	  3 | pktdump              | bl rx    _ |   6 |    512 (  148) |     0x1966 |     0x1ad4 
2019-04-02 16:21:27,358 - INFO # 	  4 | cc2420               | running  Q |   2 |    512 (  408) |     0x155c |     0x15ca 
2019-04-02 16:21:27,359 - INFO # 	    | SUM                  |            |     |   1888 ( 1066)
2019-04-02 16:21:27,359 - INFO # 
2019-04-02 16:21:27,359 - INFO # *** halted.
2019-04-02 16:21:27,359 - INFO # 
2019-04-02 16:21:33,407 - INFO # Exiting Pyterm
```

With this PR everything I am also able to send empty payloads (see pkt 2 and 3 below):

```
> txtsnd 4 bcast "abcd"
2019-04-02 16:22:23,787 - INFO # txtsnd 4 bcast "abcd"
> txtsnd 4 bcast ""
2019-04-02 16:22:26,130 - INFO # txtsnd 4 bcast ""
```

![Sniffing something weird…](https://user-images.githubusercontent.com/675644/55410253-d24e9780-5563-11e9-88f9-239de30c34f5.png)

So ACK.




-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/11331#pullrequestreview-221695569
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190402/cb1eaa30/attachment.html>


More information about the notifications mailing list