Hello Everyone, I am new to LWIP and I am wondering if someone could help me with a problem that I am facing. I compiled the minimal application in LWIP-1.1.1 on a tun enabled Linux-2.6.14 kernel. When I run the application, it starts successfully and I see a new tap interface created. However, when I try to connect to port 7 of 192.168.0.2 using an echo client, LWIP seg faults. It faults even if I ping to 192.168.0.2 address. In fact, I see the same behavior when I ping/echoclient to any other address in the 192.168.0 subnet other than 192.168.0.1. By inserting some printfs, I find that seg fault occurs in low_level_output function. First, an ARP_REQUEST packet is received by mintapif_input, to which etharp_arp_input sends an ARP reply by calling low_level_output, which causes the seg fault while consolidating the pbuf chain into a buffer for write. I don't want to go further with the debugging because, I have a feeling that I am missing something basic. Also, I had to make the following changes to the code in order to compile the minimal application.
1. Remove "#define ETHARP_ALWAYS_INSERT 0" from lwipopts.h file 2. Change the signatures of ip/arp input functions as follows in lwip-1.1.1/src/netif/etharp.c and lwip-1.1.1/src/include/netif/etharp.h files: void etharp_ip_input(struct netif *netif, struct pbuf *p); ------------> struct pbuf * etharp_ip_input(struct netif *netif, struct pbuf *p); void etharp_arp_input(struct netif *netif, struct eth_addr *ethaddr, struct pbuf *p); --------------> struct pbuf * etharp_arp_input(struct netif *netif, struct eth_addr *ethaddr, struct pbuf *p); I would really appreciate if someone could point to me what I could be doing wrong. Best Regards, Dennis -- View this message in context: http://www.nabble.com/Minimal-application-segmentation-fault-tf1886002.html#a5156238 Sent from the lwip-users forum at Nabble.com. _______________________________________________ lwip-users mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/lwip-users
