daandemeyer / rpms / systemd

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