set firewall family inet filter access_control term 10 from source-address x.x.x.x/32 set firewall family inet filter access_control term 10 from protocol udp set firewall family inet filter access_control term 10 from port ntp set firewall family inet filter access_control term 10 then accept set firewall family inet filter access_control term 20 from protocol udp set firewall family inet filter access_control term 20 from port ntp set firewall family inet filter access_control term 20 then discard set firewall family inet filter access_control term 100 then accept
Using the port qualifier should program two entries in the PFE for matching source-port and destination-port each, but in QFX5k, there's no PFE entry for a port qualifier, resulting in the term being matched for any ports as if there is no matching condition for ports.Therefore, all UDP packets will pass term 20 of the above firewall filter, ending up being discarded.
An internal PR addressed this issue, and the fix is applied to the following releases:21.1R2, 21.2R1, 21.2R2, 21.3R1The issue is applicable with all QFX5k series using Junos. For releases without the fix applied, you need to divide the term into two terms, each with source-port and destination-port as a workaround.