<div dir="ltr"><div class="gmail_default" style="font-family:courier new,monospace;font-size:small">What patch error are you getting?</div><div class="gmail_default" style="font-family:courier new,monospace;font-size:small">

<br></div><div class="gmail_default" style="font-family:courier new,monospace;font-size:small">You can see what the patch is doing, you can just go put the changed two lines in with editor.</div><div class="gmail_default" style="font-family:courier new,monospace;font-size:small">

-tl</div><div class="gmail_default" style="font-family:courier new,monospace;font-size:small"><br></div><div class="gmail_default" style="font-family:courier new,monospace;font-size:small"><br></div></div><div class="gmail_extra">

<br><br><div class="gmail_quote">On Fri, Jan 10, 2014 at 8:05 PM, Aruna Hewapathirane <span dir="ltr"><<a href="mailto:aruna.hewapathirane@gmail.com" target="_blank">aruna.hewapathirane-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div>Hello Everybody,<br></div><div><br></div>I am a total newbie to kernel hacking and I have a 
question. Am trying to patch the Network Subsystem  and changing the 
net_random() to direct calls of prandom_u32. Why ? Because it is<br>
harder to audit / <span>grep</span> and new commits actually use prandom_u32 only am told.<br><br></div><div>u32 prandom_u32(void);    /* defined in include/linux/random.h: */<br><br></div><div>#define net_random()        prandom_u32() /* defined in include/linux/net.h */<br>



<br></div><div>Everything works as expected until I get to net/core/neighbour.c and then patch fails to apply.<br></div><div><br></div>The diff is here: <br><div><br>-------------------------------------------------------------------------------------------------------------------------------<br>




diff --git a/net/core/neighbour.c b/net/core/neighbour.c<br>index 47d834e..ea97361 100644<br>--- a/net/core/neighbour.c<br>+++ b/net/core/neighbour.c<br>@@ -117,7 +117,7 @@ static void neigh_cleanup_and_release(struct neighbour *neig<br>



 <br> unsigned long neigh_rand_reach_time(unsigned long base)<br> {<br>-       return base ? (prandom_u32() % base) + (base >> 1) : 0;<br>+       return base ? (net_random() % base) + (base >> 1) : 0;<br> }<br>



 EXPORT_SYMBOL(neigh_rand_reach_time);<br> <br>@@ -1415,7 +1415,7 @@ void pneigh_enqueue(struct neigh_table *tbl, struct neigh_<br>                    struct sk_buff *skb)<br> {<br>        unsigned long now = jiffies;<br>



-       unsigned long sched_next = now + (prandom_u32() %<br>+       unsigned long sched_next = now + (net_random() %<br>                                          NEIGH_VAR(p, PROXY_DELAY));<br> <br>        if (tbl->proxy_queue.qlen > NEIGH_VAR(p, PROXY_QLEN)) {<br>



-------------------------------------------------------------------------------------------------------------------------------<br>
<br></div><div>I can use some help and guidance please, what am I doing 
wrong ? Or not seeing ? It's just this neighbor.c file that is doing 
this and I am stumped. <br><br></div>Thank you.<div><div><img src="https://mail.google.com/mail/u/0/images/cleardot.gif"></div></div><span class="HOEnZb"><font color="#888888">Aruna<br clear="all"><div><a href="https://sites.google.com/site/arunahewapathirane/home/business-card/buisness-card.png?attredirects=0" target="_blank"><br>


</a>
</div></font></span></div>
</blockquote></div><br></div>