mirror of
https://github.com/apache/nuttx.git
synced 2026-06-02 01:21:26 +08:00
net/netlink: Add RTM route support
Signed-off-by: meijian <meijian@xiaomi.com>
This commit is contained in:
committed by
Alan Carvalho de Assis
parent
98d5e118c0
commit
34aeeb024c
@@ -36,6 +36,7 @@
|
||||
#include <nuttx/fs/fs.h>
|
||||
#include <nuttx/net/ip.h>
|
||||
|
||||
#include "netlink/netlink.h"
|
||||
#include "route/fileroute.h"
|
||||
#include "route/cacheroute.h"
|
||||
#include "route/route.h"
|
||||
@@ -313,6 +314,8 @@ int net_delroute_ipv4(in_addr_t target, in_addr_t netmask)
|
||||
filesize = (nentries - 1) * sizeof(struct net_route_ipv4_s);
|
||||
ret = file_truncate(&fshandle, filesize);
|
||||
|
||||
netlink_route_notify(&match, RTM_DELROUTE, AF_INET);
|
||||
|
||||
errout_with_fshandle:
|
||||
net_closeroute_ipv4(&fshandle);
|
||||
|
||||
@@ -464,6 +467,8 @@ int net_delroute_ipv6(net_ipv6addr_t target, net_ipv6addr_t netmask)
|
||||
filesize = (nentries - 1) * sizeof(struct net_route_ipv6_s);
|
||||
ret = file_truncate(&fshandle, filesize);
|
||||
|
||||
netlink_route_notify(&match, RTM_DELROUTE, AF_INET6);
|
||||
|
||||
errout_with_fshandle:
|
||||
net_closeroute_ipv6(&fshandle);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user