Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 31 Mar 2021 11:17:06 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 254675] ICMP Unreach needfrag is broken in 13.0-RC4
Message-ID:  <bug-254675-227@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D254675

            Bug ID: 254675
           Summary: ICMP Unreach needfrag is broken in 13.0-RC4
           Product: Base System
           Version: 13.0-STABLE
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Many People
          Priority: ---
         Component: kern
          Assignee: bugs@FreeBSD.org
          Reporter: afedorov@FreeBSD.org

Hello.

I have the following setup with two VM's:

<public net> --- [ FreeBSD 13.0 RC4 GW_VM + NAT ] --- <private net> --- [Li=
nux
VM]

GW_VM:

Interfaces:
vtnet1 <public ip>
vtnet2 192.168.1.1/24

net.inet.ip.forwarding=3D1

NAT pf.conf:
nat on vtnet1 from 192.168.1.0/24 to any -> vtnet1

Linux VM:
enp0s2 192.168.1

When I'm trying iperf3 from Linux VM to public host:
[  4] local 192.168.1.4 port 49412 connected to <PUBLIC_HOST> port 5201
[ ID] Interval           Transfer     Bandwidth       Retr  Cwnd
[  4]   0.00-1.01   sec   263 KBytes  2.14 Mbits/sec   45   5.66 KBytes=20=
=20=20=20=20=20=20
[  4]   1.01-2.00   sec   156 KBytes  1.28 Mbits/sec   32   5.66 KBytes=20=
=20=20=20=20=20=20
[  4]   2.00-3.00   sec   156 KBytes  1.27 Mbits/sec   26   5.66 KBytes=20=
=20=20=20=20=20=20

The low upload speed is predictable due to virtio-net offload are enabled.
But what I did not expect was the absence of the needfrag ICMP packet.

I setup 12.2 RELEASE with same configuration, and

root@edge-12:~ # tcpdump -i vtnet2 proto ICMP
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on vtnet2, link-type EN10MB (Ethernet), capture size 262144 bytes
14:07:09.803538 IP 192.168.1.1 > 192.168.1.4: ICMP 10.78.28.17 unreachable -
need to frag (mtu 1500), length 176
14:07:09.803581 IP 192.168.1.1 > 192.168.1.4: ICMP 10.78.28.17 unreachable -
need to frag (mtu 1500), length 176
14:07:09.803605 IP 192.168.1.1 > 192.168.1.4: ICMP 10.78.28.17 unreachable -
need to frag (mtu 1500), length 176
14:07:09.806829 IP 192.168.1.1 > 192.168.1.4: ICMP 10.78.28.17 unreachable -
need to frag (mtu 1500), length 176
14:07:09.806856 IP 192.168.1.1 > 192.168.1.4: ICMP 10.78.28.17 unreachable -
need to frag (mtu 1500), length 176
14:07:09.810143 IP 192.168.1.1 > 192.168.1.4: ICMP 10.78.28.17 unreachable -
need to frag (mtu 1500), length 176
14:07:09.810172 IP 192.168.1.1 > 192.168.1.4: ICMP 10.78.28.17 unreachable -
need to frag (mtu 1500), length 176


Using the following DTrace script: dtrace -n 'fbt:kernel:icmp_error:entry {
stack(); printf("type: %d code: %d", arg1, arg2);}'

12.2-RELEASE work as expected: ip_forward() call ip_output() which return
EMSGSIZE -> generate ICMP unreach needsfrag.

  0  53981                 icmp_error:entry=20
              kernel`ip_forward+0x5c4
              kernel`ip_input+0x7a7
              kernel`netisr_dispatch_src+0xca
              kernel`ether_demux+0x138
              kernel`ether_nh_input+0x33b
              kernel`netisr_dispatch_src+0xca
              kernel`ether_input+0x4b
              kernel`vtnet_rxq_eof+0x7a5
              kernel`vtnet_rx_vq_process+0xb7
              kernel`ithread_loop+0x23c
              kernel`fork_exit+0x7e
              kernel`0xffffffff81067f6e
type: 3 code: 4
  0  53981                 icmp_error:entry=20
              kernel`ip_forward+0x5c4
              kernel`ip_input+0x7a7
              kernel`netisr_dispatch_src+0xca
              kernel`ether_demux+0x138
              kernel`ether_nh_input+0x33b
              kernel`netisr_dispatch_src+0xca
              kernel`ether_input+0x4b
              kernel`vtnet_rxq_eof+0x7a5
              kernel`vtnet_rx_vq_process+0xb7
              kernel`ithread_loop+0x23c
              kernel`fork_exit+0x7e
              kernel`0xffffffff81067f6e
type: 3 code: 4

13-RC4:
  0  54326                 icmp_error:entry=20=20=20=20=20=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=
=20=20
              kernel`ip_tryforward+0x730=20=20=20=20=20=20=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=
=20=20=20=20
              kernel`ip_input+0x356=20=20=20=20=20=20=20=20=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=
=20=20=20=20=20=20=20
              kernel`netisr_dispatch_src+0xca=20=20=20=20=20=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20
              kernel`ether_demux+0x148=20=20=20=20=20=20=20=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=
=20=20=20=20=20
              kernel`ether_nh_input+0x34c=20=20=20=20=20=20=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=
=20=20=20
              kernel`netisr_dispatch_src+0xca=20=20=20=20=20=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20
              kernel`ether_input+0x69=20=20=20=20=20=20=20=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=
=20=20=20=20=20=20
              kernel`vtnet_rxq_eof+0x7d4=20=20=20=20=20=20=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=
=20=20=20=20
              kernel`vtnet_rx_vq_process+0xb7=20=20=20=20=20=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20
              kernel`ithread_loop+0x24d=20=20=20=20=20=20=20=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=
=20=20=20=20
              kernel`fork_exit+0x7e=20=20=20=20=20=20=20=20=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=
=20=20=20=20=20=20=20
              kernel`0xffffffff810625ae=20=20=20=20=20=20=20=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=
=20=20=20=20
type: 3 code: 4=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20
  1  54326                 icmp_error:entry=20=20=20=20=20=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=
=20=20
              kernel`ip_forward+0x9c=20=20=20=20=20=20=20=20=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=
=20=20=20=20=20=20
              kernel`ip_input+0x6cc=20=20=20=20=20=20=20=20=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=
=20=20=20=20=20=20=20
              kernel`swi_net+0x12b=20=20=20=20=20=20=20=20=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=
=20=20=20=20=20=20=20=20
              kernel`ithread_loop+0x24d=20=20=20=20=20=20=20=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=
=20=20=20=20
              kernel`fork_exit+0x7e=20=20=20=20=20=20=20=20=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=
=20=20=20=20=20=20=20
              kernel`0xffffffff810625ae=20
type: 3 code: 1

So, As I understand ip_tryforward() trying to generate ICMP needsfrag, but
after that generated ICMP ICMP_UNREACH_HOST.

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-254675-227>