lwip-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lwip-devel] A guy is trying to get lwIP 2.1.3 to work in ReactOS


From: Bryan Kirk
Subject: Re: [lwip-devel] A guy is trying to get lwIP 2.1.3 to work in ReactOS
Date: Mon, 16 Jan 2023 16:19:57 -0500

It is now working thanks to his second suggestion.

On Mon, Jan 16, 2023 at 3:03 PM Simon Goldschmidt <goldsimon@gmx.de> wrote:

OK, so first, let me try to explain the major difference in "up" handling between 1.4.1 and 2.x.y again:


In 1.4.1 and before, there was no "administrative" status of an interface. An interface was always enabled as long as it was known to lwIP (e.g. in Linux you can do "ifconfig eth0 down", in Windows you can "deactivate" a network card). Instead, the UP flag was meant much as "link up".


Now from 2.0.0 on, we have "administrative status" up/down (controlled by the flag NETIF_FLAG_UP and the functions netif_set_up()/netif_set_down()), but we also have a new flag "link up" (controlled by the flag NETIF_FLAG_LINK_UP and the functions netif_set_link_up/down()). Now if you have an ETH card were you get the link status, you'd start off with link down and call netif_set_link_up() once you get the link callback. It seems like this has been prepared in "TCPUpdateInterfaceLinkStatus()" (in transport/tcp/if.c).


Also new in 2.0.0 is, that interfaces with link down are not used for automatic sending (only if you specifically bind to one or send on one interface). So the "No route to 78.46.247.105" message could either be because you don't have link up, or because you have no gw set.

And sure enough, TCPUpdateInterfaceIPInformation(), which sets the IP addresses in lwIP, does NOT set a gateway. From there it seems like this could never have worked and wouldn't be a problem upgrading from 1.4.1 to 2.x.y?


Keeping that aside, I do not know if there are other mechanisms beside or below lwIP in ReactOS that would still make this work without a gateway: there seems to be an ARP stack outside of the lwIP code (and that level is where IPv4 routing takes place), so maybe that's how routing works in ReactOS?


I'd probably try to remove the "#if 0" in TCPUpdateInterfaceLinkStatus() and/or start the netif with link up ("netif->flags |= NETIF_FLAG_BROADCAST | NETIF_FLAG_LINK_UP;" in TCPInterfaceInit()) to see if that fixes your routing problem.


Regards,

Simon


On 16.01.2023 16:18, Bryan Kirk wrote:
Here is his latest log:


It looks like the gateway address isn't being properly set.

On Sun, Jan 15, 2023 at 3:38 PM Bryan Kirk <zero3k6@gmail.com> wrote:
I tried doing what was suggested recently. It didn't fix the problem.

On Wed, Jan 11, 2023 at 1:11 PM Bryan Kirk <zero3k6@gmail.com> wrote:
He has a Discord Server. If you want to contact him and offer advice, you can find him on it. Its url is https://discord.com/invite/UTVkc98p7P.

On Tue, Jan 10, 2023 at 7:11 PM Bryan Kirk <zero3k6@gmail.com> wrote:

On Tue, Jan 10, 2023 at 5:04 PM Bryan Kirk <zero3k6@gmail.com> wrote:
How does he do what the reply to this message mentioned in lwIP's code?

On Tue, Jan 10, 2023 at 9:42 AM Bryan Kirk <zero3k6@gmail.com> wrote:
He has managed to get it integrated into its source code. It is causing a BSOD because it is not getting an IP address according to the debug output shown when enabling all debug output in lwipopts.h. How does he fix it so it does get an IP address (which should fix the BSOD)? You can see his findings at https://jira.reactos.org/browse/CORE-13098.

_______________________________________________
lwip-devel mailing list
lwip-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/lwip-devel

reply via email to

[Prev in Thread] Current Thread [Next in Thread]