Re: [PATCH] evl/net: rx filter precedence over loopback
Philippe Gerum <[email protected]>
| Newsgroups | dev.linux.lists.xenomai |
|---|---|
| Message-ID | <[email protected]> |
Brandon Ho <[email protected]> writes: > Signed-off-by: Brandon Ho <[email protected]> > --- > include/evl/net/device.h | 17 +++++++++-------- > 1 file changed, 9 insertions(+), 8 deletions(-) > > diff --git a/include/evl/net/device.h b/include/evl/net/device.h > index d0085b3c8..b8ed44377 100644 > --- a/include/evl/net/device.h > +++ b/include/evl/net/device.h > @@ -53,18 +53,19 @@ evl_net_filter_rx(struct net_device *dev, struct sk_buff *skb) > struct evl_netdev_state *est = dev->oob_state.estate; > > /* > - * Unconditionally accept all traffic sent to oob-enabled > - * loopback devices from the oob stage. Those devices are very > - * unlikely to support VLANs, but we could still use a filter > - * to accept in-band traffic, so keep on checking for the > - * latter. > + * RX filter takes precedence over loopback acceptance, because > + * it may be used to route packets to in-band consumers. > + */ > + if (test_bit(EVL_NETDEV_RX_FILTER_BIT, &est->flags)) > + return __evl_net_filter_rx(est, skb); > + > + /* > + * Accept all traffic sent to oob-enabled loopback devices > + * from the oob stage. > */ > if (dev->flags & IFF_LOOPBACK && running_oob()) > return EVL_RX_ACCEPT; > > - if (test_bit(EVL_NETDEV_RX_FILTER_BIT, &est->flags)) > - return __evl_net_filter_rx(est, skb); > - > return EVL_RX_VLAN; > } Thanks for contributing, appreciated. The change above is superseded by the following (recent) commit: https://gitlab.com/Xenomai/xenomai4/linux-evl/-/commit/0bf66e53dcf91da8b3a8c3283cb78ff17712c670 -- Philippe.