NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: bin/52609 (npf generates bad bytecode for port ranges)



The following reply was made to PR bin/52609; it has been noted by GNATS.

From: Paul Ripke <stix%stix.id.au@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc: 
Subject: Re: bin/52609 (npf generates bad bytecode for port ranges)
Date: Mon, 26 Mar 2018 17:32:31 +1100

 This was on an amd64, NetBSD 8.0_BETA as of Sat Sep  9 12:02:11 AEST 2017.
 
 It's pretty easy to dump out the bytecode:
 
 slave:ksh$ cat /tmp/npf.conf 
 group "fubar" on wi0 {
         pass in final proto tcp to any port { 1, 4-5, 7 }
         pass in final proto tcp to any port { 4-5, 7 }
         pass in final proto tcp to any port { 1, 4-5 }
         pass in final proto tcp to any port { 4-5 }
 }
 slave:ksh$ npfctl debug /tmp/npf.conf /tmp/zz
 npfctl: warning - unknown interface 'wi0'
 npfctl: default group was not defined
 
 RULE AT LINE 2
 (000) ld       M[0]
 (001) jeq      #0x0             jt 14   jf 2
 (002) ld       M[2]
 (003) jeq      #0x6             jt 4    jf 14
 (004) ldx      M[1]
 (005) ldh      [x + 2]
 (006) jeq      #0x1             jt 13   jf 7
 ...
 
 I'm building -current, and I'll double check its behaviour when I get it
 installed somewhere.
 


Home | Main Index | Thread Index | Old Index