Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F164363528
D58294.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D58294.diff
View Options
diff --git a/sbin/route/keywords b/sbin/route/keywords
--- a/sbin/route/keywords
+++ b/sbin/route/keywords
@@ -36,6 +36,7 @@
nostick
osi
prefixlen
+prefsrc
proto1
proto2
proxy
diff --git a/sbin/route/route.c b/sbin/route/route.c
--- a/sbin/route/route.c
+++ b/sbin/route/route.c
@@ -946,6 +946,7 @@
errx(EX_USAGE,
"invalid fib number: %s", *argv);
break;
+ case K_PREFSRC:
case K_IFA:
if (!--argc)
usage(NULL);
diff --git a/sbin/route/route_netlink.c b/sbin/route/route_netlink.c
--- a/sbin/route/route_netlink.c
+++ b/sbin/route/route_netlink.c
@@ -174,6 +174,7 @@
struct sockaddr *dst = get_addr(so, rtm_addrs, RTAX_DST);
struct sockaddr *mask = get_addr(so, rtm_addrs, RTAX_NETMASK);
struct sockaddr *gw = get_addr(so, rtm_addrs, RTAX_GATEWAY);
+ struct sockaddr *prefsrc = get_addr(so, rtm_addrs, RTAX_IFA);
if (dst == NULL)
return (EINVAL);
@@ -225,6 +226,7 @@
rtm->rtm_flags = RTM_F_PREFIX;
snl_add_msg_attr_ip(&nw, RTA_DST, dst);
+ snl_add_msg_attr_ip(&nw, RTA_PREFSRC, prefsrc);
snl_add_msg_attr_u32(&nw, RTA_TABLE, fib);
uint32_t rta_oif = 0;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Aug 1, 4:59 AM (5 h, 21 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
35778475
Default Alt Text
D58294.diff (1 KB)
Attached To
Mode
D58294: netlink: Add RTA_PREFSRC support
Attached
Detach File
Event Timeline
Log In to Comment