diff options
| author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2025-04-28 09:51:34 +0200 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2025-04-28 09:51:34 +0200 |
| commit | 785151f50ddacac06c7a3c5f3d31642794507fdf (patch) | |
| tree | 6159690f38eace5a34a1657631f72adf91d502be /include/net/l3mdev.h | |
| parent | 142ba31d8b4aff086c4f080bd97d437232922177 (diff) | |
| parent | b4432656b36e5cc1d50a1f2dc15357543add530e (diff) | |
| download | linux-next-785151f50ddacac06c7a3c5f3d31642794507fdf.tar.gz linux-next-785151f50ddacac06c7a3c5f3d31642794507fdf.zip | |
Merge 6.15-rc4 into driver-core-next
We need the driver core fixes in here as well.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/net/l3mdev.h')
| -rw-r--r-- | include/net/l3mdev.h | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/include/net/l3mdev.h b/include/net/l3mdev.h index f7fe796e8429..1eb8dad18f7e 100644 --- a/include/net/l3mdev.h +++ b/include/net/l3mdev.h @@ -59,6 +59,20 @@ int l3mdev_ifindex_lookup_by_table_id(enum l3mdev_type l3type, struct net *net, int l3mdev_fib_rule_match(struct net *net, struct flowi *fl, struct fib_lookup_arg *arg); +static inline +bool l3mdev_fib_rule_iif_match(const struct flowi *fl, int iifindex) +{ + return !(fl->flowi_flags & FLOWI_FLAG_L3MDEV_OIF) && + fl->flowi_l3mdev == iifindex; +} + +static inline +bool l3mdev_fib_rule_oif_match(const struct flowi *fl, int oifindex) +{ + return fl->flowi_flags & FLOWI_FLAG_L3MDEV_OIF && + fl->flowi_l3mdev == oifindex; +} + void l3mdev_update_flow(struct net *net, struct flowi *fl); int l3mdev_master_ifindex_rcu(const struct net_device *dev); @@ -327,6 +341,19 @@ int l3mdev_fib_rule_match(struct net *net, struct flowi *fl, { return 1; } + +static inline +bool l3mdev_fib_rule_iif_match(const struct flowi *fl, int iifindex) +{ + return false; +} + +static inline +bool l3mdev_fib_rule_oif_match(const struct flowi *fl, int oifindex) +{ + return false; +} + static inline void l3mdev_update_flow(struct net *net, struct flowi *fl) { |
