summaryrefslogtreecommitdiffstats
path: root/sys/net/rtsock.c
diff options
context:
space:
mode:
authorqingli <qingli@FreeBSD.org>2009-01-12 11:24:32 +0000
committerqingli <qingli@FreeBSD.org>2009-01-12 11:24:32 +0000
commit751dff36104851edee18dc55bd333b085a912d68 (patch)
treed82dbdbb0112cce72e73dff9f89fa6d0429199e8 /sys/net/rtsock.c
parentc9e59ec6fa825d5d93c9929e20f76b414e42e005 (diff)
downloadFreeBSD-src-751dff36104851edee18dc55bd333b085a912d68.zip
FreeBSD-src-751dff36104851edee18dc55bd333b085a912d68.tar.gz
Revive the RTF_LLINFO flag in route.h. The kernel code is guarded
by the new kernel option COMPAT_ROUTE_FLAGS for binary backward compatibility. The RTF_LLDATA flag maps to the same value as RTF_LLINFO. RTF_LLDATA is used by the arp and ndp utilities. The RTF_LLDATA flag is always returned to the userland regardless whether the COMPAT_ROUTE_FLAGS is defined.
Diffstat (limited to 'sys/net/rtsock.c')
-rw-r--r--sys/net/rtsock.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/sys/net/rtsock.c b/sys/net/rtsock.c
index 45e3c92..8c5499c 100644
--- a/sys/net/rtsock.c
+++ b/sys/net/rtsock.c
@@ -31,6 +31,7 @@
*/
#include "opt_sctp.h"
#include "opt_mpath.h"
+#include "opt_route.h"
#include "opt_inet.h"
#include "opt_inet6.h"
@@ -1446,7 +1447,12 @@ sysctl_rtsock(SYSCTL_HANDLER_ARGS)
* take care of llinfo entries, the caller must
* specify an AF
*/
- if (w.w_op == NET_RT_FLAGS && w.w_arg == 0) {
+ if (w.w_op == NET_RT_FLAGS &&
+#if defined(COMPAT_ROUTE_FLAGS)
+ (w.w_arg & RTF_LLINFO)) {
+#else
+ w.w_arg == 0) {
+#endif
if (af != 0)
error = lltable_sysctl_dumparp(af, w.w_req);
else
OpenPOWER on IntegriCloud