summaryrefslogtreecommitdiff
path: root/Kernel/Net/Routing.h
diff options
context:
space:
mode:
Diffstat (limited to 'Kernel/Net/Routing.h')
-rw-r--r--Kernel/Net/Routing.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/Kernel/Net/Routing.h b/Kernel/Net/Routing.h
index 3d68a0f34c..ba7f06f2d2 100644
--- a/Kernel/Net/Routing.h
+++ b/Kernel/Net/Routing.h
@@ -26,7 +26,12 @@ struct Route : public RefCounted<Route> {
bool operator==(Route const& other) const
{
- return destination == other.destination && gateway == other.gateway && netmask == other.netmask && flags == other.flags && adapter.ptr() == other.adapter.ptr();
+ return destination == other.destination && netmask == other.netmask && flags == other.flags && adapter.ptr() == other.adapter.ptr();
+ }
+
+ bool matches(Route const& other) const
+ {
+ return destination == other.destination && (gateway == other.gateway || other.gateway.is_zero()) && netmask == other.netmask && flags == other.flags && adapter.ptr() == other.adapter.ptr();
}
const IPv4Address destination;