diff --git a/Tools/ardupilotwaf/boards.py b/Tools/ardupilotwaf/boards.py
index 6f53922836..776a1cd922 100644
--- a/Tools/ardupilotwaf/boards.py
+++ b/Tools/ardupilotwaf/boards.py
@@ -148,8 +148,8 @@ class Board:
             )
             cfg.msg("Enabled custom controller", 'no', color='YELLOW')
 
-        if cfg.options.enable_networking:
-            env.CXXFLAGS += ['-DAP_NETWORKING_ENABLED=1']
+        if cfg.options.disable_networking:
+            env.CXXFLAGS += ['-DAP_NETWORKING_ENABLED=0']
 
         if cfg.options.enable_networking_tests:
             env.CXXFLAGS += ['-DAP_NETWORKING_TESTS_ENABLED=1']
@@ -674,6 +674,9 @@ class sitl(Board):
             '-Werror=missing-declarations',
         ]
 
+        if not cfg.options.disable_networking:
+            env.CXXFLAGS += ['-DAP_NETWORKING_ENABLED=1']
+        
         if cfg.options.ubsan or cfg.options.ubsan_abort:
             env.CXXFLAGS += [
                 "-fsanitize=undefined",
diff --git a/wscript b/wscript
index 7f0a2e14df..a2e8a73478 100644
--- a/wscript
+++ b/wscript
@@ -269,8 +269,8 @@ submodules at specific revisions.
     g.add_option('--enable-dds', action='store_true',
                  help="Enable the dds client to connect with ROS2/DDS.")
 
-    g.add_option('--enable-networking', action='store_true',
-                 help="Enable the networking code")
+    g.add_option('--disable-networking', action='store_true',
+                 help="Disable the networking API code")
 
     g.add_option('--enable-networking-tests', action='store_true',
                  help="Enable the networking test code. Automatically enables networking.")