Changeset 2187


Ignore:
Timestamp:
01/23/19 10:01:52 (5 years ago)
Author:
nanardon
Message:

Fix: compute network size only for IPv4

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/LATMOS-Accounts/lib/LATMOS/Accounts/Bases/Sql/Netzone.pm

    r2056 r2187  
    9494                        ( 
    9595                        select host(network(value::inet)+ (generate_series(0, broadcast(value::inet) - network(value::inet)))) from 
    96                         netzone_attributes where attr='netExclude' and okey = $1 
     96                        netzone_attributes where attr='netExclude' and okey = $1 and family(netzone_attributes.value::inet) = 4 
    9797                        union 
    9898                        select nethost_attributes_ips.value from nethost_attributes_ips join netzone_attributes on 
    9999                        netzone_attributes.attr='net' and nethost_attributes_ips.value::inet <<= netzone_attributes.value::inet 
    100                         where netzone_attributes.okey = $1 
     100                        where netzone_attributes.okey = $1 and family(netzone_attributes.value::inet) = 4 
    101101                        ) 
    102102                        ) as s 
     
    129129                        ( 
    130130                        select host(network(value::inet)+ (generate_series(0, broadcast(value::inet) - network(value::inet)))) from 
    131                         netzone_attributes where attr='netExclude' and okey = $1 
     131                        netzone_attributes where attr='netExclude' and okey = $1 and family(netzone_attributes.value::inet) = 4 
    132132                        ) 
    133133                        ) as s 
Note: See TracChangeset for help on using the changeset viewer.