Skip to content

Commit 6b8ba63

Browse files
[post-merge] fix
1 parent 4dc9de9 commit 6b8ba63

2 files changed

Lines changed: 25 additions & 22 deletions

File tree

dpd-client/tests/integration_tests/mcast.rs

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ use crate::integration_tests::common;
1414
use crate::integration_tests::common::prelude::*;
1515
use ::common::network::MacAddr;
1616
use anyhow::anyhow;
17-
use dpd_client::{Error, types};
17+
use dpd_client::{types, Error};
1818
use dpd_types::mcast::ADMIN_LOCAL_PREFIX;
1919
use futures::TryStreamExt;
2020
use oxnet::MulticastMac;
21-
use packet::{Endpoint, eth, geneve, ipv4, ipv6, udp};
21+
use packet::{eth, geneve, ipv4, ipv6, udp, Endpoint};
2222

2323
const MULTICAST_TEST_IPV4: Ipv4Addr = Ipv4Addr::new(224, 0, 1, 0);
2424
const MULTICAST_TEST_IPV6: Ipv6Addr =
@@ -1914,8 +1914,8 @@ async fn test_ipv4_multicast_basic_replication_nat_ingress() -> TestResult {
19141914

19151915
#[tokio::test]
19161916
#[ignore]
1917-
async fn test_encapped_multicast_geneve_mcast_tag_to_external_members()
1918-
-> TestResult {
1917+
async fn test_encapped_multicast_geneve_mcast_tag_to_external_members(
1918+
) -> TestResult {
19191919
let switch = &*get_switch().await;
19201920

19211921
// Define test ports
@@ -2056,8 +2056,8 @@ async fn test_encapped_multicast_geneve_mcast_tag_to_external_members()
20562056

20572057
#[tokio::test]
20582058
#[ignore]
2059-
async fn test_encapped_multicast_geneve_mcast_tag_to_underlay_members()
2060-
-> TestResult {
2059+
async fn test_encapped_multicast_geneve_mcast_tag_to_underlay_members(
2060+
) -> TestResult {
20612061
let switch = &*get_switch().await;
20622062

20632063
// Define test ports
@@ -2195,8 +2195,8 @@ async fn test_encapped_multicast_geneve_mcast_tag_to_underlay_members()
21952195

21962196
#[tokio::test]
21972197
#[ignore]
2198-
async fn test_encapped_multicast_geneve_mcast_tag_to_underlay_and_external_members()
2199-
-> TestResult {
2198+
async fn test_encapped_multicast_geneve_mcast_tag_to_underlay_and_external_members(
2199+
) -> TestResult {
22002200
let switch = &*get_switch().await;
22012201

22022202
// Define test ports
@@ -3900,6 +3900,10 @@ async fn test_multicast_reset_all_tables() -> TestResult {
39003900
Ok(())
39013901
}
39023902

3903+
/*
3904+
* Commented out untl https://github.com/oxidecomputer/dendrite/issues/107 is
3905+
* fixed
3906+
*
39033907
#[tokio::test]
39043908
#[ignore]
39053909
async fn test_multicast_vlan_translation_not_possible() -> TestResult {
@@ -3976,6 +3980,7 @@ async fn test_multicast_vlan_translation_not_possible() -> TestResult {
39763980
.unwrap();
39773981
cleanup_test_group(switch, internal_multicast_ip, TEST_TAG).await
39783982
}
3983+
*/
39793984

39803985
#[tokio::test]
39813986
#[ignore]

dpd-client/tests/integration_tests/service.rs

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -174,9 +174,7 @@ async fn test_service_ipv4_wrong_port() -> TestResult {
174174
}
175175

176176
// Packets sent to an IP address not assigned to a switch port should be
177-
// dropped when the port is configured as NAT-only (see issue #172).
178-
// Without NAT-only, such packets would instead trigger ICMP_DEST_UNREACHABLE
179-
// via the router.
177+
// dropped.
180178
#[tokio::test]
181179
#[ignore]
182180
async fn test_service_ipv4_unknown_address() -> TestResult {
@@ -197,31 +195,31 @@ async fn test_service_ipv4_unknown_address() -> TestResult {
197195
.await
198196
.unwrap();
199197

198+
// Mark the port as NAT-only
199+
switch
200+
.client
201+
.link_nat_only_set(&port_id, &link_id, true)
202+
.await
203+
.unwrap();
204+
200205
let send_pkt = common::gen_udp_packet(
201206
Endpoint::parse("e0:d5:5e:67:89:ab", "10.10.10.10", 3333).unwrap(),
202207
Endpoint::parse(router_mac, "192.10.12.1", 4444).unwrap(),
203208
);
204209

205210
let send = TestPacket {
206211
packet: Arc::new(send_pkt),
207-
port: PhysPort(ingress + 1),
212+
port: PhysPort(ingress),
208213
};
209214

210-
// Mark the ingress port as NAT-only so packets to unknown addresses are
211-
// dropped rather than triggering ICMP_UNREACHABLE (see issue #172).
212-
let (ingress_port_id, ingress_link_id) =
213-
switch.link_id(PhysPort(ingress + 1)).unwrap();
214-
switch
215-
.client
216-
.link_nat_only_set(&ingress_port_id, &ingress_link_id, true)
217-
.await
218-
.unwrap();
219215
let result = switch.packet_test(vec![send], Vec::new());
216+
// Clear the port's NAT-only property
220217
switch
221218
.client
222-
.link_nat_only_set(&ingress_port_id, &ingress_link_id, false)
219+
.link_nat_only_set(&port_id, &link_id, false)
223220
.await
224221
.unwrap();
222+
225223
result
226224
}
227225

0 commit comments

Comments
 (0)