sys/net/ip6fw/ip6_fw.c: disable esp option

Hiroki Sato hrs at allbsd.org
Tue Dec 28 02:41:20 PST 2004


Hi,

 Here is a patch to disable the ESP option for ip6fw which does
 not work properly.

Fix conditions since ip6fw does not handle ESP correctly.

Obtained from:	FreeBSD (ip6_fw.c:1.2.2.9->1.2.2.10)

Index: ip6_fw.c
===================================================================
RCS file: /cvs/src/sys/net/ip6fw/ip6_fw.c,v
retrieving revision 1.10
diff -d -u -I\$FreeBSD:.*\$ -I\$NetBSD:.*\$ -I\$OpenBSD:.*\$ -I\$DragonFly:.*\$ -I\$Id:.*\$ -I\$hrs:.*\$ -r1.10 ip6_fw.c
--- ip6_fw.c	2 Aug 2004 13:22:33 -0000	1.10
+++ ip6_fw.c	28 Dec 2004 09:38:38 -0000
@@ -289,19 +289,17 @@
 			case IPPROTO_ESP:
 				opts &= ~IPV6_FW_IP6OPT_ESP;
 				nopts &= ~IPV6_FW_IP6OPT_ESP;
-				break;
+				goto opts_check;
 			case IPPROTO_NONE:
 				opts &= ~IPV6_FW_IP6OPT_NONXT;
 				nopts &= ~IPV6_FW_IP6OPT_NONXT;
 				goto opts_check;
-				break;
 			case IPPROTO_DSTOPTS:
 				opts &= ~IPV6_FW_IP6OPT_OPTS;
 				nopts &= ~IPV6_FW_IP6OPT_OPTS;
 				break;
 			default:
 				goto opts_check;
-				break;
 			}
 			*off += (ip6e->ip6e_len + 1) << 3;
 			break;
Attachment:
pgp00022.pgp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pgp00022.pgp
Type: application/octet-stream
Size: 187 bytes
Desc: "Description: PGP signature"
URL: <http://lists.dragonflybsd.org/pipermail/submit/attachments/20041228/764b10ed/attachment-0018.obj>


More information about the Submit mailing list