Page MenuHomePhabricator

Qos/Match.pm shaper max-length
Closed, ResolvedPublicBUG

Description

p{maxlen} is a string, needs to be converted to int before bitwise and.

Code near line 187 should be:

if ($$p{maxlen}) {
    if ( $proto eq 'ip' ) {
        printf " match u16 0x0000 %#.4x at 2", 0xffff & ~int($$p{maxlen});
    } elsif ( $proto eq 'ipv6' ) {
        printf " match u16 0x0000 %#.4x at 4", 0xffff & ~int($$p{maxlen});
    }
}

Details

Difficulty level
Easy (less than an hour)
Version
999.201711072137
Why the issue appeared?
Will be filled on close
syncer triaged this task as Low priority.Dec 21 2017, 9:21 PM
syncer assigned this task to dmbaturin.
syncer added subscribers: dmbaturin, syncer.

@dmbaturin please review and merge in

c-po closed this task as Resolved.Dec 26 2017, 9:41 PM