You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2024/09/11 17:11:35 UTC

(nuttx-apps) branch master updated: apps/dhcpd: fix dhcpd set dip error

This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx-apps.git


The following commit(s) were added to refs/heads/master by this push:
     new 002e31c56 apps/dhcpd: fix dhcpd set dip error
002e31c56 is described below

commit 002e31c56d7632bcab32bac00a6bd1e1fafaa7b1
Author: meijian <me...@xiaomi.com>
AuthorDate: Mon Sep 2 14:04:49 2024 +0800

    apps/dhcpd: fix dhcpd set dip error
    
    dhcpd will set dip routing table 0.0.0.0|0.0.0.0|10.0.0.1 (TARGET|NETMASK|ROUTER) which will cover other's router 0.0.0.0|0.0.0.0|10.1.10.1.
    And will cause shell/apps to internet failure.
    
    Signed-off-by: meijian <me...@xiaomi.com>
---
 examples/dhcpd/dhcpd_daemon.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/examples/dhcpd/dhcpd_daemon.c b/examples/dhcpd/dhcpd_daemon.c
index 7ed38bb6a..34747b345 100644
--- a/examples/dhcpd/dhcpd_daemon.c
+++ b/examples/dhcpd/dhcpd_daemon.c
@@ -113,11 +113,6 @@ int dhcpd_daemon(int argc, FAR char *argv[], bool daemon)
   addr.s_addr = HTONL(CONFIG_NETUTILS_DHCPD_ROUTERIP);
   netlib_set_ipv4addr(devname, &addr);
 
-  /* Set up the default router address */
-
-  addr.s_addr = HTONL(CONFIG_NETUTILS_DHCPD_ROUTERIP);
-  netlib_set_dripv4addr(devname, &addr);
-
   /* Setup the subnet mask */
 
   addr.s_addr = HTONL(CONFIG_NETUTILS_DHCPD_NETMASK);