Module Name:    src
Committed By:   yamaguchi
Date:           Mon Apr  8 00:50:49 UTC 2024

Modified Files:
        src/sbin/ifconfig: lagg.c

Log Message:
lagg(4): fix missing initialization of the number of array

pointed out by martin@, thanks.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sbin/ifconfig/lagg.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sbin/ifconfig/lagg.c
diff -u src/sbin/ifconfig/lagg.c:1.6 src/sbin/ifconfig/lagg.c:1.7
--- src/sbin/ifconfig/lagg.c:1.6	Thu Apr  4 08:01:55 2024
+++ src/sbin/ifconfig/lagg.c	Mon Apr  8 00:50:49 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: lagg.c,v 1.6 2024/04/04 08:01:55 yamaguchi Exp $	*/
+/*	$NetBSD: lagg.c,v 1.7 2024/04/08 00:50:49 yamaguchi Exp $	*/
 
 /*
  * Copyright (c) 2021 Internet Initiative Japan Inc.
@@ -28,7 +28,7 @@
 
 #include <sys/cdefs.h>
 #if !defined(lint)
-__RCSID("$NetBSD: lagg.c,v 1.6 2024/04/04 08:01:55 yamaguchi Exp $");
+__RCSID("$NetBSD: lagg.c,v 1.7 2024/04/08 00:50:49 yamaguchi Exp $");
 #endif /* !defined(lint) */
 
 #include <sys/param.h>
@@ -413,6 +413,7 @@ setlaggport(prop_dictionary_t env, prop_
 	memset(&_req, 0, sizeof(_req));
 	req = (struct lagg_req *)&_req;
 	rp = &req->lrq_reqports[0];
+	req->lrq_nports = 1;
 
 	strlcpy(rp->rp_portname, ifname, sizeof(rp->rp_portname));
 	ioc = LAGGIOC_NOCMD;

Reply via email to