diff options
author | Henning Brauer <henning@cvs.openbsd.org> | 2006-11-16 13:12:44 +0000 |
---|---|---|
committer | Henning Brauer <henning@cvs.openbsd.org> | 2006-11-16 13:12:44 +0000 |
commit | e511db1b6a71dc19bc8a5b7bf8a1ef1d858a4c7c (patch) | |
tree | 04093e62aed8a2fa509a0bf8998207396814d9eb | |
parent | d8d2a56520b9d0b29c80ccc2e8cbdd14fa299ef0 (diff) |
in carp_attach, create the "carp" interface group, so that it is always
and early in the boot process existant. needed by the rc scripts for
carp demotion on the "carp" group. this used to work because pfsync0
was always there and member of said group; it has been broken on pfsync-less
kernels for quite some time. ok mpf mcbride
-rw-r--r-- | sys/netinet/ip_carp.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/netinet/ip_carp.c b/sys/netinet/ip_carp.c index 2d23fa9fb9e..465ee2a93ee 100644 --- a/sys/netinet/ip_carp.c +++ b/sys/netinet/ip_carp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ip_carp.c,v 1.130 2006/08/31 12:37:31 mcbride Exp $ */ +/* $OpenBSD: ip_carp.c,v 1.131 2006/11/16 13:12:43 henning Exp $ */ /* * Copyright (c) 2002 Michael Shalayeff. All rights reserved. @@ -779,6 +779,10 @@ carp_sysctl(int *name, u_int namelen, void *oldp, size_t *oldlenp, void *newp, void carpattach(int n) { + struct ifg_group *ifg; + + if ((ifg = if_creategroup("carp")) != NULL) + ifg->ifg_refcnt++; /* keep around even if empty */ if_clone_attach(&carp_cloner); } |