q
This commit is contained in:
@@ -11,4 +11,12 @@ function is_dn42_prefix() {
|
||||
NET_IP6: return net ~ DN42_PREFIXES_V6;
|
||||
else: print "is_dn42_prefix: unexpected net.type ", net.type, " ", net; return false;
|
||||
}
|
||||
}
|
||||
|
||||
function is_dn42_self_net() {
|
||||
case net.type {
|
||||
NET_IP4: return net ~ IS_SELF_NET_dn42v4;
|
||||
NET_IP6: return net ~ IS_SELF_NET_dn42v6;
|
||||
else: print "is_dn42_prefix: unexpected net.type ", net.type, " ", net; return false;
|
||||
}
|
||||
}
|
||||
7
bird/function/inet.conf
Normal file
7
bird/function/inet.conf
Normal file
@@ -0,0 +1,7 @@
|
||||
function is_self_net() {
|
||||
case net.type {
|
||||
NET_IP4: return net ~ IS_SELF_NET_inet4;
|
||||
NET_IP6: return net ~ IS_SELF_NET_inet6;
|
||||
else: print "is_dn42_prefix: unexpected net.type ", net.type, " ", net; return false;
|
||||
}
|
||||
}
|
||||
@@ -6,13 +6,13 @@ function unet_is_valid_network_v4() {
|
||||
|
||||
function unet_is_valid_network_v4_allnet(){
|
||||
if unet_is_valid_network_v4() then return true;
|
||||
if is_self_net_inet4() then return true;
|
||||
if is_self_net_dn42v4() then return true;
|
||||
if is_self_net() then return true;
|
||||
if is_dn42_self_net() then return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
function unet_is_voalid_net_v6(){
|
||||
if is_self_net_inet6() then return true;
|
||||
if is_self_net_dn42v6() then return true;
|
||||
if is_self_net() then return true;
|
||||
if is_dn42_self_net() then return true;
|
||||
return false;
|
||||
}
|
||||
Reference in New Issue
Block a user