--- libaitrpc/src/srv.c 2015/03/09 22:01:34 1.25.2.2 +++ libaitrpc/src/srv.c 2015/05/18 14:50:12 1.25.2.5 @@ -3,7 +3,7 @@ * by Michael Pounov * * $Author: misho $ -* $Id: srv.c,v 1.25.2.2 2015/03/09 22:01:34 misho Exp $ +* $Id: srv.c,v 1.25.2.5 2015/05/18 14:50:12 misho Exp $ * ************************************************************************** The ELWIX and AITNET software is distributed under the following @@ -771,7 +771,7 @@ rxRAWPacket(sched_task_t *task) } else { estlen = sa.sa.sa_family == AF_INET ? sizeof(struct ip) : sizeof(struct ip6_hdr); - rpc = (struct tagRPCCall*) b + estlen; + rpc = (struct tagRPCCall*) (b + estlen); estlen += ntohl(rpc->call_len); if (estlen > AIT_LEN(&c->cli_buf)) AIT_RE_BUF(&c->cli_buf, estlen); @@ -819,6 +819,8 @@ rxRAWPacket(sched_task_t *task) len = estlen; len -= sa.sa.sa_family == AF_INET ? sizeof(struct ip) : sizeof(struct ip6_hdr); + memmove(AIT_GET_BUF(&c->cli_buf), rpc, len); + rpc = (struct tagRPCCall*) AIT_GET_BUF(&c->cli_buf); /* skip loop packet */ if (rpc->call_io & RPC_ACK)