File tree Expand file tree Collapse file tree 2 files changed +32
-0
lines changed
Expand file tree Collapse file tree 2 files changed +32
-0
lines changed Original file line number Diff line number Diff line change @@ -269,6 +269,11 @@ func (c *spoc) setupNetwork46(a *ast.Network) {
269269 n6 .nat = nil
270270 c .setupNetwork2 (n , na4 )
271271 c .setupNetwork2 (n6 , na6 )
272+ // Attribute 'has_subnets' is only applied to IPv6 part,
273+ // if both parts have prefix length 0 (the internet).
274+ if ! (n .ipp .Bits () == 0 && n6 .ipp .Bits () == 0 ) {
275+ n6 .hasSubnets = false
276+ }
272277 } else if needV6 {
273278 n .ipV6 = true
274279 n .hosts = hosts6
Original file line number Diff line number Diff line change @@ -1593,6 +1593,33 @@ Warning: IPv6 network:n1 is subnet of IPv6 network:n2
15931593 and at IPv6 part declare attribute ' subnet_of'
15941594= END =
15951595
1596+ # ###########################################################
1597+ = TITLE= Warning at combined network with has_subnets ignored at v6 part
1598+ = INPUT=
1599+ network: n1 = { ip = 10.1 . 1. 0/ 24 ; ip6 = 2001 : db8: 1 : 1 ::/ 64 ; }
1600+ network: n2 = { ip = 0.0 . 0. 0/ 0 ; ip6 = 2001 : db8: 1 : 0 ::/ 48 ; has_subnets; }
1601+ router: r1 = {
1602+ interface: n1;
1603+ interface: n2;
1604+ }
1605+ = WARNING=
1606+ Warning: IPv6 network: n1 is subnet of IPv6 network: n2
1607+ in nat_domain: [network: n1].
1608+ If desired, split subnet into IPv4 and IPv6 part
1609+ and at IPv6 part declare attribute ' subnet_of'
1610+ = END =
1611+
1612+ # ###########################################################
1613+ = TITLE= Attribute has_subnets at combined network is not ignored with / 0
1614+ = INPUT=
1615+ network: n1 = { ip = 10.1 . 1. 0/ 24 ; ip6 = 2001 : db8: 1 : 1 ::/ 64 ; }
1616+ network: n2 = { ip = 0.0 . 0. 0/ 0 ; ip6 = ::/ 0 ; has_subnets; }
1617+ router: r1 = {
1618+ interface: n1;
1619+ interface: n2;
1620+ }
1621+ = WARNING= NONE
1622+
15961623# ###########################################################
15971624= TITLE= Missing owner for v6 part
15981625= INPUT=
You can’t perform that action at this time.
0 commit comments