fixup lwip patch
This commit is contained in:
parent
eabcdf475b
commit
759eec4e00
|
@ -1,25 +1,28 @@
|
||||||
|
From ecd90bc782f50b815fcc68e59de0c92907b6fefb Mon Sep 17 00:00:00 2001
|
||||||
|
From: Emery Hemingway <ehmry@posteo.net>
|
||||||
|
Date: Mon, 9 Nov 2020 23:08:08 +0100
|
||||||
|
Subject: [PATCH] lwip: bring interface up after configuring
|
||||||
|
|
||||||
|
Calling netif_set_up before netif_set_netmask and netif_set_gw will bring
|
||||||
|
the interface up successfully but triggers misleading log messages.
|
||||||
|
---
|
||||||
|
repos/libports/include/lwip/nic_netif.h | 5 ++---
|
||||||
|
1 file changed, 2 insertions(+), 3 deletions(-)
|
||||||
|
|
||||||
diff --git a/repos/libports/include/lwip/nic_netif.h b/repos/libports/include/lwip/nic_netif.h
|
diff --git a/repos/libports/include/lwip/nic_netif.h b/repos/libports/include/lwip/nic_netif.h
|
||||||
index 167abecb3f..426b17cf8b 100644
|
index 167abecb3f..6b11a5c28f 100644
|
||||||
--- a/repos/libports/include/lwip/nic_netif.h
|
--- a/repos/libports/include/lwip/nic_netif.h
|
||||||
+++ b/repos/libports/include/lwip/nic_netif.h
|
+++ b/repos/libports/include/lwip/nic_netif.h
|
||||||
@@ -17,6 +17,8 @@
|
@@ -181,8 +181,6 @@ class Lwip::Nic_netif
|
||||||
#ifndef __LWIP__NIC_NETIF_H__
|
return;
|
||||||
#define __LWIP__NIC_NETIF_H__
|
}
|
||||||
|
|
||||||
+#include <base/debug.h>
|
- netif_set_up(&_netif);
|
||||||
+
|
-
|
||||||
#if ETH_PAD_SIZE
|
if (ip_str != "") {
|
||||||
#error ETH_PAD_SIZE defined but unsupported by lwip/nic_netif.h
|
ip_addr_t ipaddr;
|
||||||
#endif
|
if (!ipaddr_aton(ip_str.string(), &ipaddr)) {
|
||||||
@@ -194,6 +196,7 @@ class Lwip::Nic_netif
|
@@ -205,7 +203,6 @@ class Lwip::Nic_netif
|
||||||
|
|
||||||
if (config.has_attribute("netmask")) {
|
|
||||||
Str str = config.attribute_value("netmask", Str());
|
|
||||||
+ PDBG("netmask is ", str);
|
|
||||||
ip_addr_t ip;
|
|
||||||
ipaddr_aton(str.string(), &ip);
|
|
||||||
netif_set_netmask(&_netif, ip_2_ip4(&ip));
|
|
||||||
@@ -205,7 +208,6 @@ class Lwip::Nic_netif
|
|
||||||
ipaddr_aton(str.string(), &ip);
|
ipaddr_aton(str.string(), &ip);
|
||||||
netif_set_gw(&_netif, ip_2_ip4(&ip));
|
netif_set_gw(&_netif, ip_2_ip4(&ip));
|
||||||
}
|
}
|
||||||
|
@ -27,3 +30,15 @@ index 167abecb3f..426b17cf8b 100644
|
||||||
}
|
}
|
||||||
|
|
||||||
if (config.has_attribute("nameserver")) {
|
if (config.has_attribute("nameserver")) {
|
||||||
|
@@ -220,6 +217,8 @@ class Lwip::Nic_netif
|
||||||
|
dns_setserver(0, &ip);
|
||||||
|
}
|
||||||
|
|
||||||
|
+ netif_set_up(&_netif);
|
||||||
|
+
|
||||||
|
handle_link_state();
|
||||||
|
}
|
||||||
|
|
||||||
|
--
|
||||||
|
2.28.0
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue