|
@@ -180,20 +180,6 @@ func (fwd *firewalldConnection) registerReloadCallback(callback func()) {
|
|
|
fwd.onReloaded = append(fwd.onReloaded, &callback)
|
|
|
}
|
|
|
|
|
|
-// OnReloaded adds a callback to be executed when firewalld is reloaded.
|
|
|
-// Adding a callback is idempotent; it ignores the given callback if it's
|
|
|
-// already registered.
|
|
|
-//
|
|
|
-// Callbacks can be registered regardless if firewalld is currently running,
|
|
|
-// but it will initialize firewalld before executing.
|
|
|
-func OnReloaded(callback func()) {
|
|
|
- // Make sure firewalld is initialized before we register callbacks.
|
|
|
- // This function is also called from setupArrangeUserFilterRule,
|
|
|
- // which is called during controller initialization.
|
|
|
- _ = initCheck()
|
|
|
- firewalld.registerReloadCallback(callback)
|
|
|
-}
|
|
|
-
|
|
|
// checkRunning checks if firewalld is running.
|
|
|
//
|
|
|
// It calls some remote method to see whether the service is actually running.
|
|
@@ -366,18 +352,6 @@ func (fwd *firewalldConnection) delInterface(intf string) error {
|
|
|
return nil
|
|
|
}
|
|
|
|
|
|
-// AddInterfaceFirewalld adds the interface to the trusted zone. It is a
|
|
|
-// no-op if firewalld is not running.
|
|
|
-func AddInterfaceFirewalld(intf string) error {
|
|
|
- return firewalld.addInterface(intf)
|
|
|
-}
|
|
|
-
|
|
|
-// DelInterfaceFirewalld removes the interface from the trusted zone It is a
|
|
|
-// no-op if firewalld is not running.
|
|
|
-func DelInterfaceFirewalld(intf string) error {
|
|
|
- return firewalld.delInterface(intf)
|
|
|
-}
|
|
|
-
|
|
|
type interfaceNotFound struct{ error }
|
|
|
|
|
|
func (interfaceNotFound) NotFound() {}
|