Skip to contentSkip to conversation

isdn: type bug in isdn_net_header()

PATCH Applied Dan Carpenter 3 participants 3 messages Feb 9, 2012

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

PATCH 1/1 isdn: type bug in isdn_net_header()

We use len to store the return value from eth_header(). eth_header() can return -ETH_HLEN (-14). We want to pass this back instead of truncating it to 65522 and returning that.

---
WARNING: Compile tested only. I don't have this hardware. Please check that I am on the right track.

drivers/isdn/i4l/isdn_net.c +1 -1
index 2339d73..802ab87 100644
@@ -1901,7 +1901,7 @@ static int isdn_net_header(struct sk_buff *skb, struct net_device *dev,
 {
 	isdn_net_local *lp = netdev_priv(dev);
 	unsigned char *p;
-	ushort len = 0;
+	int len = 0;
 
 	switch (lp->p_encap) {
 		case ISDN_NET_ENCAP_ETHER:
Acked-by on v1 1/1
#1 lore raw
Quoted 15 lines · Dan Carpenter

We use len to store the return value from eth_header(). eth_header() can return -ETH_HLEN (-14). We want to pass this back instead of truncating it to 65522 and returning that.

---
WARNING: Compile tested only. I don't have this hardware. Please check that I am on the right track.

drivers/isdn/i4l/isdn_net.c +0 -0
index 2339d73..802ab87 100644

drivers/isdn/i4l/isdn_net.c static int isdn_net_header(struct sk_buff *skb, struct net_device *dev, · line 1907

Quoted 8 lines
drivers/isdn/i4l/isdn_net.c +1 -1
@@ -1901,7 +1901,7 @@ static int isdn_net_header(struct sk_buff *skb, struct net_device *dev,
 {
 	isdn_net_local *lp = netdev_priv(dev);
 	unsigned char *p;
-	ushort len = 0;
+	int len = 0;
 
 	switch (lp->p_encap) {
 		case ISDN_NET_ENCAP_ETHER:

Looks reasonable

maintainer Applied
#2 lore raw

From: Neil Horman <[email protected]>
Date: Thu, 9 Feb 2012 06:34:11 -0500

Quoted 21 lines · Dan Carpenter
Quoted 20 lines

We use len to store the return value from eth_header(). eth_header() can return -ETH_HLEN (-14). We want to pass this back instead of truncating it to 65522 and returning that.

---
WARNING: Compile tested only. I don't have this hardware. Please check that I am on the right track.

drivers/isdn/i4l/isdn_net.c +1 -1
index 2339d73..802ab87 100644
@@ -1901,7 +1901,7 @@ static int isdn_net_header(struct sk_buff *skb, struct net_device *dev,
 {
 	isdn_net_local *lp = netdev_priv(dev);
 	unsigned char *p;
-	ushort len = 0;
+	int len = 0;
 
Quoted 5 lines

drivers/isdn/i4l/isdn_net.c static int isdn_net_header(struct sk_buff *skb, struct net_device *dev, · line 1907

Quoted 3 lines
drivers/isdn/i4l/isdn_net.c +0 -0
 	switch (lp->p_encap) {
 		case ISDN_NET_ENCAP_ETHER:

Looks reasonable

Applied, thanks.