mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-24 21:54:34 -04:00
net: flow: Add l3mdev flow update
Add l3mdev hook to set FLOWI_FLAG_SKIP_NH_OIF flag and update oif/iif in flow struct if its oif or iif points to a device enslaved to an L3 Master device. Only 1 needs to be converted to match the l3mdev FIB rule. This moves the flow adjustment for l3mdev to a single point catching all lookups. It is redundant for existing hooks (those are removed in later patches) but is needed for missed lookups such as PMTU updates. Signed-off-by: David Ahern <dsa@cumulusnetworks.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
cf9932a941
commit
9ee0034b8f
4 changed files with 47 additions and 0 deletions
|
|
@ -49,6 +49,8 @@ struct l3mdev_ops {
|
|||
int l3mdev_fib_rule_match(struct net *net, struct flowi *fl,
|
||||
struct fib_lookup_arg *arg);
|
||||
|
||||
void l3mdev_update_flow(struct net *net, struct flowi *fl);
|
||||
|
||||
int l3mdev_master_ifindex_rcu(const struct net_device *dev);
|
||||
static inline int l3mdev_master_ifindex(struct net_device *dev)
|
||||
{
|
||||
|
|
@ -290,6 +292,10 @@ int l3mdev_fib_rule_match(struct net *net, struct flowi *fl,
|
|||
{
|
||||
return 1;
|
||||
}
|
||||
static inline
|
||||
void l3mdev_update_flow(struct net *net, struct flowi *fl)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _NET_L3MDEV_H_ */
|
||||
|
|
|
|||
Loading…
Reference in a new issue