Move wanFirewallURNFix definition out to package.

This commit is contained in:
John Beisley 2021-08-18 07:00:51 +01:00 committed by Huin
parent ec3f59b630
commit 104873f511

View File

@ -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