* [B.A.T.M.A.N.] [PATCHv2 maint] batman-adv: fix VLAN Ethernet header access
@ 2013-05-09 14:16 Antonio Quartulli
2013-05-09 16:07 ` Marek Lindner
0 siblings, 1 reply; 5+ messages in thread
From: Antonio Quartulli @ 2013-05-09 14:16 UTC (permalink / raw)
To: b.a.t.m.a.n; +Cc: Antonio Quartulli
From: Antonio Quartulli <antonio@open-mesh.com>
In interface_rx() skb->data cannot be directly used to
access the Ethernet header because it point to the batman
one.
Signed-off-by: Antonio Quartulli <antonio@open-mesh.com>
---
v2:
- use vlan_eth_hdr()
soft-interface.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/soft-interface.c b/soft-interface.c
index 6f20d33..114d10d 100644
--- a/soft-interface.c
+++ b/soft-interface.c
@@ -320,7 +320,7 @@ void batadv_interface_rx(struct net_device *soft_iface,
switch (ntohs(ethhdr->h_proto)) {
case ETH_P_8021Q:
- vhdr = (struct vlan_ethhdr *)skb->data;
+ vhdr = vlan_eth_hdr(skb);
vid = ntohs(vhdr->h_vlan_TCI) & VLAN_VID_MASK;
if (vhdr->h_vlan_encapsulated_proto != ethertype)
--
1.8.1.5
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [B.A.T.M.A.N.] [PATCHv2 maint] batman-adv: fix VLAN Ethernet header access
2013-05-09 14:16 [B.A.T.M.A.N.] [PATCHv2 maint] batman-adv: fix VLAN Ethernet header access Antonio Quartulli
@ 2013-05-09 16:07 ` Marek Lindner
2013-05-09 16:44 ` Antonio Quartulli
0 siblings, 1 reply; 5+ messages in thread
From: Marek Lindner @ 2013-05-09 16:07 UTC (permalink / raw)
To: b.a.t.m.a.n; +Cc: Antonio Quartulli, Antonio Quartulli
On Thursday, May 09, 2013 22:16:49 Antonio Quartulli wrote:
> From: Antonio Quartulli <antonio@open-mesh.com>
>
> In interface_rx() skb->data cannot be directly used to
> access the Ethernet header because it point to the batman
> one.
You don't believe that these calls (shortly before the code chunks you are
changing) are helpful ?
skb_pull_rcsum(skb, hdr_size);
skb_reset_mac_header(skb);
Cheers,
Marek
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [B.A.T.M.A.N.] [PATCHv2 maint] batman-adv: fix VLAN Ethernet header access
2013-05-09 16:07 ` Marek Lindner
@ 2013-05-09 16:44 ` Antonio Quartulli
2013-05-10 3:37 ` Marek Lindner
0 siblings, 1 reply; 5+ messages in thread
From: Antonio Quartulli @ 2013-05-09 16:44 UTC (permalink / raw)
To: The list for a Better Approach To Mobile Ad-hoc Networking
Cc: Antonio Quartulli
[-- Attachment #1: Type: text/plain, Size: 723 bytes --]
On Fri, May 10, 2013 at 12:07:08AM +0800, Marek Lindner wrote:
> On Thursday, May 09, 2013 22:16:49 Antonio Quartulli wrote:
> > From: Antonio Quartulli <antonio@open-mesh.com>
> >
> > In interface_rx() skb->data cannot be directly used to
> > access the Ethernet header because it point to the batman
> > one.
>
> You don't believe that these calls (shortly before the code chunks you are
> changing) are helpful ?
>
> skb_pull_rcsum(skb, hdr_size);
> skb_reset_mac_header(skb);
You are right. Hence this is not fixing anything. It is just a beautification
and therefore we don't need it in maint.
Cheers,
--
Antonio Quartulli
..each of us alone is worth nothing..
Ernesto "Che" Guevara
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [B.A.T.M.A.N.] [PATCHv2 maint] batman-adv: fix VLAN Ethernet header access
2013-05-09 16:44 ` Antonio Quartulli
@ 2013-05-10 3:37 ` Marek Lindner
2013-05-10 6:16 ` Antonio Quartulli
0 siblings, 1 reply; 5+ messages in thread
From: Marek Lindner @ 2013-05-10 3:37 UTC (permalink / raw)
To: The list for a Better Approach To Mobile Ad-hoc Networking
On Friday, May 10, 2013 00:44:26 Antonio Quartulli wrote:
> On Fri, May 10, 2013 at 12:07:08AM +0800, Marek Lindner wrote:
> > On Thursday, May 09, 2013 22:16:49 Antonio Quartulli wrote:
> > > From: Antonio Quartulli <antonio@open-mesh.com>
> > >
> > >
> > >
> > > In interface_rx() skb->data cannot be directly used to
> > > access the Ethernet header because it point to the batman
> > > one.
> >
> >
> >
> > You don't believe that these calls (shortly before the code chunks you
> > are changing) are helpful ?
> >
> >
> >
> > skb_pull_rcsum(skb, hdr_size);
> > skb_reset_mac_header(skb);
>
> You are right. Hence this is not fixing anything. It is just a
> beautification and therefore we don't need it in maint.
Are you going to resend the patch with an updated commit message and subject
line ?
Cheers,
Marek
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [B.A.T.M.A.N.] [PATCHv2 maint] batman-adv: fix VLAN Ethernet header access
2013-05-10 3:37 ` Marek Lindner
@ 2013-05-10 6:16 ` Antonio Quartulli
0 siblings, 0 replies; 5+ messages in thread
From: Antonio Quartulli @ 2013-05-10 6:16 UTC (permalink / raw)
To: The list for a Better Approach To Mobile Ad-hoc Networking
[-- Attachment #1: Type: text/plain, Size: 1170 bytes --]
On Fri, May 10, 2013 at 11:37:55AM +0800, Marek Lindner wrote:
> On Friday, May 10, 2013 00:44:26 Antonio Quartulli wrote:
> > On Fri, May 10, 2013 at 12:07:08AM +0800, Marek Lindner wrote:
> > > On Thursday, May 09, 2013 22:16:49 Antonio Quartulli wrote:
> > > > From: Antonio Quartulli <antonio@open-mesh.com>
> > > >
> > > >
> > > >
> > > > In interface_rx() skb->data cannot be directly used to
> > > > access the Ethernet header because it point to the batman
> > > > one.
> > >
> > >
> > >
> > > You don't believe that these calls (shortly before the code chunks you
> > > are changing) are helpful ?
> > >
> > >
> > >
> > > skb_pull_rcsum(skb, hdr_size);
> > > skb_reset_mac_header(skb);
> >
> > You are right. Hence this is not fixing anything. It is just a
> > beautification and therefore we don't need it in maint.
>
> Are you going to resend the patch with an updated commit message and subject
> line ?
I'll take some time to find and beautify other similar spots.
Then I'll resend the updated patch for master.
Cheers,
--
Antonio Quartulli
..each of us alone is worth nothing..
Ernesto "Che" Guevara
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2013-05-10 6:16 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-05-09 14:16 [B.A.T.M.A.N.] [PATCHv2 maint] batman-adv: fix VLAN Ethernet header access Antonio Quartulli
2013-05-09 16:07 ` Marek Lindner
2013-05-09 16:44 ` Antonio Quartulli
2013-05-10 3:37 ` Marek Lindner
2013-05-10 6:16 ` Antonio Quartulli
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.