When tagging is not supported by the underlying switch driver,
ds->tag_protocol will be set to DSA_TAG_PROTO_NONE, and we should be
flagging the slave network devices with IFF_L2_ONLY such that IP
configuration is denied and they are just control end-points.

Signed-off-by: Florian Fainelli <f.faine...@gmail.com>
---
 net/dsa/slave.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/net/dsa/slave.c b/net/dsa/slave.c
index cce97385f743..855c66dddced 100644
--- a/net/dsa/slave.c
+++ b/net/dsa/slave.c
@@ -1185,6 +1185,7 @@ int dsa_slave_create(struct dsa_switch *ds, struct device 
*parent,
                break;
 #endif
        default:
+               slave_dev->flags |= IFF_L2_ONLY;
                p->xmit = dsa_slave_notag_xmit;
                break;
        }
-- 
2.1.0

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to