On Sun, 2009-08-09 at 16:13 -0400, Ben Hastings wrote:
> 
> It looks like the source address of the received packet is changed on
> line 591 of ip.c, when it sets the source address of the outgoing
> packet:
>   ip_addr_set(&(iphdr->src), src);
> 
> Is this correct behavior?  Shouldn't the source address of a received
> packet be valid for the length of the callback, no matter what I do with
> the pbuf?

It looks like you're trying to send the pbuf that you've just received,
and that the problem arises because the address you've been given points
to the received header that then is changed by the sendto operation.  Is
that correct?

If that's the case, then I think your fix of copying the address out of
the received pbuf is the right thing to do.  The only alternative would
be for lwIP to do this operation all the time, when usually it would not
be necessary.

Kieran



_______________________________________________
lwip-users mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/lwip-users

Reply via email to