Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bead6469 authored by Mohammed Javid's avatar Mohammed Javid Committed by Gerrit - the friendly Code Review server
Browse files

net: core: fix for ipv6 neigh



Attach proper timer function with ipv6 neighbour entry.
Since proper timer function was not attached
to neighbour entry kernel was deleting the
neigbour entry without sending the neighbour probe.

Change-Id: Ifafcc3c4ddecc26c6ca83d5843400d0be4169566
Acked-by: default avatarSuraj Jaiswal <c_surajj@qti.qualcomm.com>
Signed-off-by: default avatarMohammed Javid <mjavid@codeaurora.org>
parent 7f551e7f
Loading
Loading
Loading
Loading
+10 −4
Original line number Diff line number Diff line
@@ -889,9 +889,12 @@ static void neigh_timer_handler(unsigned long arg)
	now = jiffies;
	next = now + HZ;

	if (!(state & NUD_IN_TIMER))
	if (!(state & NUD_IN_TIMER)) {
		if (neigh_probe_enable && (state & NUD_STALE))
			neigh_dbg(2, "neigh %pK is still alive\n", neigh);
		else
			goto out;

	}
	if (state & NUD_REACHABLE) {
		if (time_before_eq(now,
				   neigh->confirmed + neigh->parms->reachable_time)) {
@@ -1182,7 +1185,10 @@ int neigh_update(struct neighbour *neigh, const u8 *lladdr, u8 new,
		neigh_del_timer(neigh);
		if (new & NUD_PROBE)
			atomic_set(&neigh->probes, 0);
		if (new & NUD_IN_TIMER)
		if (new & NUD_IN_TIMER || (
			neigh_probe_enable &&
			(neigh->tbl->family == AF_INET6) &&
			(new & NUD_STALE)))
			neigh_add_timer(neigh, (jiffies +
						((new & NUD_REACHABLE) ?
						 neigh->parms->reachable_time :