* [PATCH 2.4 16/18]: Backport fixes for ip6t_rt
@ 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: 29 bytes --]
Backport fixes for ip6t_rt.
[-- Attachment #2: 16.diff --]
[-- Type: text/x-patch, Size: 2442 bytes --]
# This is a BitKeeper generated diff -Nru style patch.
#
# ChangeSet
# 2004/12/05 23:33:54+01:00 yasuyuki.kozakai@toshiba.co.jp
# [NETFILTER]: Backport fixes for ip6t_rt
#
# This patch fixes the following bugs
#
# - Wrong cast the pointer to extension header.
# - "Segments Left" field in Routing Header isn't treated as 1 octet.
#
# Signed-off-by: Yasuyuki KOZAKAI <yasuyuki.kozakai@toshiba.co.jp>
# Signed-off-by: Patrick McHardy <kaber@trash.net>
#
# net/ipv6/netfilter/ip6t_rt.c
# 2004/12/05 23:33:52+01:00 yasuyuki.kozakai@toshiba.co.jp +4 -4
# [NETFILTER]: Backport fixes for ip6t_rt
#
# This patch fixes the following bugs
#
# - Wrong cast the pointer to extension header.
# - "Segments Left" field in Routing Header isn't treated as 1 octet.
#
# 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_rt.c b/net/ipv6/netfilter/ip6t_rt.c
--- a/net/ipv6/netfilter/ip6t_rt.c 2004-12-20 07:01:30 +01:00
+++ b/net/ipv6/netfilter/ip6t_rt.c 2004-12-20 07:01:30 +01:00
@@ -78,7 +78,7 @@
break;
}
- hdr=(struct ipv6_opt_hdr *)skb->data+ptr;
+ hdr=(struct ipv6_opt_hdr *)(skb->data+ptr);
/* Calculate the header length */
if (nexthdr == NEXTHDR_FRAGMENT) {
@@ -135,11 +135,11 @@
DEBUGP("IPv6 RT LEN %u %u ", hdrlen, route->hdrlen);
DEBUGP("TYPE %04X ", route->type);
- DEBUGP("SGS_LEFT %u %08X\n", ntohl(route->segments_left), ntohl(route->segments_left));
+ DEBUGP("SGS_LEFT %u %02X\n", route->segments_left, route->segments_left);
DEBUGP("IPv6 RT segsleft %02X ",
(segsleft_match(rtinfo->segsleft[0], rtinfo->segsleft[1],
- ntohl(route->segments_left),
+ route->segments_left,
!!(rtinfo->invflags & IP6T_RT_INV_SGS))));
DEBUGP("type %02X %02X %02X ",
rtinfo->rt_type, route->type,
@@ -158,7 +158,7 @@
ret = (route != NULL)
&&
(segsleft_match(rtinfo->segsleft[0], rtinfo->segsleft[1],
- ntohl(route->segments_left),
+ route->segments_left,
!!(rtinfo->invflags & IP6T_RT_INV_SGS)))
&&
(!(rtinfo->flags & IP6T_RT_LEN) ||
^ 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 16/18]: Backport fixes for ip6t_rt 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.