1
0
mirror of https://github.com/dkmstr/openuds.git synced 2024-12-24 21:34:41 +03:00

Fixed ip lengths to allow future ipv6 support

This commit is contained in:
Adolfo Gómez García 2022-02-06 03:24:38 +01:00
parent dd4dc738b4
commit 3b991e0749
3 changed files with 19 additions and 4 deletions

View File

@ -1,4 +1,4 @@
# Generated by Django 4.0 on 2022-02-01 16:02
# Generated by Django 4.0 on 2022-02-06 03:23
from django.db import migrations, models
import django.db.models.deletion
@ -49,6 +49,21 @@ class Migration(migrations.Migration):
name='token',
field=models.CharField(blank=True, default=None, max_length=64, null=True, unique=True),
),
migrations.AlterField(
model_name='tunneltoken',
name='ip',
field=models.CharField(max_length=128),
),
migrations.AlterField(
model_name='tunneltoken',
name='ip_from',
field=models.CharField(max_length=128),
),
migrations.AlterField(
model_name='userservice',
name='src_ip',
field=models.CharField(default='', max_length=128),
),
migrations.CreateModel(
name='ServiceTokenAlias',
fields=[

View File

@ -40,8 +40,8 @@ class TunnelToken(models.Model):
"""
username = models.CharField(max_length=128)
ip_from = models.CharField(max_length=16)
ip = models.CharField(max_length=16)
ip_from = models.CharField(max_length=128)
ip = models.CharField(max_length=128)
hostname = models.CharField(max_length=128)
token = models.CharField(max_length=48, db_index=True, unique=True)

View File

@ -113,7 +113,7 @@ class UserService(UUIDModel): # pylint: disable=too-many-public-methods
) # Cache level must be 1 for L1 or 2 for L2, 0 if it is not cached service
src_hostname = models.CharField(max_length=64, default='')
src_ip = models.CharField(max_length=15, default='')
src_ip = models.CharField(max_length=128, default='')
cluster_node = models.CharField(
max_length=128, default=None, blank=True, null=True, db_index=True