diff options
author | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2010-07-15 13:15:04 -0700 |
---|---|---|
committer | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2010-07-15 13:36:32 -0700 |
commit | 37b40196e9b647b665b53c3ffd6d8535cbd5d880 (patch) | |
tree | 5627594da32d8008be65f960cd627f3386785723 /lib/Vyatta | |
parent | bb78be860c22628305fcf8445000de9dedd0a240 (diff) | |
download | vyatta-cfg-qos-37b40196e9b647b665b53c3ffd6d8535cbd5d880.tar.gz vyatta-cfg-qos-37b40196e9b647b665b53c3ffd6d8535cbd5d880.zip |
Allow match on firewall mark and protocol
It is possible to use u32 to match on value and mark.
Diffstat (limited to 'lib/Vyatta')
-rw-r--r-- | lib/Vyatta/Qos/Match.pm | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/Vyatta/Qos/Match.pm b/lib/Vyatta/Qos/Match.pm index 591c2b0..cb5d4ff 100644 --- a/lib/Vyatta/Qos/Match.pm +++ b/lib/Vyatta/Qos/Match.pm @@ -66,8 +66,6 @@ sub new { $self->{_fwmark} = $fwmark; if ($ptype) { - die "Can not combine protocol and firewall mark match\n" - if ($fwmark); die "Can not combine protocol and vlan tag match\n" if ($vif); die "Can not combine protocol and interface match\n" @@ -100,6 +98,7 @@ sub filter { return; } + my $fwmark = $self->{_fwmark}; foreach my $proto (qw(ip ipv6 ether)) { my $p = $self->{$proto}; next unless $p; @@ -137,12 +136,12 @@ sub filter { print " match $sel dport $$p{dport} 0xffff" if $$p{dport}; } - print " $police" if $police; + print " match mark $fwmark 0xff" if $fwmark; + print " $police" if $police; printf " flowid %x:%x\n", $parent, $classid; return; } - my $fwmark = $self->{_fwmark}; my $indev = $self->{_indev}; my $vif = $self->{_vif}; if ( defined($vif) || defined($indev) ) { |