lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] lwip IPv6 with Unix port


From: Rahul Gundecha
Subject: Re: [lwip-users] lwip IPv6 with Unix port
Date: Wed, 10 Aug 2011 16:17:31 +0530



On Mon, Aug 8, 2011 at 3:39 PM, Kieran Mansley <address@hidden> wrote:
On Mon, 2011-08-08 at 15:28 +0530, Rahul Gundecha wrote:
> Running tcpdump shows that tap0 sends Router Solicitation and Router
> Advertisements. But no other packet hits tap0 interface.

In that case I would start looking at why the lwIP end of the tap link
doesn't think it has received a router advertisement as from your
previous description that seems to be the problem.
Yes, Router Advertisements were not reaching to lwip due to filtering in tapif_input based on ethertype. I added a check for IPv6 ethertype and now I can see IPv6 packets reaching lwip.

Second problem was that there was no output_ip6 function assigned for the netif interface. After assigning ethip6_output as output_ip6 function I can see lwip sends the packets which are seen on other end of tap interface.

However now the problem is that the link-local IP address is not correctly assigned to the interface. The packets are sent with source address as IP6_ADDR_ANY. Debugging this issue further.

Below is the patch fixing the first two issues, can someone point me the procedure to submit the patch to lwip-contrib. Is there any different mailing list for that.

Thanks,
Rahul


diff --git a/ports/unix/netif/tapif.c b/ports/unix/netif/tapif.c
index 49bca65..974c0ad 100644
--- a/ports/unix/netif/tapif.c
+++ b/ports/unix/netif/tapif.c
@@ -52,6 +52,7 @@
 #include "lwip/sys.h"
 
 #include "netif/etharp.h"
+#include "lwip/ethip6.h"
 
 #if defined(LWIP_DEBUG) && defined(LWIP_TCPDUMP)
 #include "netif/tcpdump.h"
@@ -300,6 +301,7 @@ tapif_input(struct netif *netif)
   /* IP or ARP packet? */
   case ETHTYPE_IP:
   case ETHTYPE_ARP:
+  case ETHTYPE_IPV6:
 #if PPPOE_SUPPORT
   /* PPPoE packet? */
   case ETHTYPE_PPPOEDISC:
@@ -340,6 +342,10 @@ tapif_init(struct netif *netif)
   netif->name[0] = IFNAME0;
   netif->name[1] = IFNAME1;
   netif->output = etharp_output;
+#if LWIP_IPV6
+  netif->output_ip6 = ethip6_output;
+#endif /* LWIP_IPV6 */
+
   netif->linkoutput = low_level_output;
   netif->mtu = 1500;
   /* hardware address length */



 

Perhaps lwIP isn't automatically assigning an IPv6 address to its end of
the link (I would be surprised if it did) and so you would have to
arrange for this to happen, but I'm not sure of the exact commands to do
this as the IPv6 code is new enough that I haven't experimented with it
yet.

Kieran


_______________________________________________
lwip-users mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/lwip-users


reply via email to

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