Start refcounting interface groups with 1. if_creategroup() returns
authorbluhm <bluhm@openbsd.org>
Mon, 8 Feb 2021 12:30:10 +0000 (12:30 +0000)
committerbluhm <bluhm@openbsd.org>
Mon, 8 Feb 2021 12:30:10 +0000 (12:30 +0000)
commit9175e92e0e82e36b9bd626fe61911e124c04013e
treea019da6e3d9d5626b0cc64fd06e31038b21ad7f6
parentc98f50801e1e361ce5b8b554989b1ad273e9fc7a
Start refcounting interface groups with 1.  if_creategroup() returns
a new object that is already refcounted, so carp attach does not
reach into internal structures.  Add kasserts to detect counter
overflow or underflow.
OK mvs@
sys/net/if.c
sys/netinet/ip_carp.c