Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/crypto/dist/ipsec-tools/src/racoon PR/50815: David Binderman...
details: https://anonhg.NetBSD.org/src/rev/decaa37ebe5e
branches: trunk
changeset: 343637:decaa37ebe5e
user: christos <christos%NetBSD.org@localhost>
date: Wed Feb 17 20:11:17 2016 +0000
description:
PR/50815: David Binderman: Remove dup test
diffstat:
crypto/dist/ipsec-tools/src/racoon/cfparse.y | 13 +++++++++----
1 files changed, 9 insertions(+), 4 deletions(-)
diffs (28 lines):
diff -r 136155879275 -r decaa37ebe5e crypto/dist/ipsec-tools/src/racoon/cfparse.y
--- a/crypto/dist/ipsec-tools/src/racoon/cfparse.y Wed Feb 17 20:05:45 2016 +0000
+++ b/crypto/dist/ipsec-tools/src/racoon/cfparse.y Wed Feb 17 20:11:17 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cfparse.y,v 1.48 2012/11/29 15:31:24 vanhu Exp $ */
+/* $NetBSD: cfparse.y,v 1.49 2016/02/17 20:11:17 christos Exp $ */
/* Id: cfparse.y,v 1.66 2006/08/22 18:17:17 manubsd Exp */
@@ -1490,10 +1490,15 @@
char portbuf[10];
struct sockaddr *saddr;
- if (($5 == IPPROTO_ICMP || $5 == IPPROTO_ICMPV6)
- && ($4 != IPSEC_PORT_ANY || $4 != IPSEC_PORT_ANY)) {
- yyerror("port number must be \"any\".");
+ switch ($5) {
+ case IPPROTO_ICMP:
+ case IPPROTO_ICMPV6:
+ if ($4 == IPSEC_PORT_ANY)
+ break;
+ yyerror("port must be \"any\" for icmp{,6}.");
return -1;
+ default:
+ break;
}
snprintf(portbuf, sizeof(portbuf), "%lu", $4);
Home |
Main Index |
Thread Index |
Old Index