-/* $OpenBSD: rde.c,v 1.597 2023/03/21 14:52:36 claudio Exp $ */
+/* $OpenBSD: rde.c,v 1.598 2023/03/28 08:32:42 claudio Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
switch (aid) {
case AID_INET:
- if (peer->role != ROLE_CUSTOMER)
- return asp->aspa_state.onlyup_v4;
- else
+ if (peer->role == ROLE_CUSTOMER)
return asp->aspa_state.downup_v4;
- case AID_INET6:
- if (peer->role != ROLE_CUSTOMER)
- return asp->aspa_state.onlyup_v6;
else
+ return asp->aspa_state.onlyup_v4;
+ case AID_INET6:
+ if (peer->role == ROLE_CUSTOMER)
return asp->aspa_state.downup_v6;
+ else
+ return asp->aspa_state.onlyup_v6;
default:
return ASPA_NEVER_KNOWN; /* not reachable */
}