lwip-devel
[Top][All Lists]
Advanced

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

[lwip-devel] [patch #5824] gratuitous ARP


From: Tai-hwa Liang
Subject: [lwip-devel] [patch #5824] gratuitous ARP
Date: Fri, 30 Mar 2007 09:16:26 +0000
User-agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-GB; rv:1.8.1.3) Gecko/20070309 Firefox/2.0.0.3

Follow-up Comment #8, patch #5824 (project lwip):

Hmm... this change breaks non-ethernet interfaces such like loopif, slipif
and ppp since they did not have a valid netif->linkoutput().

System initialized.
TCP/IP initialized.
[New Thread 0x28210520 (LWP 100065)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x28210520 (LWP 100065)]
0x00000000 in ?? ()
(gdb) where
#0  0x00000000 in ?? ()
#1  0x080588c1 in etharp_request (netif=0x806b440, ipaddr=0x806b444)
    at ../../../../../lwip/src/netif/etharp.c:913
#2  0x08058566 in etharp_query (netif=0x806b440, ipaddr=0x806b444, q=0x0)
    at ../../../../../lwip/src/netif/etharp.c:807
#3  0x0804ad05 in netif_set_up (netif=0x806b440)
    at ../../../../../lwip/src/core/netif.c:310
#4  0x08048fd2 in main_thread (arg=0x0) at simhost.c:378
#5  0x280dd701 in pthread_create () from /lib/libpthread.so.2
#6  0x281a9e73 in _ctx_start () from /lib/libc.so.7
(gdb) up                 
#1  0x080588c1 in etharp_request (netif=0x806b440, ipaddr=0x806b444)
    at ../../../../../lwip/src/netif/etharp.c:913
913         result = netif->linkoutput(netif, p);
(gdb) print netif->linkoutput
$2 = (err_t (*)(struct netif *, struct pbuf *)) 0
(gdb)

The attached patch tries to mark these interfaces with NETIF_FLAG_ETHARP;
however, I don't know if doing a NULL validation in etharp.c is better:

etharp_request()
{
  .
  .
  if (netif->linkoutput != NULL)
    netif->linkoutput(netif, p);
  .
  .
}

 or, simply provide a dummy linkoutput() for these interfaces.

(file #12343)
    _______________________________________________________

Additional Item Attachment:

File name: non-eth-arp.patch              Size:1 KB


    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/patch/?5824>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.nongnu.org/





reply via email to

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