]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
bpf: use __always_inline macro in restrict-ifaces.bpf.c
authorJames Hilliard <james.hilliard1@gmail.com>
Thu, 9 Jun 2022 06:36:29 +0000 (00:36 -0600)
committerLuca Boccassi <luca.boccassi@gmail.com>
Thu, 9 Jun 2022 16:45:11 +0000 (17:45 +0100)
This appears to be more reliable at inlining with some compilers.

src/core/bpf/restrict_ifaces/restrict-ifaces.bpf.c

index 347a3a8d21519a15abaea3d08217af65411c4266..32cde5c8e020fc8f4e20470dcaa395a1c4f5bb5f 100644 (file)
@@ -20,7 +20,7 @@ struct {
 #define DROP 0
 #define PASS 1
 
-static inline int restrict_network_interfaces_impl(const struct __sk_buff *sk) {
+static __always_inline int restrict_network_interfaces_impl(const struct __sk_buff *sk) {
         __u32 zero = 0, ifindex;
         __u8 *lookup_result;