[riot-notifications] [RIOT-OS/RIOT] pkg/lwip: Fix DHCP autostart (#16636)

Erik Ekman notifications at github.com
Tue Jul 13 13:56:47 CEST 2021



<!--
The RIOT community cares a lot about code quality.
Therefore, before describing what your contribution is about, we would like
you to make sure that your modifications are compliant with the RIOT
coding conventions, see https://github.com/RIOT-OS/RIOT/wiki/Coding-conventions.
-->

### Contribution description

<!--
Put here the description of your contribution:
- describe which part(s) of RIOT is (are) involved
- if it's a bug fix, describe the bug that it solves and how it is solved
- you can also give more information to reviewers about how to test your changes
-->

Fix spelling error (nefif -> netif) in `netif_is_flag_set` macro. This does not cause compilation failures
as long as there is a variable called netif in scope - but in that case it does not check the flags on the correct interface. This fix comes from [lwIP upstream](https://git.savannah.nongnu.org/cgit/lwip.git/commit/?id=7a2923020f3686b030d38c3e604b1f3801ca2e43).

Also start DHCP on the interface that was checked, not the first one in the array.
### Testing procedure

<!--
Details steps to test your contribution:
- which test/example to compile for which board and is there a 'test' command
- how to know that it was not working/available in master
- the expected success test output
-->

Compilation of application using lwIP and IPv4 still works. \
DHCP now starts properly on all interfaces and not only the first one:

Before:
```
> ifconfig
Iface ET0 HWaddr: 24:0a:c4:e6:0e:9f Link: up State: up
        Link type: wired
        inet addr: 10.4.4.81 mask: 255.255.254.0 gw: 10.4.4.1
Iface ET1 HWaddr: 24:0a:c4:e6:0e:9c Link: up State: up
        Link type: wireless
        inet addr: 0.0.0.0 mask: 0.0.0.0 gw: 0.0.0.0

```

After:
```
> ifconfig
Iface ET0 HWaddr: 24:0a:c4:e6:0e:9f Link: up State: up
        Link type: wired
        inet addr: 10.4.4.81 mask: 255.255.254.0 gw: 10.4.4.1
Iface ET1 HWaddr: 24:0a:c4:e6:0e:9c Link: up State: up
        Link type: wireless
        inet addr: 10.4.4.86 mask: 255.255.254.0 gw: 10.4.4.1
```

### Issues/PRs references

<!--
Examples: Fixes #1234. See also #5678. Depends on PR #9876.

Please use keywords (e.g., fixes, resolve) with the links to the issues you
resolved, this way they will be automatically closed when your pull request
is merged. See https://help.github.com/articles/closing-issues-using-keywords/.
-->

DHCP for other interfaces than first broken since #16229.

I am trying to get rid of the single netif array in #16162.

You can view, comment on, or merge this pull request online at:

  https://github.com/RIOT-OS/RIOT/pull/16636

-- Commit Summary --

  * pkg/lwip: Add patch to fix netif_is_flag_set macro
  * pkg/lwip: Start DHCP on correct interface

-- File Changes --

    M pkg/lwip/contrib/lwip.c (2)
    A pkg/lwip/patches/0003-netif_is_flag_set-fix.patch (22)

-- Patch Links --

https://github.com/RIOT-OS/RIOT/pull/16636.patch
https://github.com/RIOT-OS/RIOT/pull/16636.diff

-- 
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/16636
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20210713/f6fa7c10/attachment.htm>


More information about the notifications mailing list