Commit d52e5a7
ipv4: lock mtu in fnhe when received PMTU < net.ipv4.route.min_pmtu
Prior to the rework of PMTU information storage in commit
2c8cec5 ("ipv4: Cache learned PMTU information in inetpeer."),
when a PMTU event advertising a PMTU smaller than
net.ipv4.route.min_pmtu was received, we would disable setting the DF
flag on packets by locking the MTU metric, and set the PMTU to
net.ipv4.route.min_pmtu.
Since then, we don't disable DF, and set PMTU to
net.ipv4.route.min_pmtu, so the intermediate router that has this link
with a small MTU will have to drop the packets.
This patch reestablishes pre-2.6.39 behavior by splitting
rtable->rt_pmtu into a bitfield with rt_mtu_locked and rt_pmtu.
rt_mtu_locked indicates that we shouldn't set the DF bit on that path,
and is checked in ip_dont_fragment().
One possible workaround is to set net.ipv4.route.min_pmtu to a value low
enough to accommodate the lowest MTU encountered.
Fixes: 2c8cec5 ("ipv4: Cache learned PMTU information in inetpeer.")
Signed-off-by: Sabrina Dubroca <[email protected]>
Reviewed-by: Stefano Brivio <[email protected]>
Signed-off-by: David S. Miller <[email protected]>1 parent 16c2e4d commit d52e5a7
File tree
5 files changed
+32
-10
lines changed- include/net
- net/ipv4
5 files changed
+32
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
328 | 328 | | |
329 | 329 | | |
330 | 330 | | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
331 | 338 | | |
332 | 339 | | |
333 | 340 | | |
334 | 341 | | |
335 | 342 | | |
336 | 343 | | |
337 | 344 | | |
338 | | - | |
| 345 | + | |
339 | 346 | | |
340 | 347 | | |
341 | 348 | | |
| |||
361 | 368 | | |
362 | 369 | | |
363 | 370 | | |
364 | | - | |
| 371 | + | |
365 | 372 | | |
366 | 373 | | |
367 | 374 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
| 62 | + | |
62 | 63 | | |
63 | 64 | | |
64 | 65 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
66 | | - | |
| 66 | + | |
| 67 | + | |
67 | 68 | | |
68 | 69 | | |
69 | 70 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
634 | 634 | | |
635 | 635 | | |
636 | 636 | | |
| 637 | + | |
637 | 638 | | |
638 | 639 | | |
639 | 640 | | |
| |||
644 | 645 | | |
645 | 646 | | |
646 | 647 | | |
647 | | - | |
| 648 | + | |
648 | 649 | | |
649 | 650 | | |
650 | 651 | | |
| |||
681 | 682 | | |
682 | 683 | | |
683 | 684 | | |
684 | | - | |
| 685 | + | |
685 | 686 | | |
| 687 | + | |
| 688 | + | |
686 | 689 | | |
687 | 690 | | |
688 | 691 | | |
| |||
706 | 709 | | |
707 | 710 | | |
708 | 711 | | |
| 712 | + | |
709 | 713 | | |
710 | 714 | | |
711 | 715 | | |
| |||
787 | 791 | | |
788 | 792 | | |
789 | 793 | | |
790 | | - | |
| 794 | + | |
| 795 | + | |
791 | 796 | | |
792 | 797 | | |
793 | 798 | | |
| |||
1009 | 1014 | | |
1010 | 1015 | | |
1011 | 1016 | | |
| 1017 | + | |
1012 | 1018 | | |
1013 | | - | |
| 1019 | + | |
1014 | 1020 | | |
1015 | 1021 | | |
1016 | 1022 | | |
1017 | 1023 | | |
1018 | 1024 | | |
1019 | | - | |
| 1025 | + | |
| 1026 | + | |
1020 | 1027 | | |
| 1028 | + | |
1021 | 1029 | | |
1022 | 1030 | | |
1023 | 1031 | | |
| |||
1027 | 1035 | | |
1028 | 1036 | | |
1029 | 1037 | | |
1030 | | - | |
| 1038 | + | |
1031 | 1039 | | |
1032 | 1040 | | |
1033 | 1041 | | |
| |||
1280 | 1288 | | |
1281 | 1289 | | |
1282 | 1290 | | |
1283 | | - | |
| 1291 | + | |
1284 | 1292 | | |
1285 | 1293 | | |
1286 | 1294 | | |
| |||
1521 | 1529 | | |
1522 | 1530 | | |
1523 | 1531 | | |
| 1532 | + | |
1524 | 1533 | | |
1525 | 1534 | | |
1526 | 1535 | | |
| |||
2546 | 2555 | | |
2547 | 2556 | | |
2548 | 2557 | | |
| 2558 | + | |
2549 | 2559 | | |
2550 | 2560 | | |
2551 | 2561 | | |
| |||
2648 | 2658 | | |
2649 | 2659 | | |
2650 | 2660 | | |
| 2661 | + | |
| 2662 | + | |
2651 | 2663 | | |
2652 | 2664 | | |
2653 | 2665 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
100 | 100 | | |
101 | 101 | | |
102 | 102 | | |
| 103 | + | |
103 | 104 | | |
104 | 105 | | |
105 | 106 | | |
| |||
0 commit comments