4bff0a
From 0318890ed2325b916ccfa5a59ede98e6a4b5fe60 Mon Sep 17 00:00:00 2001
4bff0a
From: Yu Watanabe <watanabe.yu+github@gmail.com>
4bff0a
Date: Fri, 28 Sep 2018 19:28:05 +0900
4bff0a
Subject: [PATCH] ndisc: fix two infinite loops
4bff0a
4bff0a
(cherry picked from commit f3241c61f12dbd8f0ed37419ae272e291d09461d)
4bff0a
4bff0a
Resolves: #1696224
4bff0a
---
4bff0a
 src/libsystemd-network/ndisc-router.c | 4 ++--
4bff0a
 1 file changed, 2 insertions(+), 2 deletions(-)
4bff0a
4bff0a
diff --git a/src/libsystemd-network/ndisc-router.c b/src/libsystemd-network/ndisc-router.c
4bff0a
index 25b693a458..3806804435 100644
4bff0a
--- a/src/libsystemd-network/ndisc-router.c
4bff0a
+++ b/src/libsystemd-network/ndisc-router.c
4bff0a
@@ -189,7 +189,7 @@ int ndisc_router_parse(sd_ndisc_router *rt) {
4bff0a
 
4bff0a
                         if (has_mtu) {
4bff0a
                                 log_ndisc("MTU option specified twice, ignoring.");
4bff0a
-                                continue;
4bff0a
+                                break;
4bff0a
                         }
4bff0a
 
4bff0a
                         if (length != 8) {
4bff0a
@@ -230,7 +230,7 @@ int ndisc_router_parse(sd_ndisc_router *rt) {
4bff0a
 
4bff0a
                         if (has_flag_extension) {
4bff0a
                                 log_ndisc("Flags extension option specified twice, ignoring.");
4bff0a
-                                continue;
4bff0a
+                                break;
4bff0a
                         }
4bff0a
 
4bff0a
                         if (length < 1*8) {