From: Christoph Schulz Date: Wed, 16 Jul 2014 21:41:26 +0000 (+0200) Subject: net: ppp: access ppp->nextseq only if CONFIG_PPP_MULTILINK is defined X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=a9f559c37b582c9eb12f82ac9bb77476cfda6309;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git net: ppp: access ppp->nextseq only if CONFIG_PPP_MULTILINK is defined Commit d762d038497c9df51c19fcbe69b094b3bf8e5568 resets the counter holding the next sequence number for multilink PPP fragments to zero whenever the SC_MULTILINK flag is set. However, this counter only exists if CONFIG_PPP_MULTILINK is defined. Consequently, the new code has to be enclosed within #ifdef CONFIG_PPP_MULTILINK ... #endif. Signed-off-by: Christoph Schulz Signed-off-by: David S. Miller --- diff --git a/drivers/net/ppp/ppp_generic.c b/drivers/net/ppp/ppp_generic.c index 3ed16a89b5d8..2031ce4051dc 100644 --- a/drivers/net/ppp/ppp_generic.c +++ b/drivers/net/ppp/ppp_generic.c @@ -655,8 +655,10 @@ static long ppp_ioctl(struct file *file, unsigned int cmd, unsigned long arg) break; ppp_lock(ppp); cflags = ppp->flags & ~val; +#ifdef CONFIG_PPP_MULTILINK if (!(ppp->flags & SC_MULTILINK) && (val & SC_MULTILINK)) ppp->nextseq = 0; +#endif ppp->flags = val & SC_FLAG_BITS; ppp_unlock(ppp); if (cflags & SC_CCP_OPEN)