Skip to content

Commit

Permalink
Add tc-flower support.
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander Chernikov committed Sep 24, 2024
1 parent f5d6cea commit 999f491
Show file tree
Hide file tree
Showing 11 changed files with 2,689 additions and 8 deletions.
3 changes: 2 additions & 1 deletion src/tc/actions/action.rs
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,8 @@ pub enum TcActionOption {
Nat(TcActionNatOption),
/// Tunnel key options.
///
/// These options type can be used to assign encapsulation properties to the packet.
/// These options type can be used to assign encapsulation properties to
/// the packet.
TunnelKey(TcActionTunnelKeyOption),
/// Other action types not yet supported by this library.
Other(DefaultNla),
Expand Down
6 changes: 4 additions & 2 deletions src/tc/actions/tests/tunnel_key.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ use crate::tc::{
};
use std::net::{Ipv4Addr, Ipv6Addr};

// > tc actions add action tunnel_key set id 33 src_ip 1.2.3.4 dst_ip 2.3.4.5 dst_port 4789 tos 1 ttl 2
// > tc actions add action tunnel_key set id 33 src_ip 1.2.3.4 dst_ip
// > 2.3.4.5 dst_port 4789 tos 1 ttl 2
// > tools/nl_dump.py dump_actions tunnel_key
// Note: 5.15 and 6.8 kernels do NOT set NLA_F_NESTED for TCA_ACT_OPTIONS
#[test]
Expand Down Expand Up @@ -106,7 +107,8 @@ fn get_tunnel_key_vxlan_action_ipv4() {
assert_eq!(buf, raw);
}

// > tc actions add action tunnel_key set id 33 src_ip 2a00:1:: dst_ip 2a01:2:: dst_port 4789 tos 1 ttl 2
// > tc actions add action tunnel_key set id 33 src_ip 2a00:1:: dst_ip
// > 2a01:2:: dst_port 4789 tos 1 ttl 2
// > tools/nl_dump.py dump_actions tunnel_key
// Note: 5.15 and 6.8 kernels do NOT set NLA_F_NESTED for TCA_ACT_OPTIONS
#[test]
Expand Down
Loading

0 comments on commit 999f491

Please sign in to comment.