From a2f1892480b54350186acd50f2a9913d155e7818 Mon Sep 17 00:00:00 2001 From: fbernon Date: Wed, 12 Mar 2008 12:58:07 +0000 Subject: [PATCH] api_msg.c: fix the netbuf::addr field to point on the ip_src on the pbuf's copy (about bug#22530). --- src/api/api_msg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/api/api_msg.c b/src/api/api_msg.c index 0e5c32ca..fc2a7091 100644 --- a/src/api/api_msg.c +++ b/src/api/api_msg.c @@ -104,7 +104,7 @@ recv_raw(void *arg, struct raw_pcb *pcb, struct pbuf *p, buf->p = q; buf->ptr = q; - buf->addr = addr; + buf->addr = &(((struct ip_hdr*)(q->payload))->src); buf->port = pcb->protocol; SYS_ARCH_INC(conn->recv_avail, q->tot_len);