[ebtables]add the filter rule for ARP packets with vlan tag:#3945
[ebtables]add the filter rule for ARP packets with vlan tag:#3945prsunny merged 1 commit intosonic-net:masterfrom
Conversation
1. ebtables -t filter -A FORWARD -p 802_1Q --vlan-encap 0806 -j DROP The ARP packet with vlan tag can't match the default rule. Signed-off-by: wangshengjun <[email protected]>
|
why the checked in file is a binary file? can we have text file for the rule? |
lguohan
left a comment
There was a problem hiding this comment.
need text file, not binary file.
|
@lguohan The original file of ebtables.filter is binary file. |
|
The ebtables.filter should be loaded in the running system, and check it by issuing the cmd of 'ebtables -L' |
|
@prsunny , can you take a look? |
|
for persistance, the filter file was added as binary. Will discuss with Ying to identify an approach - Original PR - #2805 |
|
There are silimiar issue about IPv6 neighbour-solicitation/neighbour-advertisement. The following rule will filter duplicate untagged IPv6 NS/NA packets: sudo /sbin/ebtables -t filter -A FORWARD -p IPV6 --ip6-protocol ipv6-icmp --ip6-icmp-type 135:136/0 -j DROP As for vlan tagged IPv6 NS/NA packet, do you know how to filter only NS/NA, except using sudo /sbin/ebtables -A FORWARD -p 802_1Q --vlan-encap IPv6 -j DROP to drop all IPv6 packet? |
|
I am ok with the binary format as it is consistent with the original commit. @prsunny , are you ok with adding the new rule here? |
|
@lguohan , lgtm |
1. ebtables -t filter -A FORWARD -p 802_1Q --vlan-encap 0806 -j DROP The ARP packet with vlan tag can't match the default rule. Signed-off-by: wangshengjun <[email protected]>
The ARP packet with vlan tag can't match the default rule.
Signed-off-by: wangshengjun [email protected]
- What I did
The default rule can't match the ARP packet with vlan tag.So add a new rule for the case.
The new rule as follows:
ebtables -t filter -A FORWARD -p 802_1Q --vlan-encap 0806 -j DROP
- How I did it
- How to verify it
admin@sonic:~$ sudo ebtables -L
Bridge table: filter
Bridge chain: INPUT, entries: 0, policy: ACCEPT
Bridge chain: FORWARD, entries: 3, policy: ACCEPT
-d BGA -j DROP
-p ARP -j DROP
-p 802_1Q --vlan-encap ARP -j DROP
Bridge chain: OUTPUT, entries: 0, policy: ACCEPT
- Description for the changelog
- A picture of a cute animal (not mandatory but encouraged)