Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kernel: packet size is too short #1357

Closed
hfreire opened this issue Mar 21, 2016 · 9 comments
Closed

Kernel: packet size is too short #1357

hfreire opened this issue Mar 21, 2016 · 9 comments

Comments

@hfreire
Copy link

hfreire commented Mar 21, 2016

Hi,

I seem to be getting several of these when using nmap and other network scanning tools from my Raspberry Pi 3:

Mar 21 00:54:18 rpi8 kernel: [ 6369.882971] nmap: packet size is too short (42 <= 50)

All programs terminate with an error due to not being able to send packets.

Output of uname -a:
Linux rpi8 4.1.19-v7+ #853 SMP Wed Mar 9 18:09:16 GMT 2016 armv7l GNU/Linux

Note: I did test the same commands on a Raspberry Pi 2 and it did work. The output of uname -a on that one is:
Linux rpi3 4.1.7-v7+ #817 SMP PREEMPT Sat Sep 19 15:32:00 BST 2015 armv7l GNU/Linux

@pelwell
Copy link
Contributor

pelwell commented Mar 21, 2016

You can help by giving an example command that you run that causes the error.

@hfreire
Copy link
Author

hfreire commented Mar 21, 2016

root@rpi8 ~ # nmap 10.172.161.184

Starting Nmap 6.47 ( http://nmap.org ) at 2016-03-21 10:51 CET
WARNING: eth_send of ARP packet returned -1 rather than expected 42 (errno=22: Invalid argument)
WARNING: eth_send of ARP packet returned -1 rather than expected 42 (errno=22: Invalid argument)
Note: Host seems down. If it is really up, but blocking our ping probes, try -Pn
Nmap done: 1 IP address (0 hosts up) scanned in 0.87 seconds

@pelwell
Copy link
Contributor

pelwell commented Mar 21, 2016

I can confirm it fails on WiFi:

pi@raspberrypi:~$ sudo nmap 10.3.15.93
Starting Nmap 6.47 ( http://nmap.org ) at 2016-03-21 09:54 GMT
[232941.973936] nmap: packet size is too short (42 <= 50)
WARNING: eth_send of ARP packet returned -1 rather than expected 42 (errno=22: Invalid argument)
[232942.174190] nmap: packet size is too short (42 <= 50)
WARNING: eth_send of ARP packet returned -1 rather than expected 42 (errno=22: Invalid argument)
Note: Host seems down. If it is really up, but blocking our ping probes, try -Pn
Nmap done: 1 IP address (0 hosts up) scanned in 0.74 seconds

but works on Ethernet:

pi@raspberrypi:~$ sudo nmap 10.3.14.167
Starting Nmap 6.47 ( http://nmap.org ) at 2016-03-21 09:54 GMT
Nmap scan report for 10.3.14.167
Host is up (0.0011s latency).
Not shown: 995 closed ports
PORT     STATE SERVICE
22/tcp   open  ssh
111/tcp  open  rpcbind
139/tcp  open  netbios-ssn
445/tcp  open  microsoft-ds
2049/tcp open  nfs
MAC Address: 08:00:27:76:7C:99 (Cadmus Computer Systems)
Nmap done: 1 IP address (1 host up) scanned in 7.46 seconds

@hfreire
Copy link
Author

hfreire commented Mar 21, 2016

That's an interesting finding...

Could it be something specific with the new WiFi hardware? I haven't tried with a USB WiFi dongle yet.

Are you aware of anyway of bypassing/overriding that packet size without a kernel modification?

@pelwell
Copy link
Contributor

pelwell commented Mar 21, 2016

I suspect it's a problem with the driver for the WiFi interface. Broadcom have been alerted.

I'm not aware of any workarounds, but I'm not an expert - I can see that the MTUs for WiFi and Ethernet are both 1500 (as they should be), and that's my limit without a lot of digging through the networking stack and driver.

@pelwell
Copy link
Contributor

pelwell commented Mar 21, 2016

I had a WiFi dongle to hand:

pi@raspberrypi:~$ sudo nmap 10.3.15.93
Starting Nmap 6.47 ( http://nmap.org ) at 2016-03-21 10:18 GMT
Nmap scan report for 10.3.15.93
Host is up (0.053s latency).
Not shown: 993 filtered ports
PORT     STATE SERVICE
135/tcp  open  msrpc
139/tcp  open  netbios-ssn
445/tcp  open  microsoft-ds
2869/tcp open  icslap
3389/tcp open  ms-wbt-server
5800/tcp open  vnc-http
5900/tcp open  vnc
MAC Address: C4:D9:87:63:21:E4 (Intel Corporate)
Nmap done: 1 IP address (1 host up) scanned in 22.59 seconds

It's clearly not a problem common to all WiFi interfaces.

@clivem
Copy link

clivem commented Mar 21, 2016

I suspect it's a problem with the driver for the WiFi interface. Broadcom have been alerted.

I don't think it's the driver. The brcmfmac driver works just fine with nmap and other bcm43xxx hardware. I just checked nmap from a Wandboard (bcm4329). It works as expected. (Only code difference in the driver is your one-liner to disable power management on the Pi.) Anyway, it needs Broadcom to investigate....... I'd say it is specific to the variant of the brcm43xxx chipset being used on the Pi.

@pelwell
Copy link
Contributor

pelwell commented May 3, 2016

nmap works with the brcmfmac driver in the rpi-4.4.y tree (the current build tree). You could try a sudo rpi-update if you want to give it a try, or you can wait for the next sudo apt-get upgrade release.

pelwell pushed a commit that referenced this issue Jun 6, 2016
When using nmap tool with FMAC, the nmap packets were be dropped by kernel
because the size was too short. The kernel message showed like
"nmap: packet size is too short (42 <= 50)". It is caused by the packet
length is shorter than ndev->hard_header_len. According to LL_RESERVED_SPACE()
and hard_header_len definition, we should use hard_header_len to reserve L2
header, like ethernet header(ETH_HLEN) in our case and use needed_headroom for
the additional headroom needed by hardware.

[ Patch from Broadcom ]

See: #1357

Signed-off-by: Phil Elwell <[email protected]>
@pelwell
Copy link
Contributor

pelwell commented Jun 6, 2016

I've applied a Broadcom-supplied patch with the following commit message:

brcmfmac: use ndev->needed_headroom to reserve additional header space

When using nmap tool with FMAC, the nmap packets were be dropped by kernel
because the size was too short. The kernel message showed like
"nmap: packet size is too short (42 <= 50)". It is caused by the packet
length is shorter than ndev->hard_header_len. According to LL_RESERVED_SPACE()
and hard_header_len definition, we should use hard_header_len to reserve L2
header, like ethernet header(ETH_HLEN) in our case and use needed_headroom for
the additional headroom needed by hardware.

popcornmix added a commit to raspberrypi/firmware that referenced this issue Jun 8, 2016
kernel: Add ads1015 overlay
See: raspberrypi/linux#1520

kernel: brcmfmac: change rx_seq check log from error print to debug print
See: raspberrypi/linux#1313

kernel: brcmfmac: use ndev->needed_headroom to reserve additional header space
See: raspberrypi/linux#1357

kernel: brcmfmac: revise SDIO error message in brcmf_sdio_drivestrengthinit

kernel: BCM270X_DT: Make i2c-gpio usable by other overlays

kernel: BCM270X_DT: Fix rpi-dac overlay
See: http://forum.kodi.tv/showthread.php?tid=269814&pid=2349776#pid2349776

kernel: Implement a wakeup-source option for the i2c-rtc DeviceTree overlay
See: raspberrypi/linux#1511

kernel: gpio-ir-receiver: fix overlay and add upstream patches
See: raspberrypi/linux#1514

firmware: Tuner: Disable unused ACLS tuner, and improve logging
firmware: imx219: Remove static variable
firmware: ISP Tuners: Make DPF parsing thread safe

firmware: audioplus: Allow passthrough dma priority to be overridden in same way as pcm
firmware: di_adv: Remove delay uniform
firmeare: di_adv: Enable limiter and tweak axi priorities
popcornmix added a commit to Hexxeh/rpi-firmware that referenced this issue Jun 8, 2016
kernel: Add ads1015 overlay
See: raspberrypi/linux#1520

kernel: brcmfmac: change rx_seq check log from error print to debug print
See: raspberrypi/linux#1313

kernel: brcmfmac: use ndev->needed_headroom to reserve additional header space
See: raspberrypi/linux#1357

kernel: brcmfmac: revise SDIO error message in brcmf_sdio_drivestrengthinit

kernel: BCM270X_DT: Make i2c-gpio usable by other overlays

kernel: BCM270X_DT: Fix rpi-dac overlay
See: http://forum.kodi.tv/showthread.php?tid=269814&pid=2349776#pid2349776

kernel: Implement a wakeup-source option for the i2c-rtc DeviceTree overlay
See: raspberrypi/linux#1511

kernel: gpio-ir-receiver: fix overlay and add upstream patches
See: raspberrypi/linux#1514

firmware: Tuner: Disable unused ACLS tuner, and improve logging
firmware: imx219: Remove static variable
firmware: ISP Tuners: Make DPF parsing thread safe

firmware: audioplus: Allow passthrough dma priority to be overridden in same way as pcm
firmware: di_adv: Remove delay uniform
firmeare: di_adv: Enable limiter and tweak axi priorities
popcornmix pushed a commit that referenced this issue Jun 21, 2016
When using nmap tool with FMAC, the nmap packets were be dropped by kernel
because the size was too short. The kernel message showed like
"nmap: packet size is too short (42 <= 50)". It is caused by the packet
length is shorter than ndev->hard_header_len. According to LL_RESERVED_SPACE()
and hard_header_len definition, we should use hard_header_len to reserve L2
header, like ethernet header(ETH_HLEN) in our case and use needed_headroom for
the additional headroom needed by hardware.

[ Patch from Broadcom ]

See: #1357

Signed-off-by: Phil Elwell <[email protected]>
popcornmix pushed a commit that referenced this issue Jun 26, 2016
When using nmap tool with FMAC, the nmap packets were be dropped by kernel
because the size was too short. The kernel message showed like
"nmap: packet size is too short (42 <= 50)". It is caused by the packet
length is shorter than ndev->hard_header_len. According to LL_RESERVED_SPACE()
and hard_header_len definition, we should use hard_header_len to reserve L2
header, like ethernet header(ETH_HLEN) in our case and use needed_headroom for
the additional headroom needed by hardware.

[ Patch from Broadcom ]

See: #1357

Signed-off-by: Phil Elwell <[email protected]>
popcornmix pushed a commit that referenced this issue Sep 3, 2016
When using nmap tool with FMAC, the nmap packets were be dropped by kernel
because the size was too short. The kernel message showed like
"nmap: packet size is too short (42 <= 50)". It is caused by the packet
length is shorter than ndev->hard_header_len. According to LL_RESERVED_SPACE()
and hard_header_len definition, we should use hard_header_len to reserve L2
header, like ethernet header(ETH_HLEN) in our case and use needed_headroom for
the additional headroom needed by hardware.

[ Patch from Broadcom ]

See: #1357

Signed-off-by: Phil Elwell <[email protected]>
popcornmix pushed a commit that referenced this issue Sep 7, 2016
When using nmap tool with FMAC, the nmap packets were be dropped by kernel
because the size was too short. The kernel message showed like
"nmap: packet size is too short (42 <= 50)". It is caused by the packet
length is shorter than ndev->hard_header_len. According to LL_RESERVED_SPACE()
and hard_header_len definition, we should use hard_header_len to reserve L2
header, like ethernet header(ETH_HLEN) in our case and use needed_headroom for
the additional headroom needed by hardware.

[ Patch from Broadcom ]

See: #1357

Signed-off-by: Phil Elwell <[email protected]>
popcornmix pushed a commit that referenced this issue Sep 7, 2016
When using nmap tool with FMAC, the nmap packets were be dropped by kernel
because the size was too short. The kernel message showed like
"nmap: packet size is too short (42 <= 50)". It is caused by the packet
length is shorter than ndev->hard_header_len. According to LL_RESERVED_SPACE()
and hard_header_len definition, we should use hard_header_len to reserve L2
header, like ethernet header(ETH_HLEN) in our case and use needed_headroom for
the additional headroom needed by hardware.

[ Patch from Broadcom ]

See: #1357

Signed-off-by: Phil Elwell <[email protected]>
popcornmix pushed a commit that referenced this issue Sep 15, 2016
When using nmap tool with FMAC, the nmap packets were be dropped by kernel
because the size was too short. The kernel message showed like
"nmap: packet size is too short (42 <= 50)". It is caused by the packet
length is shorter than ndev->hard_header_len. According to LL_RESERVED_SPACE()
and hard_header_len definition, we should use hard_header_len to reserve L2
header, like ethernet header(ETH_HLEN) in our case and use needed_headroom for
the additional headroom needed by hardware.

[ Patch from Broadcom ]

See: #1357

Signed-off-by: Phil Elwell <[email protected]>
popcornmix pushed a commit that referenced this issue Sep 24, 2016
When using nmap tool with FMAC, the nmap packets were be dropped by kernel
because the size was too short. The kernel message showed like
"nmap: packet size is too short (42 <= 50)". It is caused by the packet
length is shorter than ndev->hard_header_len. According to LL_RESERVED_SPACE()
and hard_header_len definition, we should use hard_header_len to reserve L2
header, like ethernet header(ETH_HLEN) in our case and use needed_headroom for
the additional headroom needed by hardware.

[ Patch from Broadcom ]

See: #1357

Signed-off-by: Phil Elwell <[email protected]>
popcornmix pushed a commit that referenced this issue Sep 30, 2016
When using nmap tool with FMAC, the nmap packets were be dropped by kernel
because the size was too short. The kernel message showed like
"nmap: packet size is too short (42 <= 50)". It is caused by the packet
length is shorter than ndev->hard_header_len. According to LL_RESERVED_SPACE()
and hard_header_len definition, we should use hard_header_len to reserve L2
header, like ethernet header(ETH_HLEN) in our case and use needed_headroom for
the additional headroom needed by hardware.

[ Patch from Broadcom ]

See: #1357

Signed-off-by: Phil Elwell <[email protected]>
popcornmix pushed a commit that referenced this issue Oct 9, 2016
When using nmap tool with FMAC, the nmap packets were be dropped by kernel
because the size was too short. The kernel message showed like
"nmap: packet size is too short (42 <= 50)". It is caused by the packet
length is shorter than ndev->hard_header_len. According to LL_RESERVED_SPACE()
and hard_header_len definition, we should use hard_header_len to reserve L2
header, like ethernet header(ETH_HLEN) in our case and use needed_headroom for
the additional headroom needed by hardware.

[ Patch from Broadcom ]

See: #1357

Signed-off-by: Phil Elwell <[email protected]>
popcornmix pushed a commit that referenced this issue Oct 17, 2016
When using nmap tool with FMAC, the nmap packets were be dropped by kernel
because the size was too short. The kernel message showed like
"nmap: packet size is too short (42 <= 50)". It is caused by the packet
length is shorter than ndev->hard_header_len. According to LL_RESERVED_SPACE()
and hard_header_len definition, we should use hard_header_len to reserve L2
header, like ethernet header(ETH_HLEN) in our case and use needed_headroom for
the additional headroom needed by hardware.

[ Patch from Broadcom ]

See: #1357

Signed-off-by: Phil Elwell <[email protected]>
popcornmix pushed a commit that referenced this issue Oct 22, 2016
When using nmap tool with FMAC, the nmap packets were be dropped by kernel
because the size was too short. The kernel message showed like
"nmap: packet size is too short (42 <= 50)". It is caused by the packet
length is shorter than ndev->hard_header_len. According to LL_RESERVED_SPACE()
and hard_header_len definition, we should use hard_header_len to reserve L2
header, like ethernet header(ETH_HLEN) in our case and use needed_headroom for
the additional headroom needed by hardware.

[ Patch from Broadcom ]

See: #1357

Signed-off-by: Phil Elwell <[email protected]>
ColinIanKing pushed a commit to ColinIanKing/ubuntu-xenial that referenced this issue Oct 28, 2016
When using nmap tool with FMAC, the nmap packets were be dropped by kernel
because the size was too short. The kernel message showed like
"nmap: packet size is too short (42 <= 50)". It is caused by the packet
length is shorter than ndev->hard_header_len. According to LL_RESERVED_SPACE()
and hard_header_len definition, we should use hard_header_len to reserve L2
header, like ethernet header(ETH_HLEN) in our case and use needed_headroom for
the additional headroom needed by hardware.

[ Patch from Broadcom ]

See: raspberrypi/linux#1357

Signed-off-by: Phil Elwell <[email protected]>
angyalp pushed a commit to angyalp/kernel_rpi that referenced this issue Dec 19, 2016
When using nmap tool with FMAC, the nmap packets were be dropped by kernel
because the size was too short. The kernel message showed like
"nmap: packet size is too short (42 <= 50)". It is caused by the packet
length is shorter than ndev->hard_header_len. According to LL_RESERVED_SPACE()
and hard_header_len definition, we should use hard_header_len to reserve L2
header, like ethernet header(ETH_HLEN) in our case and use needed_headroom for
the additional headroom needed by hardware.

[ Patch from Broadcom ]

See: raspberrypi#1357

Signed-off-by: Phil Elwell <[email protected]>
tabp0le pushed a commit to tabp0le/ubuntu_xenial_kernel that referenced this issue Dec 22, 2016
When using nmap tool with FMAC, the nmap packets were be dropped by kernel
because the size was too short. The kernel message showed like
"nmap: packet size is too short (42 <= 50)". It is caused by the packet
length is shorter than ndev->hard_header_len. According to LL_RESERVED_SPACE()
and hard_header_len definition, we should use hard_header_len to reserve L2
header, like ethernet header(ETH_HLEN) in our case and use needed_headroom for
the additional headroom needed by hardware.

[ Patch from Broadcom ]

See: raspberrypi/linux#1357

Signed-off-by: Phil Elwell <[email protected]>
perfecto-devops pushed a commit to perfecto-devops/ubuntu-xenial that referenced this issue Feb 2, 2017
When using nmap tool with FMAC, the nmap packets were be dropped by kernel
because the size was too short. The kernel message showed like
"nmap: packet size is too short (42 <= 50)". It is caused by the packet
length is shorter than ndev->hard_header_len. According to LL_RESERVED_SPACE()
and hard_header_len definition, we should use hard_header_len to reserve L2
header, like ethernet header(ETH_HLEN) in our case and use needed_headroom for
the additional headroom needed by hardware.

[ Patch from Broadcom ]

See: raspberrypi/linux#1357

Signed-off-by: Phil Elwell <[email protected]>
Noltari pushed a commit to Noltari/linux that referenced this issue Feb 6, 2017
When using nmap tool with FMAC, the nmap packets were be dropped by kernel
because the size was too short. The kernel message showed like
"nmap: packet size is too short (42 <= 50)". It is caused by the packet
length is shorter than ndev->hard_header_len. According to LL_RESERVED_SPACE()
and hard_header_len definition, we should use hard_header_len to reserve L2
header, like ethernet header(ETH_HLEN) in our case and use needed_headroom for
the additional headroom needed by hardware.

[ Patch from Broadcom ]

See: raspberrypi/linux#1357

Signed-off-by: Phil Elwell <[email protected]>
neuschaefer pushed a commit to neuschaefer/raspi-binary-firmware that referenced this issue Feb 27, 2017
kernel: Add ads1015 overlay
See: raspberrypi/linux#1520

kernel: brcmfmac: change rx_seq check log from error print to debug print
See: raspberrypi/linux#1313

kernel: brcmfmac: use ndev->needed_headroom to reserve additional header space
See: raspberrypi/linux#1357

kernel: brcmfmac: revise SDIO error message in brcmf_sdio_drivestrengthinit

kernel: BCM270X_DT: Make i2c-gpio usable by other overlays

kernel: BCM270X_DT: Fix rpi-dac overlay
See: http://forum.kodi.tv/showthread.php?tid=269814&pid=2349776#pid2349776

kernel: Implement a wakeup-source option for the i2c-rtc DeviceTree overlay
See: raspberrypi/linux#1511

kernel: gpio-ir-receiver: fix overlay and add upstream patches
See: raspberrypi/linux#1514

firmware: Tuner: Disable unused ACLS tuner, and improve logging
firmware: imx219: Remove static variable
firmware: ISP Tuners: Make DPF parsing thread safe

firmware: audioplus: Allow passthrough dma priority to be overridden in same way as pcm
firmware: di_adv: Remove delay uniform
firmeare: di_adv: Enable limiter and tweak axi priorities
JackieLiu1 pushed a commit to JackieLiu1/kernel that referenced this issue Mar 23, 2017
When using nmap tool with FMAC, the nmap packets were be dropped by kernel
because the size was too short. The kernel message showed like
"nmap: packet size is too short (42 <= 50)". It is caused by the packet
length is shorter than ndev->hard_header_len. According to LL_RESERVED_SPACE()
and hard_header_len definition, we should use hard_header_len to reserve L2
header, like ethernet header(ETH_HLEN) in our case and use needed_headroom for
the additional headroom needed by hardware.

[ Patch from Broadcom ]

See: raspberrypi/linux#1357

Signed-off-by: Phil Elwell <[email protected]>
@P33M P33M closed this as completed May 4, 2017
woshihuangzhijie pushed a commit to woshihuangzhijie/linuxcode that referenced this issue Sep 20, 2017
When using nmap tool with FMAC, the nmap packets were be dropped by kernel
because the size was too short. The kernel message showed like
"nmap: packet size is too short (42 <= 50)". It is caused by the packet
length is shorter than ndev->hard_header_len. According to LL_RESERVED_SPACE()
and hard_header_len definition, we should use hard_header_len to reserve L2
header, like ethernet header(ETH_HLEN) in our case and use needed_headroom for
the additional headroom needed by hardware.

[ Patch from Broadcom ]

See: raspberrypi/linux#1357

Signed-off-by: Phil Elwell <[email protected]>
amichelotti pushed a commit to amichelotti/ubuntu-vme-xenial that referenced this issue Oct 19, 2017
When using nmap tool with FMAC, the nmap packets were be dropped by kernel
because the size was too short. The kernel message showed like
"nmap: packet size is too short (42 <= 50)". It is caused by the packet
length is shorter than ndev->hard_header_len. According to LL_RESERVED_SPACE()
and hard_header_len definition, we should use hard_header_len to reserve L2
header, like ethernet header(ETH_HLEN) in our case and use needed_headroom for
the additional headroom needed by hardware.

[ Patch from Broadcom ]

See: raspberrypi/linux#1357

Signed-off-by: Phil Elwell <[email protected]>
lianhaidong pushed a commit to lianhaidong/ubuntu-xenial that referenced this issue Nov 6, 2017
When using nmap tool with FMAC, the nmap packets were be dropped by kernel
because the size was too short. The kernel message showed like
"nmap: packet size is too short (42 <= 50)". It is caused by the packet
length is shorter than ndev->hard_header_len. According to LL_RESERVED_SPACE()
and hard_header_len definition, we should use hard_header_len to reserve L2
header, like ethernet header(ETH_HLEN) in our case and use needed_headroom for
the additional headroom needed by hardware.

[ Patch from Broadcom ]

See: raspberrypi/linux#1357

Signed-off-by: Phil Elwell <[email protected]>
liuqun pushed a commit to liuqun/linux-raspi2 that referenced this issue Dec 14, 2017
When using nmap tool with FMAC, the nmap packets were be dropped by kernel
because the size was too short. The kernel message showed like
"nmap: packet size is too short (42 <= 50)". It is caused by the packet
length is shorter than ndev->hard_header_len. According to LL_RESERVED_SPACE()
and hard_header_len definition, we should use hard_header_len to reserve L2
header, like ethernet header(ETH_HLEN) in our case and use needed_headroom for
the additional headroom needed by hardware.

[ Patch from Broadcom ]

See: raspberrypi/linux#1357

Signed-off-by: Phil Elwell <[email protected]>
liuqun pushed a commit to liuqun/linux-raspi2 that referenced this issue Dec 20, 2017
When using nmap tool with FMAC, the nmap packets were be dropped by kernel
because the size was too short. The kernel message showed like
"nmap: packet size is too short (42 <= 50)". It is caused by the packet
length is shorter than ndev->hard_header_len. According to LL_RESERVED_SPACE()
and hard_header_len definition, we should use hard_header_len to reserve L2
header, like ethernet header(ETH_HLEN) in our case and use needed_headroom for
the additional headroom needed by hardware.

[ Patch from Broadcom ]

See: raspberrypi/linux#1357

Signed-off-by: Phil Elwell <[email protected]>
liuqun pushed a commit to liuqun/linux-raspi2 that referenced this issue Dec 20, 2017
When using nmap tool with FMAC, the nmap packets were be dropped by kernel
because the size was too short. The kernel message showed like
"nmap: packet size is too short (42 <= 50)". It is caused by the packet
length is shorter than ndev->hard_header_len. According to LL_RESERVED_SPACE()
and hard_header_len definition, we should use hard_header_len to reserve L2
header, like ethernet header(ETH_HLEN) in our case and use needed_headroom for
the additional headroom needed by hardware.

[ Patch from Broadcom ]

See: raspberrypi/linux#1357

Signed-off-by: Phil Elwell <[email protected]>
polceanum pushed a commit to polceanum/ubuntu-xenial that referenced this issue Feb 6, 2018
When using nmap tool with FMAC, the nmap packets were be dropped by kernel
because the size was too short. The kernel message showed like
"nmap: packet size is too short (42 <= 50)". It is caused by the packet
length is shorter than ndev->hard_header_len. According to LL_RESERVED_SPACE()
and hard_header_len definition, we should use hard_header_len to reserve L2
header, like ethernet header(ETH_HLEN) in our case and use needed_headroom for
the additional headroom needed by hardware.

[ Patch from Broadcom ]

See: raspberrypi/linux#1357

Signed-off-by: Phil Elwell <[email protected]>
APokorny pushed a commit to ubports/ubuntu_kernel_xenial that referenced this issue Oct 11, 2018
When using nmap tool with FMAC, the nmap packets were be dropped by kernel
because the size was too short. The kernel message showed like
"nmap: packet size is too short (42 <= 50)". It is caused by the packet
length is shorter than ndev->hard_header_len. According to LL_RESERVED_SPACE()
and hard_header_len definition, we should use hard_header_len to reserve L2
header, like ethernet header(ETH_HLEN) in our case and use needed_headroom for
the additional headroom needed by hardware.

[ Patch from Broadcom ]

See: raspberrypi/linux#1357

Signed-off-by: Phil Elwell <[email protected]>
hisenyiu2015 pushed a commit to hisenyiu2015/msm-4.14 that referenced this issue May 20, 2021
When using nmap tool with FMAC, the nmap packets were be dropped by kernel
because the size was too short. The kernel message showed like
"nmap: packet size is too short (42 <= 50)". It is caused by the packet
length is shorter than ndev->hard_header_len. According to LL_RESERVED_SPACE()
and hard_header_len definition, we should use hard_header_len to reserve L2
header, like ethernet header(ETH_HLEN) in our case and use needed_headroom for
the additional headroom needed by hardware.

[ Patch from Broadcom ]

See: raspberrypi/linux#1357

Signed-off-by: Phil Elwell <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants