diff options
author | Angelos D. Keromytis <angelos@cvs.openbsd.org> | 2002-06-07 05:07:34 +0000 |
---|---|---|
committer | Angelos D. Keromytis <angelos@cvs.openbsd.org> | 2002-06-07 05:07:34 +0000 |
commit | 63623e2d0bc0f98290056133f85a86a293d45153 (patch) | |
tree | 2ec9852d44d2fda990f91ad8b88b8ed77528fdc0 /sbin | |
parent | 4db144e990928baa765d9b66c12b7e619e76a895 (diff) |
Send a flow type.
Diffstat (limited to 'sbin')
-rw-r--r-- | sbin/isakmpd/pf_key_v2.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/sbin/isakmpd/pf_key_v2.c b/sbin/isakmpd/pf_key_v2.c index 3428ce371ad..778b04358e8 100644 --- a/sbin/isakmpd/pf_key_v2.c +++ b/sbin/isakmpd/pf_key_v2.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pf_key_v2.c,v 1.104 2002/06/06 18:35:15 ho Exp $ */ +/* $OpenBSD: pf_key_v2.c,v 1.105 2002/06/07 05:07:33 angelos Exp $ */ /* $EOM: pf_key_v2.c,v 1.79 2000/12/12 00:33:19 niklas Exp $ */ /* @@ -1492,10 +1492,17 @@ pf_key_v2_set_spi (struct sa *sa, struct proto *proto, int incoming, #ifdef SADB_X_EXT_FLOW_TYPE /* Setup the flow type extension. */ bzero (&flowtype, sizeof flowtype); - flowtype.sadb_protocol_exttype = SADB_X_EXT_PROTOCOL; + flowtype.sadb_protocol_exttype = SADB_X_EXT_FLOW_TYPE; flowtype.sadb_protocol_len = sizeof flowtype / PF_KEY_V2_CHUNK; flowtype.sadb_protocol_direction = incoming ? IPSP_DIRECTION_IN : IPSP_DIRECTION_OUT; + + if (pf_key_v2_msg_add (update, (struct sadb_ext *)&flowtype, 0) == -1) + goto cleanup; + + bzero (&flowtype, sizeof flowtype); + flowtype.sadb_protocol_exttype = SADB_X_EXT_PROTOCOL; + flowtype.sadb_protocol_len = sizeof flowtype / PF_KEY_V2_CHUNK; flowtype.sadb_protocol_proto = isa->tproto; if (pf_key_v2_msg_add (update, (struct sadb_ext *)&flowtype, 0) == -1) |