lwip-users
[Top][All Lists]
Advanced

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

[lwip-users] bug fix - Enable running minimal echo under Linux


From: Avner BenHanoch
Subject: [lwip-users] bug fix - Enable running minimal echo under Linux
Date: Mon, 25 Oct 2010 15:22:44 +0200

Hi All,

I am providing fix that enable running the minimal echo demo
application under Linux.
Without this fix I was not able to run ./echop, because all inbound
ARP packets were silently discarded.

NOTE: The fix also includes my yesterday's fix regarding "possible
access violation in case of error"

Regards,
 Avner

--- contrib/ports/unix/proj/minimal/orig-mintapif.c     2010-10-24
17:58:37.918254000 +0200
+++ contrib/ports/unix/proj/minimal/mintapif.c  2010-10-25
12:33:54.871315000 +0200
@@ -111,6 +111,7 @@
     memset(&ifr, 0, sizeof(ifr));
     ifr.ifr_flags = IFF_TAP|IFF_NO_PI;
     if (ioctl(mintapif->fd, TUNSETIFF, (void *) &ifr) < 0) {
+      snprintf(buf, sizeof(buf), "failed to execute ioctl TUNSETIFF
for device %s", DEVTAP);
       perror(buf);
       exit(1);
     }
@@ -301,6 +302,8 @@

   mintapif->ethaddr = (struct eth_addr *)&(netif->hwaddr[0]);

+  netif->flags = NETIF_FLAG_ETHARP;
+
   low_level_init(netif);

   return ERR_OK;



reply via email to

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