Skip to contentSkip to conversation

net: bridge: fix sign bug

PATCH Applied Kulikov Vasiliy 3 participants 3 messages Jul 15, 2010 – Jul 16, 2010

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 7/8 net: bridge: fix sign bug

ipv6_skip_exthdr() can return error code that is below zero. 'offset' is unsigned, so it makes no sense. ipv6_skip_exthdr() returns 'int' so we can painlessly change type of offset to int.

---
 net/bridge/br_multicast.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
net/bridge/br_multicast.c +1 -1
index 27ae946..85afcda 100644
@@ -1435,7 +1435,7 @@ static int br_multicast_ipv6_rcv(struct net_bridge *br,
 	struct icmp6hdr *icmp6h;
 	u8 nexthdr;
 	unsigned len;
-	unsigned offset;
+	int offset;
 	int err;
 
 	if (!pskb_may_pull(skb, sizeof(*ip6h)))
Signature · 1 line
1.7.0.4
Acked-by on v1 7/8
#1 lore raw
Quoted 15 lines · On Thu, 15 Jul 2010 22:47:33 +0400 Kulikov Vasiliy <[email protected]> wrote:

ipv6_skip_exthdr() can return error code that is below zero. 'offset' is unsigned, so it makes no sense. ipv6_skip_exthdr() returns 'int' so we can painlessly change type of offset to int.

---
 net/bridge/br_multicast.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
net/bridge/br_multicast.c +0 -0
index 27ae946..85afcda 100644

net/bridge/br_multicast.c static int br_multicast_ipv6_rcv(struct net_bridge *br, · line 1441

Quoted 8 lines
net/bridge/br_multicast.c +1 -1
@@ -1435,7 +1435,7 @@ static int br_multicast_ipv6_rcv(struct net_bridge *br,
 	struct icmp6hdr *icmp6h;
 	u8 nexthdr;
 	unsigned len;
-	unsigned offset;
+	int offset;
 	int err;
 
 	if (!pskb_may_pull(skb, sizeof(*ip6h)))
maintainer Applied
#2 lore raw

From: Stephen Hemminger <[email protected]>
Date: Thu, 15 Jul 2010 12:21:44 -0700

Quoted 9 lines
Quoted 6 lines · On Thu, 15 Jul 2010 22:47:33 +0400 Kulikov Vasiliy <[email protected]> wrote:

ipv6_skip_exthdr() can return error code that is below zero. 'offset' is unsigned, so it makes no sense. ipv6_skip_exthdr() returns 'int' so we can painlessly change type of offset to int.

...

Quoted 1 line

Applied.