On Fri, Dec 02, 2016 at 07:24:39PM +0100, Simon Horman wrote: > Support matching on ICMP type and code. > > Example usage: > > tc qdisc add dev eth0 ingress > > tc filter add dev eth0 protocol ip parent ffff: flower \ > indev eth0 ip_proto icmp type 8 code 0 action drop > > tc filter add dev eth0 protocol ipv6 parent ffff: flower \ > indev eth0 ip_proto icmpv6 type 128 code 0 action drop > > Signed-off-by: Simon Horman <simon.hor...@netronome.com>
This series no longer applies to net-next. ... > @@ -524,6 +597,12 @@ static void flower_print_port(FILE *f, char *name, > struct rtattr *attr) > fprintf(f, "\n %s %d", name, ntohs(rta_getattr_u16(attr))); > } > > +static void flower_print_icmp(FILE *f, char *name, struct rtattr *attr) > +{ > + if (attr) > + fprintf(f, "\n %s %d", name, ntohs(rta_getattr_u8(attr))); ntohs() should be removed from the above as its argument is a u8. ...