diff options
author | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2009-01-29 15:37:10 +0000 |
---|---|---|
committer | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2009-01-29 15:37:10 +0000 |
commit | 58f230fcb0be6bf85c48fdb952c363f4faa83ade (patch) | |
tree | d7503359fe2e4bc4e5fbaba218e5da83796b2955 | |
parent | 918698bb05b92f67c533ab74ced8fcbfbf709980 (diff) |
After checking that peer == NULL do not assign peer = NULL a few
lines later. No functional change.
ok grunk@, hshoexer@
-rw-r--r-- | sbin/ipsecctl/parse.y | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/sbin/ipsecctl/parse.y b/sbin/ipsecctl/parse.y index de5d70f0836..5bb5cab9772 100644 --- a/sbin/ipsecctl/parse.y +++ b/sbin/ipsecctl/parse.y @@ -1,4 +1,4 @@ -/* $OpenBSD: parse.y,v 1.142 2009/01/28 18:07:19 bluhm Exp $ */ +/* $OpenBSD: parse.y,v 1.143 2009/01/29 15:37:09 bluhm Exp $ */ /* * Copyright (c) 2002, 2003, 2004 Henning Brauer <henning@openbsd.org> @@ -2453,14 +2453,10 @@ set_rule_peers(struct ipsec_rule *r, struct ipsec_hosts *peers) if (r->peer == NULL) { /* Set peer to remote host. Must be a host address. */ if (r->direction == IPSEC_IN) { - if (r->src->netaddress) - r->peer = NULL; - else + if (!r->src->netaddress) r->peer = copyhost(r->src); } else { - if (r->dst->netaddress) - r->peer = NULL; - else + if (!r->dst->netaddress) r->peer = copyhost(r->dst); } } else if (r->peer->af == AF_UNSPEC) { |