From: Greg Kroah-Hartman Date: Mon, 4 Apr 2022 11:06:51 +0000 (+0200) Subject: 4.9-stable patches X-Git-Tag: v5.17.2~53 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=03402633f79520eb303e696ff7e08ff8b75476d5;p=thirdparty%2Fkernel%2Fstable-queue.git 4.9-stable patches added patches: openvswitch-fixed-nd-target-mask-field-in-the-flow-dump.patch --- diff --git a/queue-4.9/openvswitch-fixed-nd-target-mask-field-in-the-flow-dump.patch b/queue-4.9/openvswitch-fixed-nd-target-mask-field-in-the-flow-dump.patch new file mode 100644 index 00000000000..5033d07fbd5 --- /dev/null +++ b/queue-4.9/openvswitch-fixed-nd-target-mask-field-in-the-flow-dump.patch @@ -0,0 +1,49 @@ +From f19c44452b58a84d95e209b847f5495d91c9983a Mon Sep 17 00:00:00 2001 +From: Martin Varghese +Date: Mon, 28 Mar 2022 11:11:48 +0530 +Subject: openvswitch: Fixed nd target mask field in the flow dump. + +From: Martin Varghese + +commit f19c44452b58a84d95e209b847f5495d91c9983a 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: e64457191a25 (openvswitch: Restructure datapath.c and flow.c) +Signed-off-by: Martin Varghese +Link: https://lore.kernel.org/r/20220328054148.3057-1-martinvarghesenokia@gmail.com +Signed-off-by: Paolo Abeni +Signed-off-by: Greg Kroah-Hartman +--- + net/openvswitch/flow_netlink.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/net/openvswitch/flow_netlink.c ++++ b/net/openvswitch/flow_netlink.c +@@ -1713,8 +1713,8 @@ static int __ovs_nla_put_key(const struc + icmpv6_key->icmpv6_type = ntohs(output->tp.src); + icmpv6_key->icmpv6_code = ntohs(output->tp.dst); + +- if (icmpv6_key->icmpv6_type == NDISC_NEIGHBOUR_SOLICITATION || +- icmpv6_key->icmpv6_type == NDISC_NEIGHBOUR_ADVERTISEMENT) { ++ if (swkey->tp.src == htons(NDISC_NEIGHBOUR_SOLICITATION) || ++ swkey->tp.src == htons(NDISC_NEIGHBOUR_ADVERTISEMENT)) { + struct ovs_key_nd *nd_key; + + nla = nla_reserve(skb, OVS_KEY_ATTR_ND, sizeof(*nd_key)); diff --git a/queue-4.9/series b/queue-4.9/series index 278b2c2689d..01575459ef8 100644 --- a/queue-4.9/series +++ b/queue-4.9/series @@ -159,3 +159,4 @@ ubi-fastmap-return-error-code-if-memory-allocation-fails-in-add_aeb.patch asoc-topology-allow-tlv-control-to-be-either-read-or-write.patch arm-dts-spear1340-update-serial-node-properties.patch arm-dts-spear13xx-update-spi-dma-properties.patch +openvswitch-fixed-nd-target-mask-field-in-the-flow-dump.patch