diff options
Diffstat (limited to 'net/ipv6/ndisc.c')
-rw-r--r-- | net/ipv6/ndisc.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/net/ipv6/ndisc.c b/net/ipv6/ndisc.c index 2c9f6bf57325..682866777d53 100644 --- a/net/ipv6/ndisc.c +++ b/net/ipv6/ndisc.c | |||
@@ -162,7 +162,8 @@ static void ndisc_fill_addr_option(struct sk_buff *skb, int type, void *data) | |||
162 | memcpy(opt+2, data, data_len); | 162 | memcpy(opt+2, data, data_len); |
163 | data_len += 2; | 163 | data_len += 2; |
164 | opt += data_len; | 164 | opt += data_len; |
165 | if ((space -= data_len) > 0) | 165 | space -= data_len; |
166 | if (space > 0) | ||
166 | memset(opt, 0, space); | 167 | memset(opt, 0, space); |
167 | } | 168 | } |
168 | 169 | ||
@@ -656,8 +657,8 @@ static void ndisc_solicit(struct neighbour *neigh, struct sk_buff *skb) | |||
656 | 657 | ||
657 | if (skb && ipv6_chk_addr(dev_net(dev), &ipv6_hdr(skb)->saddr, dev, 1)) | 658 | if (skb && ipv6_chk_addr(dev_net(dev), &ipv6_hdr(skb)->saddr, dev, 1)) |
658 | saddr = &ipv6_hdr(skb)->saddr; | 659 | saddr = &ipv6_hdr(skb)->saddr; |
659 | 660 | probes -= NEIGH_VAR(neigh->parms, UCAST_PROBES); | |
660 | if ((probes -= NEIGH_VAR(neigh->parms, UCAST_PROBES)) < 0) { | 661 | if (probes < 0) { |
661 | if (!(neigh->nud_state & NUD_VALID)) { | 662 | if (!(neigh->nud_state & NUD_VALID)) { |
662 | ND_PRINTK(1, dbg, | 663 | ND_PRINTK(1, dbg, |
663 | "%s: trying to ucast probe in NUD_INVALID: %pI6\n", | 664 | "%s: trying to ucast probe in NUD_INVALID: %pI6\n", |