Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 4 Jan 2023 21:03:38 GMT
From:      Justin Hibbits <jhibbits@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: 11905a0b4e78 - main - ifnet: Expose if_t to userspace
Message-ID:  <202301042103.304L3cdv045460@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by jhibbits:

URL: https://cgit.FreeBSD.org/src/commit/?id=11905a0b4e78b13959f89629568ffeb4786f912a

commit 11905a0b4e78b13959f89629568ffeb4786f912a
Author:     Justin Hibbits <jhibbits@FreeBSD.org>
AuthorDate: 2023-01-04 20:56:31 +0000
Commit:     Justin Hibbits <jhibbits@FreeBSD.org>
CommitDate: 2023-01-04 21:04:05 +0000

    ifnet: Expose if_t to userspace
    
    <net/if_var.h> should be a kernel-only header, but it's included
    elsewhere.  Until that's addressed expose if_t to userspace to fix the
    build.
    
    Fixes:          be4315dcbb8
    Sponsored by:   Juniper Networks, Inc.
---
 sys/net/if.h | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/sys/net/if.h b/sys/net/if.h
index 85c217a888bd..888e7d5d7320 100644
--- a/sys/net/if.h
+++ b/sys/net/if.h
@@ -651,18 +651,18 @@ struct ifdownreason {
 
 #endif /* __BSD_VISIBLE */
 
-#ifdef _KERNEL
-#ifdef MALLOC_DECLARE
-MALLOC_DECLARE(M_IFADDR);
-MALLOC_DECLARE(M_IFMADDR);
-#endif
-
 /*
  * Opaque interface structure.
  */
 
 typedef struct ifnet * if_t;
 
+#ifdef _KERNEL
+#ifdef MALLOC_DECLARE
+MALLOC_DECLARE(M_IFADDR);
+MALLOC_DECLARE(M_IFMADDR);
+#endif
+
 extern struct sx ifnet_detach_sxlock;
 
 struct nvlist;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202301042103.304L3cdv045460>