* Return 0 when there are known to be no SP's for the specified * direction. Otherwise return 1. This is used by IPsec code * to optimize performance. */
| 797 | * to optimize performance. |
| 798 | */ |
| 799 | int |
| 800 | key_havesp(u_int dir) |
| 801 | { |
| 802 | |
| 803 | return (dir == IPSEC_DIR_INBOUND || dir == IPSEC_DIR_OUTBOUND ? |
| 804 | TAILQ_FIRST(&V_sptree[dir]) != NULL : 1); |
| 805 | } |
| 806 | |
| 807 | /* %%% IPsec policy management */ |
| 808 | /* |
no outgoing calls
no test coverage detected