Skip to content

Commit

Permalink
[networking] Update predicate to include Debian
Browse files Browse the repository at this point in the history
Signed-off-by: Arif Ali <[email protected]>
  • Loading branch information
arif-ali authored and TurboTurtle committed Jan 11, 2025
1 parent ace5715 commit 5b2c879
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions sos/report/plugins/networking.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@

from sos.report.plugins import (Plugin, RedHatPlugin, UbuntuPlugin,
DebianPlugin, SoSPredicate, PluginOpt)
from sos.policies.distros.ubuntu import UbuntuPolicy
from sos.policies.distros.debian import DebianPolicy


class Networking(Plugin):
Expand Down Expand Up @@ -323,14 +325,16 @@ class UbuntuNetworking(Networking, UbuntuPlugin, DebianPlugin):

def setup(self):

ubuntu_jammy_and_after_ss_kmods = ['tcp_diag', 'udp_diag',
'inet_diag', 'unix_diag',
'netlink_diag', 'af_packet_diag',
'xsk_diag', 'mptcp_diag',
'raw_diag']
common_ss_kmods = ['af_packet_diag', 'inet_diag', 'mptcp_diag',
'netlink_diag', 'raw_diag', 'tcp_diag', 'udp_diag',
'unix_diag']

if self.policy.dist_version() >= 22.04:
self.ss_kmods = ubuntu_jammy_and_after_ss_kmods
if (isinstance(self.policy, UbuntuPolicy) and
self.policy.dist_version() >= 22.04):
self.ss_kmods = common_ss_kmods + ['xsk_diag']
elif (isinstance(self.policy, DebianPolicy) and
self.policy.dist_version() >= 13):
self.ss_kmods = common_ss_kmods + ['vsock_diag']

super().setup()

Expand Down

0 comments on commit 5b2c879

Please sign in to comment.