* [PATCH net-next] don't compare skb->network_header with skb->tail
@ 2013-03-10 8:42 Hong Zhiguo
2013-03-10 20:52 ` David Miller
0 siblings, 1 reply; 4+ messages in thread
From: Hong Zhiguo @ 2013-03-10 8:42 UTC (permalink / raw)
To: netdev, davem, stephen; +Cc: zhiguo.hong, Hong Zhiguo
in the case of NET_SKBUFF_DATA_USES_OFFSET(on 64-bit arch),
skb->network_header is just offset over skb->head.
Signed-off-by: Hong Zhiguo <honkiko@gmail.com>
---
net/core/dev.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/core/dev.c b/net/core/dev.c
index 90cee5b..378e0b9 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -1705,7 +1705,7 @@ static void dev_queue_xmit_nit(struct sk_buff *skb, struct net_device *dev)
skb_reset_mac_header(skb2);
if (skb_network_header(skb2) < skb2->data ||
- skb2->network_header > skb2->tail) {
+ skb_network_header(skb2) > skb2->tail) {
net_crit_ratelimited("protocol %04x is buggy, dev %s\n",
ntohs(skb2->protocol),
dev->name);
--
1.7.10.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH net-next] don't compare skb->network_header with skb->tail
@ 2013-03-10 9:15 Hong Zhiguo
2013-03-10 9:48 ` Eric Dumazet
0 siblings, 1 reply; 4+ messages in thread
From: Hong Zhiguo @ 2013-03-10 9:15 UTC (permalink / raw)
To: netdev, davem, stephen; +Cc: zhiguo.hong, Hong Zhiguo
in the case of NET_SKBUFF_DATA_USES_OFFSET(on 64-bit arch),
skb->network_header is just offset over skb->head.
Signed-off-by: Hong Zhiguo <honkiko@gmail.com>
---
net/core/dev.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/core/dev.c b/net/core/dev.c
index 90cee5b..378e0b9 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -1705,7 +1705,7 @@ static void dev_queue_xmit_nit(struct sk_buff *skb, struct net_device *dev)
skb_reset_mac_header(skb2);
if (skb_network_header(skb2) < skb2->data ||
- skb2->network_header > skb2->tail) {
+ skb_network_header(skb2) > skb2->tail) {
net_crit_ratelimited("protocol %04x is buggy, dev %s\n",
ntohs(skb2->protocol),
dev->name);
--
1.7.10.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH net-next] don't compare skb->network_header with skb->tail
2013-03-10 9:15 Hong Zhiguo
@ 2013-03-10 9:48 ` Eric Dumazet
0 siblings, 0 replies; 4+ messages in thread
From: Eric Dumazet @ 2013-03-10 9:48 UTC (permalink / raw)
To: Hong Zhiguo; +Cc: netdev, davem, stephen, zhiguo.hong
On Sun, 2013-03-10 at 17:15 +0800, Hong Zhiguo wrote:
> in the case of NET_SKBUFF_DATA_USES_OFFSET(on 64-bit arch),
> skb->network_header is just offset over skb->head.
>
> Signed-off-by: Hong Zhiguo <honkiko@gmail.com>
> ---
> net/core/dev.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/net/core/dev.c b/net/core/dev.c
> index 90cee5b..378e0b9 100644
> --- a/net/core/dev.c
> +++ b/net/core/dev.c
> @@ -1705,7 +1705,7 @@ static void dev_queue_xmit_nit(struct sk_buff *skb, struct net_device *dev)
> skb_reset_mac_header(skb2);
>
> if (skb_network_header(skb2) < skb2->data ||
> - skb2->network_header > skb2->tail) {
> + skb_network_header(skb2) > skb2->tail) {
> net_crit_ratelimited("protocol %04x is buggy, dev %s\n",
> ntohs(skb2->protocol),
> dev->name);
Sorry I dont understand this patch.
Could you elaborate ?
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH net-next] don't compare skb->network_header with skb->tail
2013-03-10 8:42 [PATCH net-next] don't compare skb->network_header with skb->tail Hong Zhiguo
@ 2013-03-10 20:52 ` David Miller
0 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2013-03-10 20:52 UTC (permalink / raw)
To: honkiko; +Cc: netdev, stephen, zhiguo.hong
From: Hong Zhiguo <honkiko@gmail.com>
Date: Sun, 10 Mar 2013 16:42:07 +0800
> in the case of NET_SKBUFF_DATA_USES_OFFSET(on 64-bit arch),
> skb->network_header is just offset over skb->head.
>
> Signed-off-by: Hong Zhiguo <honkiko@gmail.com>
So is skb->tail, so there is no problem.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-03-10 20:52 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-10 8:42 [PATCH net-next] don't compare skb->network_header with skb->tail Hong Zhiguo
2013-03-10 20:52 ` David Miller
-- strict thread matches above, loose matches on Subject: below --
2013-03-10 9:15 Hong Zhiguo
2013-03-10 9:48 ` Eric Dumazet
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).