diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 2015-04-30 20:12:34 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 2015-04-30 20:12:34 +0000 |
commit | 8de7b6a80a17496383907bde20cf857490e24a51 (patch) | |
tree | 6911c02297e5749077e1cb45dfbbac170ebee196 /sys/netinet/ip_spd.c | |
parent | 19020bf172816eb3561bbdbbcf3662d9d1c0085f (diff) |
Merge two identical if() statements in ipsp_acquire_sa(). The
change in ip_spd.c 1.59 makes it appear that there is a cut & pasto.
OK mikeb@
Diffstat (limited to 'sys/netinet/ip_spd.c')
-rw-r--r-- | sys/netinet/ip_spd.c | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/sys/netinet/ip_spd.c b/sys/netinet/ip_spd.c index 25badb35855..6ade3de7b41 100644 --- a/sys/netinet/ip_spd.c +++ b/sys/netinet/ip_spd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ip_spd.c,v 1.83 2015/04/16 19:24:13 markus Exp $ */ +/* $OpenBSD: ip_spd.c,v 1.84 2015/04/30 20:12:33 millert Exp $ */ /* * The author of this code is Angelos D. Keromytis (angelos@cis.upenn.edu) * @@ -687,15 +687,13 @@ ipsp_acquire_sa(struct ipsec_policy *ipo, union sockaddr_union *gw, if (ipsp_is_unspecified(ipo->ipo_dst)) { ipa->ipa_info.sen_ip_src = ddst->sen_ip_src; ipa->ipa_mask.sen_ip_src.s_addr = INADDR_BROADCAST; - } else { - ipa->ipa_info.sen_ip_src = ipo->ipo_addr.sen_ip_src; - ipa->ipa_mask.sen_ip_src = ipo->ipo_mask.sen_ip_src; - } - if (ipsp_is_unspecified(ipo->ipo_dst)) { ipa->ipa_info.sen_ip_dst = ddst->sen_ip_dst; ipa->ipa_mask.sen_ip_dst.s_addr = INADDR_BROADCAST; } else { + ipa->ipa_info.sen_ip_src = ipo->ipo_addr.sen_ip_src; + ipa->ipa_mask.sen_ip_src = ipo->ipo_mask.sen_ip_src; + ipa->ipa_info.sen_ip_dst = ipo->ipo_addr.sen_ip_dst; ipa->ipa_mask.sen_ip_dst = ipo->ipo_mask.sen_ip_dst; } @@ -723,15 +721,13 @@ ipsp_acquire_sa(struct ipsec_policy *ipo, union sockaddr_union *gw, if (ipsp_is_unspecified(ipo->ipo_dst)) { ipa->ipa_info.sen_ip6_src = ddst->sen_ip6_src; ipa->ipa_mask.sen_ip6_src = in6mask128; - } else { - ipa->ipa_info.sen_ip6_src = ipo->ipo_addr.sen_ip6_src; - ipa->ipa_mask.sen_ip6_src = ipo->ipo_mask.sen_ip6_src; - } - if (ipsp_is_unspecified(ipo->ipo_dst)) { ipa->ipa_info.sen_ip6_dst = ddst->sen_ip6_dst; ipa->ipa_mask.sen_ip6_dst = in6mask128; } else { + ipa->ipa_info.sen_ip6_src = ipo->ipo_addr.sen_ip6_src; + ipa->ipa_mask.sen_ip6_src = ipo->ipo_mask.sen_ip6_src; + ipa->ipa_info.sen_ip6_dst = ipo->ipo_addr.sen_ip6_dst; ipa->ipa_mask.sen_ip6_dst = ipo->ipo_mask.sen_ip6_dst; } |