diff options
Diffstat (limited to 'net/ipv6/ndisc.c')
-rw-r--r-- | net/ipv6/ndisc.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/ipv6/ndisc.c b/net/ipv6/ndisc.c index b6c855a59..c21e48d80 100644 --- a/net/ipv6/ndisc.c +++ b/net/ipv6/ndisc.c @@ -144,8 +144,9 @@ static u8 *ndisc_fill_option(u8 *opt, int type, void *data, int data_len) opt[1] = space>>3; memcpy(opt+2, data, data_len); data_len += 2; + opt += data_len; if ((space -= data_len) > 0) - memset(opt + data_len, 0, space); + memset(opt, 0, space); return opt + space; } |