I've been googling for a while about how to do patch linux kernel but still have no clue. My intention is to do a patch to /net/ipv4/ip_gre.c .
the patch is from here http://patchwork.ozlabs.org/patch/264994/
diff --git a/net/ipv4/ip_gre.c b/net/ipv4/ip_gre.c
index 855004f..c52fee0 100644
--- a/net/ipv4/ip_gre.c
+++ b/net/ipv4/ip_gre.c
@@ -572,7 +572,7 @@ static int ipgre_header(struct sk_buff *skb, struct net_device *dev,
if (daddr)
memcpy(&iph->daddr, daddr, 4);
if (iph->daddr)
- return t->hlen;
+ return t->hlen + sizeof(*iph);
return -(t->hlen + sizeof(*iph));
}
doing patch command still no success. so i tried change the line just like decribed in the patch to the file i wanted to patch, delete the (-)
and add (+)
line.
does the ip_gre.c
file need to be compiled again??
-p1
to slice the first path. – Braiam Sep 03 '13 at 13:10