Commit 375a0f2
authored
[multicast] prevent VLAN translation via match key enforcement (#195)
Fixes #107.
This PR prevents cross-VLAN translation in multicast NAT ingress.
Previously, a packet arriving with VLAN 100 destined to a multicast group configured for VLAN 200 would be NAT encapsulated and forwarded, translating the packet to the wrong customer's network.
Includes:
- Adds `Ipv4VlanMatchKey` and `Ipv6VlanMatchKey` that match on destination address, VLAN header validity, and VLAN ID
- Each group now installs a single NAT entry with an exact VLAN match key.
- Fixes MulticastRouter4 using IPv6 ICMP error codes instead of IPv4
- Removes dead NAT rollback branches for internal groups (no NAT entries)
- Adds rollback support for VLAN changes in NAT and route tables1 parent c0bf0a3 commit 375a0f2
File tree
13 files changed
+1079
-298
lines changed- dpd-client/tests/integration_tests
- dpd
- p4
- src
- mcast
- table/mcast
- packet/src
13 files changed
+1079
-298
lines changedLarge diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
| |||
41 | 42 | | |
42 | 43 | | |
43 | 44 | | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
44 | 48 | | |
45 | | - | |
| 49 | + | |
46 | 50 | | |
47 | 51 | | |
48 | 52 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
608 | 608 | | |
609 | 609 | | |
610 | 610 | | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
611 | 616 | | |
612 | | - | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
613 | 622 | | |
614 | 623 | | |
615 | 624 | | |
| |||
625 | 634 | | |
626 | 635 | | |
627 | 636 | | |
628 | | - | |
| 637 | + | |
| 638 | + | |
629 | 639 | | |
630 | | - | |
| 640 | + | |
| 641 | + | |
| 642 | + | |
| 643 | + | |
| 644 | + | |
631 | 645 | | |
632 | 646 | | |
633 | 647 | | |
| |||
1330 | 1344 | | |
1331 | 1345 | | |
1332 | 1346 | | |
1333 | | - | |
| 1347 | + | |
| 1348 | + | |
| 1349 | + | |
1334 | 1350 | | |
1335 | 1351 | | |
1336 | 1352 | | |
1337 | 1353 | | |
1338 | 1354 | | |
1339 | 1355 | | |
1340 | | - | |
1341 | | - | |
| 1356 | + | |
| 1357 | + | |
1342 | 1358 | | |
1343 | 1359 | | |
1344 | 1360 | | |
| |||
1470 | 1486 | | |
1471 | 1487 | | |
1472 | 1488 | | |
1473 | | - | |
| 1489 | + | |
| 1490 | + | |
| 1491 | + | |
1474 | 1492 | | |
1475 | 1493 | | |
1476 | 1494 | | |
| |||
0 commit comments