NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: bin/39056: setkey doesn't support correctly icmp
The following reply was made to PR bin/39056; it has been noted by GNATS.
From: Michael van Elst <mlelstv%henery.1st.de@localhost>
To: gnats-bugs%gnats.netbsd.org@localhost
Cc:
Subject: Re: bin/39056: setkey doesn't support correctly icmp
Date: Sun, 26 Oct 2008 13:04:08 +0100
Here is a patch that works for me, also under netbsd-4:
Index: parse.y
===================================================================
RCS file: /cvsroot/src/crypto/dist/ipsec-tools/src/setkey/parse.y,v
retrieving revision 1.10
diff -u -r1.10 parse.y
--- parse.y 18 Jul 2007 12:07:52 -0000 1.10
+++ parse.y 26 Oct 2008 12:01:51 -0000
@@ -565,10 +565,11 @@
last_msg_type = SADB_X_SPDADD;
#endif
- /* fixed port fields if ulp is icmpv6 */
+ /* fixed port fields if ulp is icmp */
if ($10.buf != NULL) {
- if ( ($9 != IPPROTO_ICMPV6) &&
- ($9 != IPPROTO_MH))
+ if (($9 != IPPROTO_ICMPV6) &&
+ ($9 != IPPROTO_ICMP) &&
+ ($9 != IPPROTO_MH))
return -1;
free($5.buf);
free($8.buf);
@@ -613,9 +614,10 @@
int status;
struct addrinfo *src, *dst;
- /* fixed port fields if ulp is icmpv6 */
+ /* fixed port fields if ulp is icmp */
if ($10.buf != NULL) {
if (($9 != IPPROTO_ICMPV6) &&
+ ($9 != IPPROTO_ICMP) &&
($9 != IPPROTO_MH))
return -1;
free($5.buf);
--
Michael van Elst
Internet: mlelstv%serpens.de@localhost
"A potential Snark may lurk in every tree."
Home |
Main Index |
Thread Index |
Old Index