chiark / gitweb /
make route_packet infallible
[hippotat.git] / server / suser.rs
index dec1a5aacd4cce857193fcc1cbe80afe224f48da..856afe855c180be6bd6350ca36bbebd3dfbe354f 100644 (file)
@@ -66,7 +66,7 @@ pub async fn run(global: Arc<Global>,
         let WebRequest {
           initial, initial_remaining, length_hint, mut body,
           boundary_finder,
-          reply_to, conn, mut warnings,
+          reply_to, conn, mut warnings, may_route,
         } = req.ok_or_else(|| anyhow!("webservers all shut down!"))?;
 
         match async {
@@ -142,8 +142,9 @@ pub async fn run(global: Arc<Global>,
               let daddr = ip_packet_addr::<true>(header)?;
               Ok(daddr)
             }, |(daddr,packet)| route_packet(
-              &global, &conn, Some(&ic.link.client), daddr,packet
-            ),
+              &global, &conn, Some(&ic.link.client), daddr,
+              packet, may_route.clone(),
+            ).map(Ok),
               |e| Ok::<_,SlipFramesError<_>>({ warnings.add(&e)?; })
             ).await?;
           }