summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/Vyatta/Qos/Match.pm10
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/Vyatta/Qos/Match.pm b/lib/Vyatta/Qos/Match.pm
index 0c45958..765bcb8 100644
--- a/lib/Vyatta/Qos/Match.pm
+++ b/lib/Vyatta/Qos/Match.pm
@@ -27,12 +27,13 @@ sub new {
bless $self, $class;
- $self->{_vif} = $config->returnValue("vif");
- $self->{_dev} = getIfIndex($config->returnValue("interface"));
-
foreach my $ip (qw(ip ipv6)) {
next unless $config->exists($ip);
+ foreach my $t (qw(vif dev)) {
+ die "can not match on $ip and $t\n" if $config->exists($t);
+ }
+
# TODO make this data driven?
my %fields;
$fields{dsfield} = getDsfield( $config->returnValue("$ip dscp"));
@@ -44,6 +45,9 @@ sub new {
$self->{$ip} = \%fields;
}
+ $self->{_vif} = $config->returnValue("vif");
+ $self->{_dev} = getIfIndex($config->returnValue("interface"));
+
return $self;
}