On 2018-06-21 13:20, Pintu Kumar wrote:
> Dear Jan, Greg,
>
> Is there any pointer about this issue?
> This is blocking my next work..
Does this solve the issue AND still generate valid UDP checksums (please
check with wireshark or against a normal networking stack?
diff --git a/kernel/drivers/net/stack/ipv4/udp/udp.c
b/kernel/drivers/net/stack/ipv4/udp/udp.c
index 8e80d3e0b..bb0b0fc12 100644
--- a/kernel/drivers/net/stack/ipv4/udp/udp.c
+++ b/kernel/drivers/net/stack/ipv4/udp/udp.c
@@ -556,18 +556,17 @@ static int rt_udp_getfrag(const void *p, unsigned char
*to,
if (offset)
return rtnet_read_from_iov(ufh->fd, ufh->iov, ufh->iovlen, to,
fraglen);
- /* Checksum of the complete data part of the UDP message: */
- for (i = 0; i < ufh->iovlen; i++) {
- ufh->wcheck = csum_partial(ufh->iov[i].iov_base,
ufh->iov[i].iov_len,
- ufh->wcheck);
- }
-
ret = rtnet_read_from_iov(ufh->fd, ufh->iov, ufh->iovlen,
to + sizeof(struct udphdr),
fraglen - sizeof(struct udphdr));
if (ret)
return ret;
+ /* Checksum of the complete data part of the UDP message: */
+ ufh->wcheck = csum_partial(to + sizeof(struct udphdr),
+ fraglen - sizeof(struct udphdr),
+ ufh->wcheck);
+
/* Checksum of the udp header: */
ufh->wcheck = csum_partial((unsigned char *)ufh,
sizeof(struct udphdr), ufh->wcheck);
>
> If there is already a fix available for it, please let me know.
> Or, should I need analyze this freshly....
> I wonder why no body else is facing this issue....
Users may still have the related memory protection features off which
surface this issue.
Jan
--
Siemens AG, Corporate Technology, CT RDA IOT SES-DE
Corporate Competence Center Embedded Linux
_______________________________________________
Xenomai mailing list
[email protected]
https://xenomai.org/mailman/listinfo/xenomai