Skip to content

Commit 021505e

Browse files
[review] Address feedback
1 parent 731a821 commit 021505e

9 files changed

Lines changed: 354 additions & 172 deletions

File tree

dpd-api/src/lib.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1736,9 +1736,9 @@ pub trait DpdApi {
17361736
}]
17371737
async fn multicast_group_create_underlay_v1(
17381738
rqctx: RequestContext<Self::Context>,
1739-
group: TypedBody<v5::MulticastGroupCreateUnderlayEntry>,
1739+
group: TypedBody<v1::MulticastGroupCreateUnderlayEntry>,
17401740
) -> Result<
1741-
HttpResponseCreated<v5::MulticastGroupUnderlayResponse>,
1741+
HttpResponseCreated<v1::MulticastGroupUnderlayResponse>,
17421742
HttpError,
17431743
> {
17441744
let v4_body = group
@@ -1871,8 +1871,8 @@ pub trait DpdApi {
18711871
}]
18721872
async fn multicast_group_get_underlay_v1(
18731873
rqctx: RequestContext<Self::Context>,
1874-
path: Path<v5::MulticastUnderlayGroupIpParam>,
1875-
) -> Result<HttpResponseOk<v5::MulticastGroupUnderlayResponse>, HttpError>
1874+
path: Path<v1::MulticastUnderlayGroupIpParam>,
1875+
) -> Result<HttpResponseOk<v1::MulticastGroupUnderlayResponse>, HttpError>
18761876
{
18771877
let v4_path = path.try_map(|p| {
18781878
mcast::UnderlayMulticastIpv6::try_from(p.group_ip)
@@ -1920,9 +1920,9 @@ pub trait DpdApi {
19201920
}]
19211921
async fn multicast_group_update_underlay_v1(
19221922
rqctx: RequestContext<Self::Context>,
1923-
path: Path<v5::MulticastUnderlayGroupIpParam>,
1924-
group: TypedBody<v5::MulticastGroupUpdateUnderlayEntry>,
1925-
) -> Result<HttpResponseOk<v5::MulticastGroupUnderlayResponse>, HttpError>;
1923+
path: Path<v1::MulticastUnderlayGroupIpParam>,
1924+
group: TypedBody<v1::MulticastGroupUpdateUnderlayEntry>,
1925+
) -> Result<HttpResponseOk<v1::MulticastGroupUnderlayResponse>, HttpError>;
19261926

19271927
/**
19281928
* Update an external-only multicast group configuration for a given group IP address.

dpd-api/src/v5.rs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,6 @@ use dpd_types::mcast::{
2020
ExternalForwarding, InternalForwarding, IpSrc, MulticastGroupId,
2121
};
2222

23-
// Re-export underlay types from v1 (unchanged in v5)
24-
pub use crate::v1::AdminScopedIpv6;
25-
pub use crate::v1::MulticastGroupCreateUnderlayEntry;
26-
pub use crate::v1::MulticastGroupUnderlayResponse;
27-
pub use crate::v1::MulticastGroupUpdateUnderlayEntry;
28-
pub use crate::v1::MulticastUnderlayGroupIpParam;
29-
3023
// External multicast types changed in v5 (use new IpSrc with Any variant)
3124

3225
/// Response structure for external multicast group operations.

dpd-client/tests/integration_tests/common.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,9 @@ use types::PortId;
3636
const SHOW_VERBOSE: u8 = 0x01;
3737
const SHOW_HEX: u8 = 0x02;
3838

39+
/// Admin-local IPv6 multicast prefix (ff04::/16, scope 4).
40+
pub const ADMIN_LOCAL_MULTICAST_PREFIX: u16 = 0xFF04;
41+
3942
// Timeout set on `Pcap` objects.
4043
//
4144
// This is used as the "buffer timeout", which is the duration libpcap buffers
@@ -1425,6 +1428,7 @@ pub fn gen_arp_reply(src: Endpoint, tgt: Endpoint) -> Packet {
14251428
}
14261429

14271430
pub mod prelude {
1431+
pub use super::ADMIN_LOCAL_MULTICAST_PREFIX;
14281432
pub use super::NO_PORT;
14291433
pub use super::PhysPort;
14301434
pub use super::SERVICE_PORT;

0 commit comments

Comments
 (0)