ndisc: fix two infinite loops
authorYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 28 Sep 2018 10:28:05 +0000 (19:28 +0900)
committerEvgeny Vereshchagin <evvers@ya.ru>
Wed, 26 Sep 2018 18:54:21 +0000 (18:54 +0000)
src/libsystemd-network/ndisc-router.c

index c6e75ab..b982dcc 100644 (file)
@@ -168,7 +168,7 @@ int ndisc_router_parse(sd_ndisc_router *rt) {
 
                         if (has_mtu) {
                                 log_ndisc("MTU option specified twice, ignoring.");
-                                continue;
+                                break;
                         }
 
                         if (length != 8) {
@@ -209,7 +209,7 @@ int ndisc_router_parse(sd_ndisc_router *rt) {
 
                         if (has_flag_extension) {
                                 log_ndisc("Flags extension option specified twice, ignoring.");
-                                continue;
+                                break;
                         }
 
                         if (length < 1*8) {