We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7158e91 commit 5a26a07Copy full SHA for 5a26a07
dpd/src/api_server.rs
@@ -3201,7 +3201,17 @@ async fn multicast_group_update(
3201
let switch: &Switch = rqctx.context();
3202
let ip = path.into_inner().group_ip;
3203
3204
- mcast::modify_group_internal(switch, ip, group.into_inner())
+ 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())
3215
.map(HttpResponseOk)
3216
.map_err(HttpError::from)
3217
}
0 commit comments