about summary refs log tree commit diff
path: root/src/rdisc/nm-rdisc.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/rdisc/nm-rdisc.c')
-rw-r--r--src/rdisc/nm-rdisc.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/rdisc/nm-rdisc.c b/src/rdisc/nm-rdisc.c
index 689fe7f6..12e3962b 100644
--- a/src/rdisc/nm-rdisc.c
+++ b/src/rdisc/nm-rdisc.c
@@ -212,6 +212,9 @@ nm_rdisc_add_route (NMRDisc *rdisc, const NMRDiscRoute *new)
 {
 	int i, insert_idx = -1;
 
+	if (new->plen == 0 || new->plen > 128)
+		return FALSE;
+
 	for (i = 0; i < rdisc->routes->len; i++) {
 		NMRDiscRoute *item = &g_array_index (rdisc->routes, NMRDiscRoute, i);