netlink icon indicating copy to clipboard operation
netlink copied to clipboard

Support vlan action, including pop and push

Open shuowang-123 opened this issue 3 years ago • 4 comments

This would allow users to strip/add vlan tags as a packet goes through an interface. Tested on an Oracle Linux 8 VM. I ran the test without clean up, and verified that vlan push rule was added correctly:

filter parent ffff: protocol all pref 1 flower chain 0 filter parent ffff: protocol all pref 1 flower chain 0 handle 0x1 eth_type ipv4 dst_ip 1.0.0.1/24 src_ip 2.0.0.1/24 enc_dst_ip 3.0.0.1/24 enc_src_ip 4.0.0.1/24 enc_key_id 1234 enc_dst_port 8472 not_in_hw action order 1: vlan pop pipe index 1 ref 1 bind 1

action order 2: vlan  push id 1234 protocol 802.1Q priority 0 pipe
 index 2 ref 1 bind 1

action order 3: mirred (Egress Redirect to device bar) stolen
index 1 ref 1 bind 1

shuowang-123 avatar Sep 03 '22 22:09 shuowang-123

This should fix https://github.com/vishvananda/netlink/issues/588

shuowang-123 avatar Sep 06 '22 23:09 shuowang-123

@shuowang-123 please fix the conflicts

aboch avatar Mar 28 '24 18:03 aboch

@shuowang-123 please fix the conflicts

aboch avatar Jul 03 '24 19:07 aboch

@shuowang-123 ping

aboch avatar Aug 23 '24 19:08 aboch