aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/configfs.h
diff options
context:
space:
mode:
authorToshiaki Makita <makita.toshiaki@lab.ntt.co.jp>2018-03-29 19:05:30 +0900
committerDavid S. Miller <davem@davemloft.net>2018-03-30 12:36:27 -0400
commitc769accdf3d8a103940bea2979b65556718567e9 (patch)
tree67df9144cea6262fc7660a1c8cc0556df7bf0a8b /include/linux/configfs.h
parentnet: Fix untag for vlan packets without ethernet header (diff)
downloadlinux-dev-c769accdf3d8a103940bea2979b65556718567e9.tar.xz
linux-dev-c769accdf3d8a103940bea2979b65556718567e9.zip
vlan: Fix vlan insertion for packets without ethernet header
In some situation vlan packets do not have ethernet headers. One example is packets from tun devices. Users can specify vlan protocol in tun_pi field instead of IP protocol. When we have a vlan device with reorder_hdr disabled on top of the tun device, such packets from tun devices are untagged in skb_vlan_untag() and vlan headers will be inserted back in vlan_insert_inner_tag(). vlan_insert_inner_tag() however did not expect packets without ethernet headers, so in such a case size argument for memmove() underflowed. We don't need to copy headers for packets which do not have preceding headers of vlan headers, so skip memmove() in that case. Also don't write vlan protocol in skb->data when it does not have enough room for it. Fixes: cbe7128c4b92 ("vlan: Fix out of order vlan headers with reorder header off") Signed-off-by: Toshiaki Makita <makita.toshiaki@lab.ntt.co.jp> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/configfs.h')
0 files changed, 0 insertions, 0 deletions