From c9756229ed818e4c354d8bfd7c65c656f92fc98b Mon Sep 17 00:00:00 2001 From: Numan Siddique Date: Fri, 11 May 2018 16:08:00 +0530 Subject: ovn: Set proper Neighbour Adv flag when replying for NS request for router IP Presently when a VM's IPv6 stack sends a Neighbor Solicitation request for its router IP, (mostly when the ND cache entry for the router is in STALE state) ovn-controller responds with a Neighbor Adv packet (using the action nd_na). But it doesn't set 'ND_RSO_ROUTER' in the RSO flags (please see RFC4861 page 23). Because of which, the VM deletes the default route. The default route gets added again when the next RA is received (but would again gets deleted if its sends NS request). And this results in disruption of IPv6 traffic. This patch addresses this issue by adding a new action 'nd_na_router' which is same as 'nd_na' but it sets the 'ND_RSO_ROUTER' in the RSO flags. ovn-northd uses this action. A new action is added instead of modifying the existing 'nd_na' action. This is because - We cannot set the RSO flags in the "nd_na { ..actions .. }" - It would be ugly to have something like nd_na { router_flags, ...actions .. } Reported-at: https://bugzilla.redhat.com/show_bug.cgi?id=1567735 Signed-off-by: Numan Siddique Acked-by: Mark Michelson Signed-off-by: Ben Pfaff --- include/ovn/actions.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'include') diff --git a/include/ovn/actions.h b/include/ovn/actions.h index fb8f51509..638465193 100644 --- a/include/ovn/actions.h +++ b/include/ovn/actions.h @@ -68,6 +68,7 @@ struct ovn_extend_table; OVNACT(ICMP6, ovnact_nest) \ OVNACT(TCP_RESET, ovnact_nest) \ OVNACT(ND_NA, ovnact_nest) \ + OVNACT(ND_NA_ROUTER, ovnact_nest) \ OVNACT(GET_ARP, ovnact_get_mac_bind) \ OVNACT(PUT_ARP, ovnact_put_mac_bind) \ OVNACT(GET_ND, ovnact_get_mac_bind) \ @@ -444,6 +445,12 @@ enum action_opcode { * The actions, in OpenFlow 1.3 format, follow the action_header. */ ACTION_OPCODE_TCP_RESET, + + /* "nd_na_router { ...actions... }" with rso flag 'ND_RSO_ROUTER' set. + * + * The actions, in OpenFlow 1.3 format, follow the action_header. + */ + ACTION_OPCODE_ND_NA_ROUTER, }; /* Header. */ -- cgit v1.2.1