lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Sat, 13 Apr 2019 22:56:29 +0200 From: Jiri Pirko <jiri@...nulli.us> To: Vladimir Oltean <olteanv@...il.com> Cc: f.fainelli@...il.com, vivien.didelot@...il.com, andrew@...n.ch, davem@...emloft.net, netdev@...r.kernel.org, linux-kernel@...r.kernel.org, georg.waibel@...sor-technik.de Subject: Re: [PATCH v3 net-next 16/24] net: dsa: sja1105: Add support for VLAN operations Sat, Apr 13, 2019 at 03:28:14AM CEST, olteanv@...il.com wrote: >VLAN filtering cannot be properly disabled in SJA1105. So in order to >emulate the "no VLAN awareness" behavior (not dropping traffic that is >tagged with a VID that isn't configured on the port), we need to hack >another switch feature: programmable TPID (which is 0x8100 for 802.1Q). >We are reprogramming the TPID to a bogus value (ETH_P_EDSA) which leaves >the switch thinking that all traffic is untagged, and therefore accepts >it. > >Under a vlan_filtering bridge, the proper TPID of ETH_P_8021Q is >installed again, and the switch starts identifying 802.1Q-tagged >traffic. > >Signed-off-by: Vladimir Oltean <olteanv@...il.com> >Reviewed-by: Florian Fainelli <f.fainelli@...il.com> >--- >Changes from v3: >Changed back to ETH_P_EDSA. > >Changes from v2: >Changed the TPID from ETH_P_EDSA (0xDADA) to a newly introduced one: >ETH_P_DSA_8021Q (0xDADB). > > drivers/net/dsa/sja1105/sja1105_main.c | 254 +++++++++++++++++- > .../net/dsa/sja1105/sja1105_static_config.c | 38 +++ > .../net/dsa/sja1105/sja1105_static_config.h | 3 + > 3 files changed, 293 insertions(+), 2 deletions(-) > [...] >+#define sja1105_vlan_filtering_enabled(priv) \ >+ (((struct sja1105_general_params_entry *) \ >+ ((struct sja1105_private *)priv)->static_config. \ >+ tables[BLK_IDX_GENERAL_PARAMS].entries)->tpid == ETH_P_8021Q) This is unreadable. Please have it as function.
Powered by blists - more mailing lists