Bug 211175 - gretap does not fragment packets regardless of the DF flag
Summary: gretap does not fragment packets regardless of the DF flag
Status: RESOLVED DOCUMENTED
Alias: None
Product: Networking
Classification: Unclassified
Component: IPV4 (show other bugs)
Hardware: x86-64 Linux
: P1 normal
Assignee: Stephen Hemminger
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-01-13 13:37 UTC by Marco Berizzi
Modified: 2021-01-29 18:19 UTC (History)
1 user (show)

See Also:
Kernel Version: 5.10.4
Subsystem:
Regression: No
Bisected commit-id:


Attachments

Description Marco Berizzi 2021-01-13 13:37:33 UTC
Hello everyone,

I'm running linux 5.10.4 with iproute-5.10 on Slackware (64bit).

When I try to configure a gretap device with the "ignore-df" I getting this error: 

ip link add testgre type gretap remote 10.42.44.6 local 10.86.44.6 ignore-df
RTNETLINK answers: Invalid argument

Instead, if I try to run the following command it is going to be executed:
ip link add testgre type gretap remote 10.42.44.6 local 10.86.44.6 noignore-df

Also I have noticed that the icmp datagrams with the DF=none are not fragmented anyway.
For example this is a tcpdump capture showing a 1459 bytes lenght icmp packet that is not going to be fragmented and delivered to the other remote gretap linux box (running the same kernel version).

ethertype 802.1Q (0x8100), length 1477: vlan 802, p 0, ethertype IPv4, (flags [none], proto ICMP (1), length 1459)
    192.168.1.247 > 192.168.1.1: ICMP echo request, id 10287, seq 0, length 1439


Is this expected?


This is my full gretap setup: eth0 mtu is 1500 bytes.

ip link add testgre type gretap remote 10.42.44.6 local 10.86.44.6
ip link set testgre up
ip link set eth0 up


ip link add name br0 type bridge
ip link set br0 up

ip link set testgre master br0
ip link set eth0 master br0


and this my 'ip a s' output:

13: testgre@NONE: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1462 qdisc pfifo_fast master br0 state UNKNOWN group default qlen 1000
    link/ether 5e:56:0a:0c:12:f0 brd ff:ff:ff:ff:ff:ff
14: br0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1462 qdisc noqueue state UP group default qlen 1000
    link/ether 5e:56:0a:0c:12:f0 brd ff:ff:ff:ff:ff:ff
Comment 1 Florian Westphal 2021-01-19 12:46:37 UTC
(In reply to Marco Berizzi from comment #0)
> Hello everyone,
> 
> I'm running linux 5.10.4 with iproute-5.10 on Slackware (64bit).
> 
> When I try to configure a gretap device with the "ignore-df" I getting this
> error: 
> 
> ip link add testgre type gretap remote 10.42.44.6 local 10.86.44.6 ignore-df
> RTNETLINK answers: Invalid argument

iproute passes 'pmtudisc' by default and ignore-df & pmtudisc are mutually exclusive.

try 'ignore-df nopmtudisc'.
 
> Also I have noticed that the icmp datagrams with the DF=none are not
> fragmented anyway.
> For example this is a tcpdump capture showing a 1459 bytes lenght icmp
> packet that is not going to be fragmented and delivered to the other remote
> gretap linux box (running the same kernel version).
> 
> ethertype 802.1Q (0x8100), length 1477: vlan 802, p 0, ethertype IPv4,
> (flags [none], proto ICMP (1), length 1459)
>     192.168.1.247 > 192.168.1.1: ICMP echo request, id 10287, seq 0, length
> 1439

Its not clear where this tcpdump was done. Remote? Local? On which interface? 
Why should this packet be fragmented?
Comment 2 Marco Berizzi 2021-01-27 17:42:44 UTC
Thanks a lot Florian for the hint: indeed the correct parameters are 'ignore-df nopmtudisc'.

I think you can safely close this bug report.

Thanks again.

Note You need to log in before you can comment on or make changes to this bug.