Skip to content

Commit 5a26a07

Browse files
[review] updates on lock handling, ipv6 use, more
1 parent 7158e91 commit 5a26a07

File tree

3 files changed

+149
-243
lines changed

3 files changed

+149
-243
lines changed

dpd/src/api_server.rs

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3201,7 +3201,17 @@ async fn multicast_group_update(
32013201
let switch: &Switch = rqctx.context();
32023202
let ip = path.into_inner().group_ip;
32033203

3204-
mcast::modify_group_internal(switch, ip, group.into_inner())
3204+
let ipv6 = match ip {
3205+
IpAddr::V6(ipv6) => ipv6,
3206+
IpAddr::V4(_) => {
3207+
return Err(HttpError::for_bad_request(
3208+
None,
3209+
"Internal multicast groups must use IPv6 addresses".to_string(),
3210+
));
3211+
}
3212+
};
3213+
3214+
mcast::modify_group_internal(switch, ipv6, group.into_inner())
32053215
.map(HttpResponseOk)
32063216
.map_err(HttpError::from)
32073217
}

0 commit comments

Comments
 (0)