diff --git a/docs/release-notes/version-3.3.md b/docs/release-notes/version-3.3.md index f45b9c5df..f34904185 100644 --- a/docs/release-notes/version-3.3.md +++ b/docs/release-notes/version-3.3.md @@ -11,6 +11,7 @@ ### Bug Fixes +* [#9328](https://github.com/netbox-community/netbox/issues/9328) - Hide available IPs when non-default ordering is applied * [#9895](https://github.com/netbox-community/netbox/issues/9895) - Various corrections to OpenAPI spec * [#9962](https://github.com/netbox-community/netbox/issues/9962) - SSO login should respect `next` URL query parameter * [#9963](https://github.com/netbox-community/netbox/issues/9963) - Fix support for custom `CSRF_COOKIE_NAME` value @@ -21,8 +22,10 @@ * [#10177](https://github.com/netbox-community/netbox/issues/10177) - Correct display of custom fields when editing VM interfaces * [#10178](https://github.com/netbox-community/netbox/issues/10178) - Display manufacturer name alongside device type under device view * [#10181](https://github.com/netbox-community/netbox/issues/10181) - Restore MultiPartParser (regression from #10031) +* [#10184](https://github.com/netbox-community/netbox/issues/10184) - Fix vertical alignment when displaying object attributes with buttons * [#10208](https://github.com/netbox-community/netbox/issues/10208) - Fix permissions evaluation for interface actions dropdown menu * [#10217](https://github.com/netbox-community/netbox/issues/10217) - Handle exception when trace splits to multiple rear ports +* [#10220](https://github.com/netbox-community/netbox/issues/10220) - Validate IP version when assigning primary IPs to a virtual machine --- diff --git a/netbox/ipam/views.py b/netbox/ipam/views.py index 185154ffb..04d07e356 100644 --- a/netbox/ipam/views.py +++ b/netbox/ipam/views.py @@ -526,9 +526,8 @@ class PrefixIPAddressesView(generic.ObjectChildrenView): return parent.get_child_ips().restrict(request.user, 'view').prefetch_related('vrf', 'tenant', 'tenant__group') def prep_table_data(self, request, queryset, parent): - if not request.GET.get('q'): + if not request.GET.get('q') and not request.GET.get('sort'): return add_available_ipaddresses(parent.prefix, queryset, parent.is_pool) - return queryset def get_extra_context(self, request, instance): diff --git a/netbox/templates/dcim/device.html b/netbox/templates/dcim/device.html index 6e668c084..8a70db621 100644 --- a/netbox/templates/dcim/device.html +++ b/netbox/templates/dcim/device.html @@ -46,10 +46,10 @@ Rack - + {% if object.rack %} {{ object.rack|linkify }} -
+
diff --git a/netbox/templates/dcim/location.html b/netbox/templates/dcim/location.html index f0335036f..10cec1548 100644 --- a/netbox/templates/dcim/location.html +++ b/netbox/templates/dcim/location.html @@ -58,9 +58,9 @@ Racks - + {% if rack_count %} -
+
diff --git a/netbox/templates/dcim/site.html b/netbox/templates/dcim/site.html index ab04ea018..a4ee4180f 100644 --- a/netbox/templates/dcim/site.html +++ b/netbox/templates/dcim/site.html @@ -85,11 +85,11 @@ Physical Address - + {% if object.physical_address %} -
+ {{ object.physical_address|linebreaksbr }} @@ -104,9 +104,9 @@ GPS Coordinates - + {% if object.latitude and object.longitude %} -
+
Map It diff --git a/netbox/virtualization/models.py b/netbox/virtualization/models.py index b8131c1ce..abad57f88 100644 --- a/netbox/virtualization/models.py +++ b/netbox/virtualization/models.py @@ -368,9 +368,14 @@ class VirtualMachine(NetBoxModel, ConfigContextModel): # Validate primary IP addresses interfaces = self.interfaces.all() - for field in ['primary_ip4', 'primary_ip6']: + for family in (4, 6): + field = f'primary_ip{family}' ip = getattr(self, field) if ip is not None: + if ip.address.version != family: + raise ValidationError({ + field: f"Must be an IPv{family} address. ({ip} is an IPv{ip.address.version} address.)", + }) if ip.assigned_object in interfaces: pass elif ip.nat_inside is not None and ip.nat_inside.assigned_object in interfaces: