genode/ports-foc/patches/icmp_align.patch
Sebastian Sumpf e52a33783a ARM/L4Linux alignment
Change access of IP header in 'icmp_echo' to work with unaligned data
2012-07-10 16:30:29 +02:00

14 lines
487 B
Diff

Index: net/ipv4/icmp.c
===================================================================
--- net/ipv4/icmp.c (revision 23)
+++ net/ipv4/icmp.c (working copy)
@@ -818,7 +818,7 @@
if (!net->ipv4.sysctl_icmp_echo_ignore_all) {
struct icmp_bxm icmp_param;
- icmp_param.data.icmph = *icmp_hdr(skb);
+ memcpy(&icmp_param.data.icmph, icmp_hdr(skb), sizeof(struct icmphdr));
icmp_param.data.icmph.type = ICMP_ECHOREPLY;
icmp_param.skb = skb;
icmp_param.offset = 0;