diff --git a/neutron_lib/constants.py b/neutron_lib/constants.py index 371899cad..d1ef6a5c2 100644 --- a/neutron_lib/constants.py +++ b/neutron_lib/constants.py @@ -134,8 +134,10 @@ PROTO_NAME_DCCP = 'dccp' PROTO_NAME_EGP = 'egp' PROTO_NAME_ESP = 'esp' PROTO_NAME_GRE = 'gre' +PROTO_NAME_HOPOPT = 'hopopt' PROTO_NAME_ICMP = 'icmp' PROTO_NAME_IGMP = 'igmp' +PROTO_NAME_IP = 'ip' PROTO_NAME_IPIP = 'ipip' PROTO_NAME_IPV6_ENCAP = 'ipv6-encap' PROTO_NAME_IPV6_FRAG = 'ipv6-frag' @@ -160,8 +162,10 @@ PROTO_NUM_DCCP = 33 PROTO_NUM_EGP = 8 PROTO_NUM_ESP = 50 PROTO_NUM_GRE = 47 +PROTO_NUM_HOPOPT = 0 PROTO_NUM_ICMP = 1 PROTO_NUM_IGMP = 2 +PROTO_NUM_IP = 0 PROTO_NUM_IPIP = 4 PROTO_NUM_IPV6_ENCAP = 41 PROTO_NUM_IPV6_FRAG = 44 @@ -183,8 +187,10 @@ IP_PROTOCOL_MAP = {PROTO_NAME_AH: PROTO_NUM_AH, PROTO_NAME_EGP: PROTO_NUM_EGP, PROTO_NAME_ESP: PROTO_NUM_ESP, PROTO_NAME_GRE: PROTO_NUM_GRE, + PROTO_NAME_HOPOPT: PROTO_NUM_HOPOPT, PROTO_NAME_ICMP: PROTO_NUM_ICMP, PROTO_NAME_IGMP: PROTO_NUM_IGMP, + PROTO_NAME_IP: PROTO_NUM_IP, PROTO_NAME_IPIP: PROTO_NUM_IPIP, PROTO_NAME_IPV6_ENCAP: PROTO_NUM_IPV6_ENCAP, PROTO_NAME_IPV6_FRAG: PROTO_NUM_IPV6_FRAG, diff --git a/releasenotes/notes/add-ip-hopopt-to-protocol-dictionary-3cbe54bb5056f790.yaml b/releasenotes/notes/add-ip-hopopt-to-protocol-dictionary-3cbe54bb5056f790.yaml new file mode 100644 index 000000000..ba169d59c --- /dev/null +++ b/releasenotes/notes/add-ip-hopopt-to-protocol-dictionary-3cbe54bb5056f790.yaml @@ -0,0 +1,9 @@ +--- +other: + - | + ``IP`` and ``HOPOPT`` keywords were added to + ``neutron_lib.constants.IP_PROTOCOL_MAP``. + This allows the use of these keywords to be used when creating + security group rules to describe either all IP protocols (for IPv4), or + Hop-by-Hop Options (for IPv6), instead of having to use the number + zero (0) for this purpose.