Skip to content

Commit 2d7dd17

Browse files
committed
Interface ambiugity: multiple routes is ok if they're to the same interface
1 parent 7e633e2 commit 2d7dd17

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/netlink/route.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,9 +151,10 @@ impl Rtbl {
151151
self.0
152152
.iter()
153153
.filter(|route| route.pfx.matches(addr))
154+
.map(|route| route.iface)
155+
.unique()
154156
.exactly_one()
155-
.ok()?
156-
.iface,
157+
.ok()?,
157158
)
158159
}
159160
pub fn for_iface(&self, iface: u32) -> impl Iterator<Item = Prefix> + '_ {

0 commit comments

Comments
 (0)