Module Name: src
Committed By: roy
Date: Mon Oct 12 11:07:27 UTC 2020
Modified Files:
src/sys/netinet: ip_carp.c
Log Message:
carp: Set ethernet address just before interface registation
Otherwise ifconfig reports SIOCGLIFADDR errors.
To generate a diff of this commit:
cvs rdiff -u -r1.111 -r1.112 src/sys/netinet/ip_carp.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/netinet/ip_carp.c
diff -u src/sys/netinet/ip_carp.c:1.111 src/sys/netinet/ip_carp.c:1.112
--- src/sys/netinet/ip_carp.c:1.111 Fri Oct 9 08:10:41 2020
+++ src/sys/netinet/ip_carp.c Mon Oct 12 11:07:27 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: ip_carp.c,v 1.111 2020/10/09 08:10:41 roy Exp $ */
+/* $NetBSD: ip_carp.c,v 1.112 2020/10/12 11:07:27 roy Exp $ */
/* $OpenBSD: ip_carp.c,v 1.113 2005/11/04 08:11:54 mcbride Exp $ */
/*
@@ -33,7 +33,7 @@
#endif
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ip_carp.c,v 1.111 2020/10/09 08:10:41 roy Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ip_carp.c,v 1.112 2020/10/12 11:07:27 roy Exp $");
/*
* TODO:
@@ -887,10 +887,10 @@ carp_clone_create(struct if_clone *ifc,
return rv;
}
ether_ifattach(ifp, NULL);
- carp_set_enaddr(sc);
/* Overwrite ethernet defaults */
ifp->if_type = IFT_CARP;
ifp->if_output = carp_output;
+ carp_set_enaddr(sc);
if_register(ifp);
return (0);