Re: [B.A.T.M.A.N.] [PATCH maint 3/3] batman-adv: do not modify batadv packet header before pulling it

2018-03-16 Thread Sven Eckelmann
On Freitag, 16. März 2018 21:24:32 CET Sven Eckelmann wrote: > On Freitag, 16. März 2018 11:29:11 CET Matthias Schiffer wrote: > > + skb_push_rcsum(skb, hdr_size); > > This function is only available since Linux 4.7. Compat code support must > be added to avoid build problems with oler

Re: [B.A.T.M.A.N.] [PATCH maint 3/3] batman-adv: do not modify batadv packet header before pulling it

2018-03-16 Thread Sven Eckelmann
On Freitag, 16. März 2018 11:29:11 CET Matthias Schiffer wrote: > + skb_push_rcsum(skb, hdr_size); This function is only available since Linux 4.7. Compat code support must be added to avoid build problems with oler kernels. An example can be found in

Re: [B.A.T.M.A.N.] [PATCH maint 2/3] batman-adv: fix header size check in batadv_dbg_arp()

2018-03-16 Thread Matthias Schiffer
On 03/16/2018 12:31 PM, Sven Eckelmann wrote: > On Freitag, 16. März 2018 11:29:10 CET Matthias Schiffer wrote: >> Checking for 0 is insufficient: when an SKB without a batadv header, but >> with a VLAN header is received, hdr_size will be 4, making the following >> code interpret the Ethernet

Re: [B.A.T.M.A.N.] [PATCH maint 2/3] batman-adv: fix header size check in batadv_dbg_arp()

2018-03-16 Thread Sven Eckelmann
On Freitag, 16. März 2018 11:29:10 CET Matthias Schiffer wrote: > Checking for 0 is insufficient: when an SKB without a batadv header, but > with a VLAN header is received, hdr_size will be 4, making the following > code interpret the Ethernet header as a batadv header. > > Signed-off-by:

Re: [B.A.T.M.A.N.] [PATCH maint 3/3] batman-adv: do not modify batadv packet header before pulling it

2018-03-16 Thread Sven Eckelmann
On Freitag, 16. März 2018 11:29:11 CET Matthias Schiffer wrote: > batadv_check_unicast_ttvn() may modify the batadv header, leading to > checksum errors in the following processing of the packet. > > Rather than fixing up the checksum, simply pull the batadv header before > modifying it (and push

Re: [B.A.T.M.A.N.] [PATCH maint 1/3] batman-adv: update data pointers after skb_cow()

2018-03-16 Thread Sven Eckelmann
On Freitag, 16. März 2018 11:29:09 CET Matthias Schiffer wrote: > batadv_check_unicast_ttvn() calls skb_cow(), so pointers into the SKB data > must be (re)set after calling it. The ethhdr variable is dropped > altogether. > > Signed-off-by: Matthias Schiffer

[B.A.T.M.A.N.] [PATCH maint 1/3] batman-adv: update data pointers after skb_cow()

2018-03-16 Thread Matthias Schiffer
batadv_check_unicast_ttvn() calls skb_cow(), so pointers into the SKB data must be (re)set after calling it. The ethhdr variable is dropped altogether. Signed-off-by: Matthias Schiffer --- net/batman-adv/routing.c | 10 +- 1 file changed, 5 insertions(+),

[B.A.T.M.A.N.] [PATCH maint 2/3] batman-adv: fix header size check in batadv_dbg_arp()

2018-03-16 Thread Matthias Schiffer
Checking for 0 is insufficient: when an SKB without a batadv header, but with a VLAN header is received, hdr_size will be 4, making the following code interpret the Ethernet header as a batadv header. Signed-off-by: Matthias Schiffer ---