Skip to content

Commit e36c452

Browse files
Martin Varghesegregkh
authored andcommitted
openvswitch: Fixed nd target mask field in the flow dump.
commit f19c444 upstream. IPv6 nd target mask was not getting populated in flow dump. In the function __ovs_nla_put_key the icmp code mask field was checked instead of icmp code key field to classify the flow as neighbour discovery. ufid:bdfbe3e5-60c2-43b0-a5ff-dfcac1c37328, recirc_id(0),dp_hash(0/0), skb_priority(0/0),in_port(ovs-nm1),skb_mark(0/0),ct_state(0/0), ct_zone(0/0),ct_mark(0/0),ct_label(0/0), eth(src=00:00:00:00:00:00/00:00:00:00:00:00, dst=00:00:00:00:00:00/00:00:00:00:00:00), eth_type(0x86dd), ipv6(src=::/::,dst=::/::,label=0/0,proto=58,tclass=0/0,hlimit=0/0,frag=no), icmpv6(type=135,code=0), nd(target=2001::2/::, sll=00:00:00:00:00:00/00:00:00:00:00:00, tll=00:00:00:00:00:00/00:00:00:00:00:00), packets:10, bytes:860, used:0.504s, dp:ovs, actions:ovs-nm2 Fixes: e644571 (openvswitch: Restructure datapath.c and flow.c) Signed-off-by: Martin Varghese <martin.varghese@nokia.com> Link: https://lore.kernel.org/r/20220328054148.3057-1-martinvarghesenokia@gmail.com Signed-off-by: Paolo Abeni <pabeni@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 415edc6 commit e36c452

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

net/openvswitch/flow_netlink.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2201,8 +2201,8 @@ static int __ovs_nla_put_key(const struct sw_flow_key *swkey,
22012201
icmpv6_key->icmpv6_type = ntohs(output->tp.src);
22022202
icmpv6_key->icmpv6_code = ntohs(output->tp.dst);
22032203

2204-
if (icmpv6_key->icmpv6_type == NDISC_NEIGHBOUR_SOLICITATION ||
2205-
icmpv6_key->icmpv6_type == NDISC_NEIGHBOUR_ADVERTISEMENT) {
2204+
if (swkey->tp.src == htons(NDISC_NEIGHBOUR_SOLICITATION) ||
2205+
swkey->tp.src == htons(NDISC_NEIGHBOUR_ADVERTISEMENT)) {
22062206
struct ovs_key_nd *nd_key;
22072207

22082208
nla = nla_reserve(skb, OVS_KEY_ATTR_ND, sizeof(*nd_key));

0 commit comments

Comments
 (0)