Move wanFirewallURNFix definition out to package.
This commit is contained in:
parent
ec3f59b630
commit
104873f511
@ -124,4 +124,17 @@ func fixMissingURN(missingURNs ...string) func(dcp *DCP) error {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func wanFirewallURNFix(dcp *DCP) error {
|
||||||
|
missingURN := "urn:schemas-upnp-org:service:WANIPv6FirewallControl:1"
|
||||||
|
if _, ok := dcp.ServiceTypes[missingURN]; ok {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
urnParts, err := extractURNParts(missingURN, serviceURNPrefix)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
dcp.ServiceTypes[missingURN] = urnParts
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
type DCPHackFn func(*DCP) error
|
type DCPHackFn func(*DCP) error
|
||||||
|
Loading…
Reference in New Issue
Block a user