The branch main has been updated by melifaro:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=68f9e13563f677169728f55f5523142530d26c11

commit 68f9e13563f677169728f55f5523142530d26c11
Author:     Alexander V. Chernikov <[email protected]>
AuthorDate: 2023-04-02 13:50:05 +0000
Commit:     Alexander V. Chernikov <[email protected]>
CommitDate: 2023-04-02 13:50:05 +0000

    route: add support for exact-prefix-match via netlink.
---
 sbin/route/route_netlink.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/sbin/route/route_netlink.c b/sbin/route/route_netlink.c
index 66b1920a58db..ce7da288496f 100644
--- a/sbin/route/route_netlink.c
+++ b/sbin/route/route_netlink.c
@@ -203,6 +203,10 @@ rtmsg_nl_int(struct nl_helper *h, int cmd, int rtm_flags, 
int fib,
        rtm->rtm_type = rtm_type;
        rtm->rtm_dst_len = plen;
 
+       /* Request exact prefix match if mask is set */
+       if ((cmd == RTSOCK_RTM_GET) && (mask != NULL))
+               rtm->rtm_flags = RTM_F_PREFIX;
+
        snl_add_msg_attr_ip(&nw, RTA_DST, dst);
        snl_add_msg_attr_u32(&nw, RTA_TABLE, fib);
 

Reply via email to