All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 2.4 15/18]: Backport fixes for ip6t_multiport
@ 2004-12-20  7:15 Patrick McHardy
  0 siblings, 0 replies; only message in thread
From: Patrick McHardy @ 2004-12-20  7:15 UTC (permalink / raw)
  To: David S. Miller; +Cc: netfilter-devel

[-- Attachment #1: Type: text/plain, Size: 36 bytes --]

Backport fixes for ip6t_multiport.


[-- Attachment #2: 15.diff --]
[-- Type: text/x-patch, Size: 1742 bytes --]

# This is a BitKeeper generated diff -Nru style patch.
#
# ChangeSet
#   2004/12/05 23:32:41+01:00 yasuyuki.kozakai@toshiba.co.jp 
#   [NETFILTER]: Backport fixes for ip6t_multiport
#   
#   This patch fixes following bugs in ip6t_multiport.c,
#   
#     - missing check the size of the preference data.
#     - IP6T_INV_PROTO should check with not ip->flags but ip->invflags.
#   
#   Signed-off-by: Yasuyuki KOZAKAI <yasuyuki.kozakai@toshiba.co.jp>
#   Signed-off-by: Patrick McHardy <kaber@trash.net>
# 
# net/ipv6/netfilter/ip6t_multiport.c
#   2004/12/05 23:32:39+01:00 yasuyuki.kozakai@toshiba.co.jp +4 -1
#   [NETFILTER]: Backport fixes for ip6t_multiport
#   
#   This patch fixes following bugs in ip6t_multiport.c,
#   
#     - missing check the size of the preference data.
#     - IP6T_INV_PROTO should check with not ip->flags but ip->invflags.
#   
#   Signed-off-by: Yasuyuki KOZAKAI <yasuyuki.kozakai@toshiba.co.jp>
#   Signed-off-by: Patrick McHardy <kaber@trash.net>
# 
diff -Nru a/net/ipv6/netfilter/ip6t_multiport.c b/net/ipv6/netfilter/ip6t_multiport.c
--- a/net/ipv6/netfilter/ip6t_multiport.c	2004-12-20 07:01:28 +01:00
+++ b/net/ipv6/netfilter/ip6t_multiport.c	2004-12-20 07:01:28 +01:00
@@ -74,9 +74,12 @@
 {
 	const struct ip6t_multiport *multiinfo = matchinfo;
 
+	if (matchsize != IP6T_ALIGN(sizeof(struct ip6t_multiport)))
+		return 0;
+
 	/* Must specify proto == TCP/UDP, no unknown flags or bad count */
 	return (ip->proto == IPPROTO_TCP || ip->proto == IPPROTO_UDP)
-		&& !(ip->flags & IP6T_INV_PROTO)
+		&& !(ip->invflags & IP6T_INV_PROTO)
 		&& matchsize == IP6T_ALIGN(sizeof(struct ip6t_multiport))
 		&& (multiinfo->flags == IP6T_MULTIPORT_SOURCE
 		    || multiinfo->flags == IP6T_MULTIPORT_DESTINATION

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2004-12-20  7:15 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-12-20  7:15 [PATCH 2.4 15/18]: Backport fixes for ip6t_multiport Patrick McHardy

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.