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)
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
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,
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
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,
b.a.t.m.a.n@lists.open-mesh.org