]> git.proxmox.com Git - mirror_iproute2.git/commit - ip/iprule.c
iprule: support for ip_proto, sport and dport match options
authorRoopa Prabhu <roopa@cumulusnetworks.com>
Thu, 8 Mar 2018 18:06:47 +0000 (10:06 -0800)
committerDavid Ahern <dsahern@gmail.com>
Thu, 8 Mar 2018 18:08:18 +0000 (10:08 -0800)
commitf686f764682745daf6a93b0a6330ba42a961f858
tree983d4d61c981a1018dbaff6cb322af5b38fb829f
parente93d922123013ab9b449762261d20f8726852d9a
iprule: support for ip_proto, sport and dport match options

add support to match on ip_proto, sport and dport ranges.
For ip_proto, this patch currently enumerates, tcp, udp and sctp.
This list can be extended in the future.

example:
$ip rule add sport 666-777 dport 999 ip_proto tcp table 100
$ip rule show
0:      from all lookup local
32765:  from all ip_proto 6 sport 666-777 dport 999 lookup 100
32766:  from all lookup main
32767:  from all lookup default

Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
Signed-off-by: David Ahern <dsahern@gmail.com>
ip/iprule.c
man/man8/ip-rule.8