aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--net/core/neighbour.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/net/core/neighbour.c b/net/core/neighbour.c
index a3e8daec6..69e9b1703 100644
--- a/net/core/neighbour.c
+++ b/net/core/neighbour.c
@@ -834,9 +834,10 @@ out:
static __inline__ int neigh_max_probes(struct neighbour *n)
{
struct neigh_parms *p = n->parms;
- return (n->nud_state & NUD_PROBE) ?
- p->ucast_probes :
- p->ucast_probes + p->app_probes + p->mcast_probes;
+ int max_probes = p->ucast_probes + p->app_probes;
+ if (!(n->nud_state & NUD_PROBE))
+ max_probes += p->mcast_probes;
+ return max_probes;
}
static void neigh_invalidate(struct neighbour *neigh)