]> git.baikalelectronics.ru Git - kernel.git/commit
net/ipv4: Initialize proto and ports in flow struct
authorDavid Ahern <dsahern@gmail.com>
Wed, 16 May 2018 20:36:40 +0000 (13:36 -0700)
committerDavid S. Miller <davem@davemloft.net>
Thu, 17 May 2018 18:55:21 +0000 (14:55 -0400)
commit2e592a217b6641b977aca8275ba0a67974f15f09
treef115003a688ee3366207745a53eabbe53a533796
parent023e778a57efa3ef40e12adccab1f20ac1280b3b
net/ipv4: Initialize proto and ports in flow struct

Updating the FIB tracepoint for the recent change to allow rules using
the protocol and ports exposed a few places where the entries in the flow
struct are not initialized.

For __fib_validate_source add the call to fib4_rules_early_flow_dissect
since it is invoked for the input path. For netfilter, add the memset on
the flow struct to avoid future problems like this. In ip_route_input_slow
need to set the fields if the skb dissection does not happen.

Fixes: 93a0f08135ae ("net: fib_rules: support for match on ip_proto, sport and dport")
Signed-off-by: David Ahern <dsahern@gmail.com>
Acked-by: Roopa Prabhu <roopa@cumulusnetworks.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/fib_frontend.c
net/ipv4/netfilter/ipt_rpfilter.c
net/ipv4/route.c