mirror of
https://github.com/genodelabs/genode.git
synced 2024-12-24 15:56:41 +00:00
ARM/L4Linux alignment
Change access of IP header in 'icmp_echo' to work with unaligned data
This commit is contained in:
parent
3cfbc53754
commit
e52a33783a
@ -8,7 +8,7 @@ VERBOSE ?= @
|
||||
ECHO = @echo
|
||||
TARGET ?= l4linux
|
||||
|
||||
PATCH-l4linux = patches/l4lx_genode.patch
|
||||
PATCH-l4linux = patches/l4lx_genode.patch patches/icmp_align.patch
|
||||
REV-l4linux = 23
|
||||
REPO-l4linux = http://svn.tudos.org/repos/oc/l4linux/trunk
|
||||
|
||||
@ -62,7 +62,7 @@ help:
|
||||
prepare: clean
|
||||
$(VERBOSE)$(UPDATE)
|
||||
$(ECHO) "applying patches to '$(REAL_CONTRIB_DIR)/$(TARGET)'"
|
||||
$(VERBOSE)$(PATCH) -d $(REAL_CONTRIB_DIR)/$(TARGET) -i $(realpath $(PATCH-$(TARGET)))
|
||||
$(VERBOSE)for i in $(PATCH-$(TARGET)); do $(PATCH) -d $(REAL_CONTRIB_DIR)/$(TARGET) < $$i; done
|
||||
$(VERBOSE)ln -s $(shell pwd)/src/drivers $(REAL_CONTRIB_DIR)/$(TARGET)/arch/l4/drivers
|
||||
$(ECHO)
|
||||
$(ECHO) "Preparation completed!"
|
||||
|
13
ports-foc/patches/icmp_align.patch
Normal file
13
ports-foc/patches/icmp_align.patch
Normal file
@ -0,0 +1,13 @@
|
||||
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;
|
Loading…
Reference in New Issue
Block a user