isdn: type bug in isdn_net_header()
Subsystems (3)
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
@@ -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 :
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.Signed-off-by Dan Carpenter <[email protected]>---
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
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
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.Signed-off-by Dan Carpenter <[email protected]>---
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@@ -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
-0switch (lp->p_encap) {case ISDN_NET_ENCAP_ETHER :Looks reasonable
Acked-by Neil Horman <[email protected]>
Applied, thanks.