]> rtime.felk.cvut.cz Git - pes-rpp/rpp-lwip.git/commitdiff
Set ip_data.current_netif earlier to allow ICMPv6 packets in ip6_fwd.
authorIvan Delamer <delamer@inicotech.com>
Fri, 2 Mar 2012 15:53:51 +0000 (08:53 -0700)
committerIvan Delamer <delamer@inicotech.com>
Fri, 2 Mar 2012 15:53:51 +0000 (08:53 -0700)
Then set to "accepted" netif, not inp.

src/core/ipv6/ip6.c

index 55b02c478e16dfe447a153a630fcf2751ad8d48f..a051c0b3210fda55bc7cb9c25ddfdc67f857700b 100644 (file)
@@ -395,6 +395,9 @@ ip6_input(struct pbuf *p, struct netif *inp)
   /* current header pointer. */
   ip_data.current_ip6_header = ip6hdr;
 
+  /* In netif, used in case we need to send ICMPv6 packets back. */
+  ip_data.current_netif = inp;
+
   /* match packet against an interface, i.e. is this packet for us? */
   if (ip6_addr_ismulticast(ip6_current_dest_addr())) {
     /* Always joined to multicast if-local and link-local all-nodes group. */
@@ -477,7 +480,7 @@ netif_found:
   }
 
   /* current netif pointer. */
-  ip_data.current_netif = inp;
+  ip_data.current_netif = netif;
 
   /* Save next header type. */
   nexth = IP6H_NEXTH(ip6hdr);